Hi, apologize for using English (you can of course answer in Russian! Thanks!)
I'm using the module to generate different .exe archives, but all in the same structure:
MyProgDir (directory)
L-- Run.exe
L-- (other files/folders - about 30 MB of them, in some 280 files)
The name MyProgDir can change in different cases - so it can also be with spaces or with special characters like umlauts (ü). But there's always run.exe inside.
When the SFX is extracted I want the file "run.exe" to be executed. I want to see just run.exe in a window and not any console windows.
At first my configuration file was like this (MyProgDir is replaced by whatever name I need in different cases)
Код:
;!@Install@!UTF-8!
RunProgram="\"MyProgDir\\run.exe\""
GUIMode="1"
;!@InstallEnd@!
The problem: run.exe has .dll dependencies that require the current dir to be MyProgDir.
From here, I tried two different things but none of them worked 100%.
1. first way - open cmd.exe and terminate it immediately after starting my app, and setup the current dir to MyProgDir:
Код:
RunProgram: "\"cmd.exe\" /c start /b /d MyProgDir run.exe"
The problem here was very weird - run.exe complained that some of its dependencies .dll files were missing. To check, I went to the Temp folder during the message box display - and true, the files were not there, as if the extraction (or copying?) was terminated.
If I changed this to cmd.exe /K the files were all there, but I was stuck with the console window.
2. second way - create a .bat file:
run.bat:
Код:
start /w /d "MyProgDir" run.exe
exit
and in the config:
Код:
RunProgram="hidcon:\"MyProgDir\\run.bat\""
This works great for running the .exe BUT if MyProgDir has special characters, like if it's called "BüüüFolder" - the start command fails (if I remove the hidcon prefix I see that the ü turned into some mess of characters.
Is there a way to have just one simple RunProgram command to handle this?