This guide will show you how to configure a directory on your hard drive to act as a shared folder for your VMs in VMware Workstation, which allows you to easily share bots between VMs.
What you will need:
Identify where you want to create the share
Chose a directory that is easy to find
Try to keep as close to the root of the drive as possible - do not make it too "nested"
VMware Workstation installed
1 or more VMs created and bootable to Windows
Latest version of RiD Genesis
Some bots to share!
For the sake of this demo, my VM share will be on my H:\ drive at -
H:\DemoVMShare
With a VM running, right click the tab for the VM and choose Settings
Click the Options tab
Click the Shared Folders item in the Settings List
In the right menu click the "Always enabled "radio button
This makes the shared folder available on every boot
Check the box for "Map as network drive in Windows guests" if it is not already checked
Below the empty Folders table the Add button should now be available, click it to open the Add Shared Folder Wizard
Click Next
Click Browse
Browse to the folder you created earlier to act as the share, select it and click OK
Confirm you have the correct folder selected, change the name if you'd like, and click Next
Ensure "Enable this share" is checked (should be default)
Ensure "Read-only" is NOT CHECKED (should be default)
Click Finish to close the Add Shared Folder Wizard
You should now see the shared folder listed in the Folders table. You can click OK to close the Virtual Machine Settings.
Thats it! That is all of the configuration that needs to be done, at least to get basic file sharing working.
If you open up File Explorer inside of the VM and click on This PC you should now see a Shared Folder under the Network locations.
Now just repeat as needed on each vm, and you will easily be able to drag and drop files from your host to your vms, and between vms.
Now that file sharing is configured, lets standardize our VMs so that we can use Powershell for easy file sharing.
First, decide on a consistent place for your RiD folder on all VMs. I usually go with the root of C:\ just to keep things nice and simple
This will mean that my Rs3 scripts (which, lets be honest, are the most important 😉 ) will be at
C:\RiD\Environment\RS3-Retro
This will be important later on as we configure the Powershell script.
The shared folder can be accessed from two different ways inside of windows
Using the drive letter and share name
From what I have seen, the first drive will map to drive letter Z:\ by default
Z:\DemoVMShare
Or by using a more fully-qualified name using \\vmware-host\Shared Folders\<share name>
In this case - \\vmware-host\Shared Folders\DemoVMShare
I believe vmware-host\Shared Folders is the default
I am going to create a new folder in this share, where my RS3 scripts will go:
\\vmware-host\Shared Folders\DemoVMShare\RS3_Scripts
As above with the pathing to the RiD environment folder, this full path is also important for later on when we are creating the Powershell script
To review, our paths are as follows:
RiD environment folder / folder we want to keep synchronized - the goal is to have this the same on each VM
C:\RiD\Environment\RS3-Retro
RS3 scripts folder on the share
\\vmware-host\Shared Folders\DemoVMShare\RS3_Scripts
Now that file sharing is configured and our VMs are standardized, lets do some automating!
I have already created and tested a script to do this for us , so all we need to do is download the script from Github and make a quick edit and its ready to go. 😄
The script will examine the directories on both the vm and share (from earlier) and copy files between so that all folders exist in both locations.
If you have the directories properly standardized across multiple vms, you can simply open the terminal on any vm and run the script from the share.
This makes the sharing across vms simple and consistent.
Here is the link below to a Github repo I created, which has the actual script viewable in plain-text so you can scrutinize it before you use it
https://github.com/iStokee/sync-scripts
If you click on that link, along the top-right of the script editor this is an option to Download the raw file
Save the .ps1 to the share we created (not in the scripts folder)
Inside of your VM right-click the Sync-Scripts.ps1 file and choose edit
The very top of the script is a function declaration - ignore that
Below the Synchronize-Folder function locate the following lines of code, and update the variables with the information we gathered earlier -
# Define the paths
$vmDirectoryPath = "C:\Temp\RID"
$sharedFolderPath = "G:\VM Share\RiDSharedScripts"
####################
RiD environment folder / folder we want to keep syncronized - the goal is to have this the same on each VM
C:\RiD\Environment\RS3-Retro
this goes into $vmDirectoryPath
RS3 scripts folder on the share
\\vmware-host\Shared Folders\DemoVMShare\RS3_Scripts
this goes into $sharedFolderPath
BE SURE TO SAVE!
Close the editor once you have made the changes
Inside of File explorer, right click the Sync-Scripts.ps1 file and click Run with PowerShell
The script will pop up a blue PowerShell box while the RiD script folders are copying
The box will be blank the entire time...
I may add some visual feedback to the script while it is copying, so you know what is happening 😅
Copy from Share -> VM
This example shows copying from the share -> client or vm
Copy from VM -> Share
The script also automatically and seamlessly works in the reverse direction: to copy files from client/vm -> share as it runs
There you have it! Easy scipt sharing across multiple VMs, with a convienent powershell script that can be run on any system to keep it up to date.
Some ideas I have had for possible ways to expand the functionality are:
create a scheduled task in Windows to have the script run on a preset interval - then systems would be automatically kept up to date.
create another script which will download the sync script from Github, and then edit it to find and update the correct variables
this would add some robustness for all of you if you implemented it, for you to be able to stay up to date with any changes / "improvements" I make to the sync script
Lots of possibilities once you have standardization across machines!
Feel free to @ me in the discord with any sort of feedback - it is always welcomed! = )