0

I'm trying to create a SFX file and run a vbs afterwards. Here's my config file:

;!@Install@!UTF-8!
InstallPath="c:\\windows\\temp\\"
ExecuteFile="cscript.exe"
ExecuteParameters="c:\\windows\\temp\\script.vbs"
;!@InstallEnd@!

The .7z archive is not corrupt, I cn=an open and extract files.

here's how I created the .exe:

copy /b 7zS.sfx + config.txt + SylinkReplacer.7z SylinkReplacer.exe

When I run it a cmd windows flashes I have the feeling it's trying tu run the vbs but I can see it has not been extracted in C:\windows\temp. I ran process monitor and apparently it extract the files in my users' %appdata% within a temporary folder named 7zNNNNNN which gets deleted afterwards. Any suggestion? Thanks

aperally
  • 1
  • 1

1 Answers1

0

I found a way to make it work (I actually found it on stackoverflow but now I can't find it anymore).

;!@Install@!UTF-8!
ExecuteFile="ReplaceSylink.vbs"
;!@InstallEnd@!

This is not the best solution since I wanted it to run it with cscript (console) while on many servers the default engine is wscript (GUI). I'll use something to force cscript like this on this one http://www.robvanderwoude.com/vbstech_engine_force.php

aperally
  • 1
  • 1