Archive: embedding installer help


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


bump? anyone?


Originally posted by moose517
bump? anyone?
Don't be an ass, don't bump threads, you are lucky I'm even responding now

http://nsis.sourceforge.net/Shortcut..._Windows_Vista

for silent installs, check http://unattended.sourceforge.net/installers.php

sorry if i sounded rude, i just though the thread had dropped enough to try and get it back to the top to see if anyone had a solution. I tried doing what is described in the first link with the requestexectutionLevel but now when i install it the start menu files fail to be created or deleted. And one more question, i can't get the registry write to work to be able to use the add/remove programs, i followed the example in the documentation to a T and it don't work.


NVM, i got it, thanks for your help any ways


Ok, so i thought that i had it, i ran it on an older computer and apparantly it didn't install the dx runtime, do i need to include all the cab files and dlls that are listed in the nsi file for it to be able to install them correctly? grr i thought creating a installer would be easy not hard


Just extract all the required files to $PLUGINSDIR and then run the main executable/msi with the correct switches to make it run silent. What could be easier?

InitPluginsDir
SetOutPath $PLUGINSDIR
File ...
File ...
ExecWait `"$PLUGINSDIR\..." ...` $R0
${If} $R0 != 0
MessageBox MB_OK error
${EndIf}

Stu