![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#1 |
Navy Seal
![]() |
![]()
I need a set of batch file commands which would, when executed, create cfg file on the very same location on HDD with following content:
Code:
ClientAreaWidth=1184 ClientAreaHeight=765 CameraManager.act=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 EnvSim.act=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 kernel.dll=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 sh5.exe=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 SHCollisions.act=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 SHSim.act=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 SHSound.act=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 SH_NClient.dll=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 SimData.dll=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 LanguagePackInUse= As you can probably see, I would like to further simplify process of Wolves of Steel installation so my first question would be, is this possible at all? Thanks in advance! ![]()
__________________
Best regards... Vecko ![]() The Wolves of Steel v2.2.25_SH5 Expansion Pack_Full The Wolves of Steel v2.2.xx to v2.2.25 - Update ![]() PDF Install Instructions How to report an issue ![]() If You wish to support my work... |
![]() |
![]() |
![]() |
#2 |
Sea Lord
![]() Join Date: Apr 2008
Location: Germany, Italy
Posts: 1,721
Downloads: 107
Uploads: 4
|
![]()
I think it's helpful if you take a look in the AODCD game patches (the official ones for the game Aces of the Deep; DOS version); there are batch file commands for any possible directory configuration. I have modified them in the past for making the game playable with DosBox where it was necessary for the patch to run correctly.
I will go in my VMWare and pubhish here these batch commands, but I cannot guarantee that it will be any help for you... The command contains a %, that's for sure. |
![]() |
![]() |
![]() |
#3 | |
Navy Seal
![]() |
![]() Quote:
![]()
__________________
Best regards... Vecko ![]() The Wolves of Steel v2.2.25_SH5 Expansion Pack_Full The Wolves of Steel v2.2.xx to v2.2.25 - Update ![]() PDF Install Instructions How to report an issue ![]() If You wish to support my work... |
|
![]() |
![]() |
![]() |
#4 |
Sea Lord
![]() Join Date: Apr 2008
Location: Germany, Italy
Posts: 1,721
Downloads: 107
Uploads: 4
|
![]()
What you can do in the meantime if you have DosBox (or try it in Windows console or by starting Start > Execute 'cmd' is:
Start the DOS session and type '-?' or 'help' This should fire-up the help for DOS commands, you can use these in batch files. [EDITED] |
![]() |
![]() |
![]() |
#5 |
Sea Lord
![]() Join Date: Apr 2008
Location: Germany, Italy
Posts: 1,721
Downloads: 107
Uploads: 4
|
![]()
Ok, here it goes, first the patch install batch file must decide which language must be installed, then which .bat file to execute.
**************** Code:
@echo off mode co80 :langSel cls echo. echo. echo AOD Expansion install echo internet suply peoples echo echo echo If you want to run the program in English, press 'E'. echo echo Pour utiliser le programme en fran‡ais, appuyez sur 'F'. echo echo Um das Spiel in Deutsch zu spielen, 'D' eingeben. echo echo echo echo. echo. CHUNK\GK.COM :checkKey IF ERRORLEVEL 113 IF NOT ERRORLEVEL 114 GOTO end IF ERRORLEVEL 102 IF NOT ERRORLEVEL 103 GOTO French IF ERRORLEVEL 101 IF NOT ERRORLEVEL 102 GOTO English IF ERRORLEVEL 100 IF NOT ERRORLEVEL 101 GOTO German IF ERRORLEVEL 81 IF NOT ERRORLEVEL 82 GOTO end IF ERRORLEVEL 70 IF NOT ERRORLEVEL 71 GOTO French IF ERRORLEVEL 69 IF NOT ERRORLEVEL 70 GOTO English IF ERRORLEVEL 68 IF NOT ERRORLEVEL 69 GOTO German goto end :English cls call eng.bat %1 goto end :German cls call ger.bat %1 goto end :French cls call frn.bat %1 goto end :end ENG.BAT: Code:
@echo off rem ------ first find out what drive we're installing from --------- call CHUNK\DRIVE.EXE IF ERRORLEVEL 25 IF NOT ERRORLEVEL 26 SET IDRIVE=Z IF ERRORLEVEL 24 IF NOT ERRORLEVEL 25 SET IDRIVE=Y IF ERRORLEVEL 23 IF NOT ERRORLEVEL 24 SET IDRIVE=X IF ERRORLEVEL 22 IF NOT ERRORLEVEL 23 SET IDRIVE=W IF ERRORLEVEL 21 IF NOT ERRORLEVEL 22 SET IDRIVE=V IF ERRORLEVEL 20 IF NOT ERRORLEVEL 21 SET IDRIVE=U IF ERRORLEVEL 19 IF NOT ERRORLEVEL 20 SET IDRIVE=T IF ERRORLEVEL 18 IF NOT ERRORLEVEL 19 SET IDRIVE=S IF ERRORLEVEL 17 IF NOT ERRORLEVEL 18 SET IDRIVE=R IF ERRORLEVEL 16 IF NOT ERRORLEVEL 17 SET IDRIVE=Q IF ERRORLEVEL 15 IF NOT ERRORLEVEL 16 SET IDRIVE=P IF ERRORLEVEL 14 IF NOT ERRORLEVEL 15 SET IDRIVE=O IF ERRORLEVEL 13 IF NOT ERRORLEVEL 14 SET IDRIVE=N IF ERRORLEVEL 12 IF NOT ERRORLEVEL 13 SET IDRIVE=M IF ERRORLEVEL 11 IF NOT ERRORLEVEL 12 SET IDRIVE=L IF ERRORLEVEL 10 IF NOT ERRORLEVEL 11 SET IDRIVE=K IF ERRORLEVEL 9 IF NOT ERRORLEVEL 10 SET IDRIVE=J IF ERRORLEVEL 8 IF NOT ERRORLEVEL 9 SET IDRIVE=I IF ERRORLEVEL 7 IF NOT ERRORLEVEL 8 SET IDRIVE=H IF ERRORLEVEL 6 IF NOT ERRORLEVEL 7 SET IDRIVE=G IF ERRORLEVEL 5 IF NOT ERRORLEVEL 6 SET IDRIVE=F IF ERRORLEVEL 4 IF NOT ERRORLEVEL 5 SET IDRIVE=E IF ERRORLEVEL 3 IF NOT ERRORLEVEL 4 SET IDRIVE=D IF ERRORLEVEL 2 IF NOT ERRORLEVEL 3 SET IDRIVE=C IF ERRORLEVEL 1 IF NOT ERRORLEVEL 2 SET IDRIVE=B IF ERRORLEVEL 0 IF NOT ERRORLEVEL 1 SET IDRIVE=A :skipit if '%1' == '' goto chkdef rem ---- extract the destination drive letter and path from command line IF NOT '%2'=='' GOTO ChangeD IF NOT EXIST %1\NUL GOTO BadDir FOR %%f IN (/%1) DO %0 %%f %1 :========= ChangeD =========== %1: CD %2 > NUL rem --------- make sure they've saved careers properly ----------- goto warning :startcopy :next IF NOT EXIST resource.cfg goto nosim IF NOT EXIST SIM\NUL goto nosim IF NOT EXIST SHELL\NUL goto nosim IF NOT EXIST SOUND\NUL goto nosim rem ============ Unpack the files ============= cls echo. echo ************* Unpacking Files... ************* echo. copy %IDRIVE%:resource.000 >nul copy %IDRIVE%:chunk\unchunk.exe >nul unchunk resource.000 . > nul if ERRORLEVEL 1 goto BadChunk rem ===== copy language specific files ========= IF EXIST ENGLISH\NUL goto copystuff mkdir english > nul :======= copystuff ========= copy %IDRIVE%:chunk\readme.eng english\readme. >nul IF EXIST readme.old goto skip1 IF EXIST readme. copy readme. readme.old IF EXIST read.me copy read.me readme.old :skip1 IF NOT EXIST readme. goto chngname @copy english\readme. >nul goto skip2 :chngname @copy english\readme. read.me >nul :skip2 cls goto playNow IF EXIST SAVE\NUL goto CDVERSION IF NOT EXIST SIM\SAVE\NUL goto nosim goto playNow :CDVERSION :playNow echo. echo. echo *********** AOD Mission Disk Installed ! ************ echo * * echo * * echo ˙ * To play NOW: * echo ˙ * Type AOD and press [ENTER]. * echo * * echo ˙ * To play LATER: * echo ˙ * CD to the game directory. * echo ˙ * Type AOD and press [ENTER]. * echo * * echo * If you should ever need to change your sound card * echo * selection or settings, CD to the game directory * echo * and run SOUNDSET again. * echo ********************************************************* goto done :usage echo To install AOD expansion disk to a specific directory name: echo. echo Type "install" followed by the drive letter and path echo where ACES OF THE DEEP is installed. echo. echo For example: "install C:\DYNAMIX\AOD" will attempt to install the echo mission disk to the DYNAMIX\AOD directory on the C drive. echo. echo. %IDRIVE%: goto end :BadDir :nosim :noshell cls echo. echo. echo An installed version of AOD was not found in the specified echo directory. Please check the drive and directory path and echo try install again. echo. echo. echo. echo. goto usage :========= chkdef ============ rem rem check for aod installation in default directories IF EXIST C:\DYNAMIX\AOD\SIM\SUBSIM.EXE goto def1 IF EXIST C:\DYNAMIX\AODCD\SIM\SUBSIM.EXE goto def2 IF EXIST C:\GAMES\AOD\SIM\SUBSIM.EXE goto def3 IF EXIST C:\GAMES\AODCD\SIM\SUBSIM.EXE goto def4 goto usage :def1 c: cd c:\dynamix\aod cls echo. echo. echo. echo AOD found at C:\DYNAMIX\AOD goto confirm :def2 c: cd c:\dynamix\aodcd cls echo. echo. echo. echo AOD found at C:\DYNAMIX\AODCD goto confirm :def3 c: cd c:\games\aod cls echo. echo. echo. echo AOD found at C:\GAMES\AOD goto confirm :def4 c: cd c:\games\aodcd cls echo. echo. echo. echo AOD found at C:\GAMES\AODCD goto confirm :confirm echo. echo Do you wish to install the AOD expansion disk to this directory? (Y/N) echo. echo. %IDRIVE%:\CHUNK\GK.COM IF ERRORLEVEL 121 IF NOT ERRORLEVEL 122 GOTO warning IF ERRORLEVEL 110 IF NOT ERRORLEVEL 111 GOTO usage IF ERRORLEVEL 89 IF NOT ERRORLEVEL 90 GOTO warning IF ERRORLEVEL 78 IF NOT ERRORLEVEL 79 GOTO usage goto usage :=========== warning ============== echo ****** Saved Games ****** echo. echo Career games saved under AoD or AoD CD will not load properly into your echo simulation once you have installed the Expansion Disk, unless you saved echo the game while in port. To preserve a career saved while at sea you echo must first bring your skipper into port and save the game before you echo install the expansion disk. echo. echo Continue with install? (Y/N) echo. echo. %IDRIVE%:\CHUNK\GK.COM IF ERRORLEVEL 121 IF NOT ERRORLEVEL 122 GOTO startcopy IF ERRORLEVEL 110 IF NOT ERRORLEVEL 111 GOTO earlyexit IF ERRORLEVEL 89 IF NOT ERRORLEVEL 90 GOTO startcopy IF ERRORLEVEL 78 IF NOT ERRORLEVEL 79 GOTO earlyexit :======= earlyexit ============ %IDRIVE%: goto end rem *********** error handling and clean up ********* :BadChunk echo unable to extract resource file. goto done :Delchunk del unchunk.exe goto done :DelRes del resource.000 goto done :done IF EXIST unchunk.exe goto Delchunk IF EXIST resource.000 goto DelRes SET IDRIVE= SET DEFD= SET DEFP= :end I hope you can get what you want by association. Good luck ![]() Cheers, Last edited by XenonSurf; 01-31-18 at 06:27 PM. |
![]() |
![]() |
![]() |
#6 |
Navy Seal
![]() |
![]()
Thank you very much XenonSurf although this may be indeed to advanced for me...
![]() Can you please edit your post with code tags and spoilers so we can keep this tread as clear as possible for anyone with possible solution? ![]()
__________________
Best regards... Vecko ![]() The Wolves of Steel v2.2.25_SH5 Expansion Pack_Full The Wolves of Steel v2.2.xx to v2.2.25 - Update ![]() PDF Install Instructions How to report an issue ![]() If You wish to support my work... |
![]() |
![]() |
![]() |
#7 |
Sea Lord
![]() Join Date: Apr 2008
Location: Germany, Italy
Posts: 1,721
Downloads: 107
Uploads: 4
|
![]()
Additionally, I know from making batch files that any names with spaces must be kept in brackets, like "C:\ xxxx xxxx", so your initial example won't work probably.
I still have a printed version of the MS-DOS 5.0 manual ![]() Believe me or not, it helps me still today... Thats' how MS Windows is put together... There must be an electronic version. Get it, it has all possible commands. |
![]() |
![]() |
![]() |
#8 |
Navy Seal
![]() |
![]()
Anyone else? OldCoder?
![]()
__________________
Best regards... Vecko ![]() The Wolves of Steel v2.2.25_SH5 Expansion Pack_Full The Wolves of Steel v2.2.xx to v2.2.25 - Update ![]() PDF Install Instructions How to report an issue ![]() If You wish to support my work... |
![]() |
![]() |
![]() |
#9 |
Watch
![]() Join Date: Nov 2014
Posts: 20
Downloads: 57
Uploads: 0
|
![]()
Hello, VDR. I've created a tool in C# that can generate the config file for you by reading a sh5 regkey. All that is needed is to run the exe and it spits out the cfg file. Can be built using Visual Studio 2017 Community.
https://github.com/sputterfish/silenthuntercfgmaker It will drop the cfg file in the same directory where it is run, you can of course edit this or if its any use i can help as needed. Not savvy in batch here so if this of no use, oh well. Cheers |
![]() |
![]() |
![]() |
#10 | |
Navy Seal
![]() |
![]() Quote:
![]() I'm having troubles to download the exe? Should I be registered on GitHub in order to download the file?
__________________
Best regards... Vecko ![]() The Wolves of Steel v2.2.25_SH5 Expansion Pack_Full The Wolves of Steel v2.2.xx to v2.2.25 - Update ![]() PDF Install Instructions How to report an issue ![]() If You wish to support my work... |
|
![]() |
![]() |
![]() |
#11 | |
Watch
![]() Join Date: Nov 2014
Posts: 20
Downloads: 57
Uploads: 0
|
![]() Quote:
You should be able to download directly using this link. I can make any changes to the output if needed. |
|
![]() |
![]() |
![]() |
#12 | |
Navy Seal
![]() |
![]() Quote:
![]() But it needs few tweaks: The file should be named GenericPatcher.cfg Also output text should have no " marks or spaces around = mark ![]() Code:
ClientAreaWidth = 1184 ClientAreaHeight = 765 CameraManager.act_=_"D:\INSTALIRANE IGRE-Win7\Silent Hunter 5" EnvSim.act = "D:\INSTALIRANE IGRE-Win7\Silent Hunter 5" kernel.dll = "D:\INSTALIRANE IGRE-Win7\Silent Hunter 5" sh5.exe = "D:\INSTALIRANE IGRE-Win7\Silent Hunter 5" SHCollisions.act = "D:\INSTALIRANE IGRE-Win7\Silent Hunter 5" SHSound.act = "D:\INSTALIRANE IGRE-Win7\Silent Hunter 5" SH_NClient.dll = "D:\INSTALIRANE IGRE-Win7\Silent Hunter 5" SimData.dll = "D:\INSTALIRANE IGRE-Win7\Silent Hunter 5" LanguagePackInUse =
__________________
Best regards... Vecko ![]() The Wolves of Steel v2.2.25_SH5 Expansion Pack_Full The Wolves of Steel v2.2.xx to v2.2.25 - Update ![]() PDF Install Instructions How to report an issue ![]() If You wish to support my work... |
|
![]() |
![]() |
![]() |
#13 |
Watch
![]() Join Date: Nov 2014
Posts: 20
Downloads: 57
Uploads: 0
|
![]()
Alright changes made. Should reflect the requested.
https://github.com/sputterfish/silen...oad/2/SHFR.exe Cheers |
![]() |
![]() |
![]() |
#14 | |
Navy Seal
![]() |
![]() Quote:
Code:
ClientAreaWidth=1184 ClientAreaHeight=765 CameraManager.act=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 EnvSim.act=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 kernel.dll=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 sh5.exe=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 SHCollisions.act=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 SHSim.act=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 SHSound.act=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 SH_NClient.dll=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 SimData.dll=D:\INSTALIRANE IGRE-Win7\Silent Hunter 5 LanguagePackInUse= ![]() ![]()
__________________
Best regards... Vecko ![]() The Wolves of Steel v2.2.25_SH5 Expansion Pack_Full The Wolves of Steel v2.2.xx to v2.2.25 - Update ![]() PDF Install Instructions How to report an issue ![]() If You wish to support my work... |
|
![]() |
![]() |
![]() |
#15 |
Watch
![]() Join Date: Nov 2014
Posts: 20
Downloads: 57
Uploads: 0
|
![]() |
![]() |
![]() |
![]() |
|
|