Archive: Zip to EXE then run specific file... possible?


Zip to EXE then run specific file... possible?
I use VB6 package and deployment wizard...

It creates 3 files:
setup.exe
setup.lst
dbobjectcreator.cab


I want to make it where it's just 1 file. like: dbobjectcreator.exe only.

I thought maybe the Zip2Exe in this program could do that, maybe it can, but I cannot figure out how.

I need it to create a setup.zip and when someone clicks on that file it needs to extract all the files to their Temp folder in windows and then auto-run the setup.exe inside of dbobjectcreator.exe.

Is this possible with this program?
Thanks for any information,
Duder


bot directly, sry.
it will just create an nsis installer that behaves like an SFX archive.

for you purposes you should rather try NSIS Self Extractor.
search the forums or the NSIS Wiki for it.

it's more powerful than Zip2Exe and looks nicer :)

beware:
the resulting .exe file will be a nsis installer executable, no SFX, so you'll be unable to extract it with an unzipper.


You can try this:
http://nsis.sourceforge.net/NSIS_Self-Extractor_kit

It comes with a DirToEXE program which is probably what you really need.

-Stu


Originally posted by Comm@nder21
bot directly, sry.
it will just create an nsis installer that behaves like an SFX archive.

for you purposes you should rather try NSIS Self Extractor.
search the forums or the NSIS Wiki for it.

it's more powerful than Zip2Exe and looks nicer :)

beware:
the resulting .exe file will be a nsis installer executable, no SFX, so you'll be unable to extract it with an unzipper.
What file do you edit to tell the installer to autorun after it extracts? Or is there a help page you can point me at?

I'm just interested in the Zip to EXE.

I'm zipping my 3 files. Then i want to create a exe using this program. Then when you run that EXE it should place the 3 zipped files into a TEMP folder and then auto-run the setup.exe file.

Think i misread the previous post.


If you want to keep it simple, then your script would need to look like this:


Name "MyApp"
OutFile "MyApp_install.exe"

Function .onInit

# Extract files.
SetOutPath $EXEDIR
File "setup.exe"
File "setup.lst"
File "dbobjectcreator.cab"

# Run setup.
Exec "$EXEDIR\setup.exe"

# Exit.
Abort

FunctionEnd

Section
SectionEnd


Put it in the same folder as your files, then right click on it and select Compile NSIS Script.

-Stu

Originally posted by Afrow UK
Put it in the same folder as your files, then right click on it and select Compile NSIS Script.

-Stu [/B]
Thanks.

Originally posted by Afrow UK
If you want to keep it simple, then your script would need to look like this:


Name "MyApp"
OutFile "MyApp_install.exe"

Function .onInit

# Extract files.
SetOutPath $EXEDIR
File "setup.exe"
File "setup.lst"
File "dbobjectcreator.cab"

# Run setup.
Exec "$EXEDIR\setup.exe"

# Exit.
Abort

FunctionEnd

Section
SectionEnd


Put it in the same folder as your files, then right click on it and select Compile NSIS Script.

-Stu
What about deleteing the files once your done?

I tried this:

Delete "setup.exe"
Delete "setup.lst"
Delete "dbobjectcreator.cab"

This does not work though.

I tried to make it extract into a certain folder. Like:
SystemDir/Program Files/XYZ

but XYZ would not be created?


Name "MyApp"
OutFile "MyApp_install.exe"

Function .onInit

# Extract files.
SetOutPath $EXEDIR
File "setup.exe"
File "setup.lst"
File "dbobjectcreator.cab"

# Run setup.
ExecWait "$EXEDIR\setup.exe"

MessageBox MB_OK "Waiting!"

# Delete temp files.
Delete "$EXEDIR\setup.exe"
Delete "$EXEDIR\setup.lst"
Delete "$EXEDIR\dbobjectcreator.cab"

# Exit.
Abort

FunctionEnd

Section
SectionEnd


I've put a MessageBox in there so you can check that the installer is waiting for setup.exe to complete. If you get the MessageBox immediately then you'll need to pass a command line parameter to setup.exe to make it wait (which we do not know at this time).

-Stu