Old 14th April 2006, 16:25   #1
Falling
Junior Member
 
Join Date: Apr 2006
Posts: 5
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
Falling is offline   Reply With Quote
Old 14th April 2006, 16:33   #2
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to 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.
Comm@nder21 is offline   Reply With Quote
Old 14th April 2006, 16:37   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 14th April 2006, 16:37   #4
Falling
Junior Member
 
Join Date: Apr 2006
Posts: 5
Quote:
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.
Falling is offline   Reply With Quote
Old 14th April 2006, 16:39   #5
Falling
Junior Member
 
Join Date: Apr 2006
Posts: 5
Think i misread the previous post.
Falling is offline   Reply With Quote
Old 14th April 2006, 16:51   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
If you want to keep it simple, then your script would need to look like this:

code:

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
Afrow UK is offline   Reply With Quote
Old 14th April 2006, 16:57   #7
Falling
Junior Member
 
Join Date: Apr 2006
Posts: 5
Quote:
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.
Falling is offline   Reply With Quote
Old 14th April 2006, 17:27   #8
Falling
Junior Member
 
Join Date: Apr 2006
Posts: 5
Quote:
Originally posted by Afrow UK
If you want to keep it simple, then your script would need to look like this:

code:

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?
Falling is offline   Reply With Quote
Old 14th April 2006, 17:45   #9
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
code:

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
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump