Prev Previous Post   Next Post Next
Old 17th July 2008, 03:15   #1
moose517
Junior Member
 
Join Date: Jul 2008
Posts: 6
embedding installer help

i have read throug the example on embedding installers in NSIS but i can't get the directx runtime to work correctly. I have all the files needed for it in a folder called redist and the setup file is in that folder I want to install it silently as well without user interference. Here is what i have maybe someone could suggest something to get it to run right, i see what the installer pops up and then goes away real quick before the user has the chance to install in a non silent way but i want it done silently if possible. And also the shortcut to the start menu will not delete either with this. Thanks for you help.

# define name of installer
outFile "FIAR Setup.exe"

# define installation directory
installDir "$PROGRAMFILES\MooseMan Studios"

# start default section
section

# set the installation directory as the destionation for the following actions
setOutPath $INSTDIR

# create the uninstaller
writeUninstaller "$INSTDIR\uninstall.exe"

# install dx runtime before installing game files
file "Redist\dxsetup.exe"
file "Redist\dsetup.dll"
ExecWait "$INSTDIR\dxsetup.exe /silent"

# write the files out to the install directory
file "Four In A Row.exe"
file background.tga
file credits.jpg
file intro.jpg
file mainmenu.jpg

# create a shortcut named "Four In A Row" on the desktop
# point the new shortcut at the program executable
createShortCut "$DESKTOP\Four In A Row.lnk" "$INSTDIR\Four In A Row.exe"

# create a shortcut named "Four In A Row" in the menu folders
createShortCut "$SMPROGRAMS\MooseMan Studios\Four In A Row.lnk" "$INSTDIR\Four In A Row.exe"
sectionEnd

# uninstaller section start
section "uninstall"

# first, delete the uninstaller
delete "$INSTDIR\uninstall.exe"

# delete all the game files
delete "$INSTDIR\Four In A Row.exe"
delete "$INSTDIR\background.tga"
delete "$INSTDIR\credits.jpg"
delete "$INSTDIR\intro.jpg"
delete "$INSTDIR\mainmenu.jpg"
delete "$INSTDIR\redist"

# second, remove the link from the desktop and start menu
delete "$DESKTOP\Four In A Row.lnk"
delete "$SMPROGRAMS\MooseMan Studios\Four In A Row.lnk"

# uninstaller section end
sectionEnd
moose517 is offline   Reply With Quote
 
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