|
|||||||
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Apr 2009
Location: RO
Posts: 37
|
Hello everyone,
I want to create an NSIS script and I need your help: I have next files: file1.exe file2.exe file3.dll file4.dll file5.dat file6.dat and I want all files to be added to an installer with the next options: The installer should extract all files to temp folder, then the file "file1.exe" should start, then the files should be copied/moved to the Windows/system32 folder and deleted from temp folder, then file2.exe should start. I use the next NSIS script to create an installer that extract the files on Windows temp folder and then run file1.exe but don't know how to update it to copy/move the files to Windows\system32 folder and then run file2.exe Here is the script so please any help to update it or give me a new solution will be highly appreciated. Here is the script: OutFile "installer.exe" Icon "name.ico" SilentInstall Silent WindowIcon Off CRCCheck On SetCompress Off RequestExecutionLevel highest Section ; Generate a temp file name GetTempFileName $0 ; Delete it and replace it with a folder Delete $0 CreateDirectory $0 ; Report any problem IFErrors 0 +2 Abort "Can't install application! Please contact support." ; Unpack files SetOutPath $0 ; Pack all the files in the current directory and its subdirectories, ; excluding anything in SVN ; File /r /x .svn "*.*" File /r /x .svn /x *.ico /x *.nsi "*.*" ; Also exclude the ICO and NSI files from installer ; Run the executable and wait ClearErrors SetOutPath "$0\" ; IMPORTANT: Place the name of your starting executable (i.e. the file to run ; when unpacked) here. ExecWait "$0\file1.exe" IFErrors 0 +2 Abort "Can't run app! Please contact support." ; And delete the unpacked files ClearErrors SetOutPath $TEMP ; Need to do this because we can't delete the working folder RMDir /r $0 ; If there's an error we probably don't really care, as it's in a temp folder SectionEnd Thank you in advance for your help. If anyone can offer me real support then I can pay him for the time spent for me! Thanks! |
|
|
|
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|