Starting STALKER From The RAM Drive Part II Plus Some Visual Basic Madness
Today we are closing the topic of S.T.A.L.K.E.R modifications and for the sake of it i have to say something new here.
In one of the previous Stalker related posts i [already covered]
optimization questions,
but recently i’ve stumbled upon very neat Japanese utility [FastCopy]
,
which is focused on ultra fast copying of the files, especially on modern SSD/NVME drives.
That is why I have decided to rewrite the game launch and save backup scripts.
COPY DATA TO RAM DRIVE
[stalker-2-ram.cmd]
@echo off
echo.
echo ==== Preparing system & cleaning the junk ====
echo.
taskkill /F /IM "xnviewmp.exe"
taskkill /F /IM "Xpiks.exe"
taskkill /F /IM "photo.exe"
taskkill /F /IM "Topaz DeNoise AI.exe"
taskkill /F /IM "vegas210.exe"
taskkill /F /IM "ErrorReportLauncher.exe"
taskkill /F /IM "rawtherapee.exe"
taskkill /F /IM "FileZilla Server Interface.exe"
taskkill /F /IM "FileZilla Server.exe"
taskkill /F /IM "ArsClip.exe"
taskkill /F /IM "foobar2000.exe"
taskkill /F /IM "Far.exe"
taskkill /F /IM "hasplms.exe"
taskkill /F /IM "hddled.exe"
taskkill /F /IM "httpd.exe"
taskkill /F /IM "mega-desktop-app-gfxworker.exe"
taskkill /F /IM "postgres.exe"
taskkill /F /IM "r3dfox.exe"
taskkill /F /IM "timeserv.exe"
taskkill /F /IM "Workrave.exe"
taskkill /F /IM "WorkraveHelper.exe"
taskkill /F /IM "LvAgent.exe"
taskkill /F /IM "LvAgent64.exe"
taskkill /F /IM "notepad++.exe"
taskkill /F /IM "MEGAsync.exe"
taskkill /F /IM "nextcloud.exe"
wmic process where name="xnviewmp.exe" call terminate
wmic process where name="Xpiks.exe" call terminate
wmic process where name="photo.exe" call terminate
wmic process where name="Topaz DeNoise AI.exe" call terminate
wmic process where name="vegas210.exe" call terminate
wmic process where name="ErrorReportLauncher.exe" call terminate
wmic process where name="filezilla.exe" call terminate
wmic process where name="rawtherapee.exe" call terminate
wmic process where name="FileZilla Server Interface.exe" call terminate
wmic process where name="FileZilla Server.exe" call terminate
wmic process where name="ArsClip.exe" call terminate
wmic process where name="foobar2000.exe" call terminate
wmic process where name="Far.exe" call terminate
wmic process where name="hasplms.exe" call terminate
wmic process where name="hddled.exe" call terminate
wmic process where name="httpd.exe" call terminate
wmic process where name="mega-desktop-app-gfxworker.exe" call terminate
wmic process where name="postgres.exe" call terminate
wmic process where name="r3dfox.exe" call terminate
wmic process where name="timeserv.exe" call terminate
wmic process where name="Workrave.exe" call terminate
wmic process where name="WorkraveHelper.exe" call terminate
wmic process where name="LvAgent.exe" call terminate
wmic process where name="LvAgent64.exe" call terminate
wmic process where name="notepad++.exe" call terminate
wmic process where name="nextcloud.exe" call terminate
wmic process where name="MEGAsync.exe" call terminate
echo.
echo ==== Disabling network interface ====
echo.
netsh interface set interface name="Ethernet" admin=disabled
echo.
echo ==== Copying data to RAM disk ====
echo.
C:
"C:\Users\sp808\FastCopy\FastCopy.exe" /cmd=force_copy /no_ui /auto_close /force_start /bufsize=2048 /disk_mode=diff /low_io=FALSE /speed=full "C:\STALKER\" /to="X:\"
echo.
echo ==== Executing S.T.A.L.K.E.R. ====
echo.
X:
X:\STALKER\bin_x64\xrEngine.exe
echo.
echo ==== Enabling network interface ====
echo.
netsh interface set interface name="Ethernet" admin=enabled
COPY DATA BACK TO SYSTEM DRIVE
[stalker-backup-save.cmd]
@echo off
echo.
echo ==== Copying saves to the system disk ====
echo.
:: Copy Saved Games
echo Copying Saved Games...
"C:\Users\sp808\FastCopy\FastCopy.exe" /cmd=force_copy /no_ui /auto_close /force_start /bufsize=2048 /disk_mode=diff /low_io=FALSE /speed=full "X:\STALKER\_appdata_\savedgames" /to="C:\STALKER\_appdata_\savedgames"
:: Copy Screenshots
echo Copying Screenshots...
"C:\Users\sp808\FastCopy\FastCopy.exe" /cmd=force_copy /no_ui /auto_close /force_start /bufsize=224 /disk_mode=diff /low_io=FALSE /speed=full "X:\STALKER\_appdata_\screenshots" /to="C:\STALKER\_appdata_\screenshots"
Obviously this technique can be used not only for games but for any other application as well.
But the most important problem was loosing focus of full-screen application during backup batch file execution.
So our game is interrupted and this is not a good thing for sure.
But recently i came up with quite a crazy idea of using Visual Basic script to launch plain batch script,
without switching to desktop, so procedure is 100% background process.
LAUNCH.VBS
Set sh = CreateObject("WScript.Shell")
sh.Run """C:\Users\sp808\Nextcloud\#Settings\4winstuff\cmd\STALKER\stalker-2-ram.cmd""", 0, False
BACKUP.VBS
Set sh = CreateObject("WScript.Shell")
sh.Run """C:\Users\sp808\Nextcloud\#Settings\4winstuff\cmd\STALKER\stalker-backup-save.cmd""", 0, False
And to make solution even crazier i stack all above mentioned stuff around [Joy2Key]
application.
For some weird reason it is also Japanese. Maybe it is some kind of new obsession?
So, for example, the backup process chain will be like this:
- user being in a fullscreen game, placed in RAM presses button on the joypad
- Joy2Key launch VBScript assigned to this button
- VBScript opens background window where it calls for Batch script CMD file
[w/o interrupting current fullscreen app] - Batch script calls for FastCopy for super quick copy of required files
As you can see, now it is not a problem to do things in the background at all.