Help - Search - Members - Calendar
Full Version: [REQ] S&M 1.9 StressTest
MSFN Forums > Member Contributed Projects > nLite > Application Add-Ons

   
Google Internet Forums Unattended CD/DVD Guide
theSLug
homepage:
http://testmem.narod.ru/snm.htm

download:
http://www.benchmarkhq.ru
www.softportal.com



the best stress&stability test IMHO.


tnx in advance

theSLug
geezery
You can make these addons by yourself. Here is a small tutorial for this program.

1. Extract the files from it to C:\S&M\
2. Download NSIS
3. Install NSIS
4. Open Notepad and prepare to write some NSIS scripting:)

I tried to put comments as much as I can

CODE
;S&M_installscipt.nsi
;
;Sample NSIS silent installation script by Geezery
;
;Name of the program
Name "S&M - Stress test v1.8.1 beta"

;Name of the executable file
OutFile "S&M_setup.exe"

;Installation path
InstallDir "$PROGRAMFILES\S&M\"

;Silent installation / uninstallation by default. You don't need any installation switches for example "/S"
SilentInstall silent
SilentUnInstall silent

;Name of the Installation section
Section "Installation"

;Select the files you want to include to your installation (Local path = Where the files are in your hard disk)
SetOutPath "$INSTDIR"
File "C:\S&M\S&M.exe"
File "C:\S&M\README.txt"
File "C:\S&M\DLL\Core2.bin"
File "C:\S&M\DLL\INPORT32.DLL"
File "C:\S&M\DLL\IO.DLL"

;We need to add this, if we want to include the uninstaller.
WriteUninstaller "S&M-uninst.exe"

;Here we write the needed registry information, so we can remove the program from the Add / Remove Control Panel applet.

  WriteRegStr HKLM "${REG_UNINSTALL}" "DisplayName" "Add/Remove Example"
  WriteRegStr HKLM "${REG_UNINSTALL}" "DisplayIcon" "$INSTDIR\S&M-uninst.exe"
  WriteRegStr HKLM "${REG_UNINSTALL}" "DisplayVersion" "1.8.1 beta"
  WriteRegStr HKLM "${REG_UNINSTALL}" "Publisher" "S&M - Stress test"
  WriteRegStr HKLM "${REG_UNINSTALL}" "InstallSource" "$EXEDIR\"

;Under WinXP this creates two separate buttons: "Modify" and "Remove".
;"Modify" will run installer and "Remove" will run uninstaller.
  WriteRegDWord HKLM "${REG_UNINSTALL}" "NoModify" 0
  WriteRegDWord HKLM "${REG_UNINSTALL}" "NoRepair" 0
  WriteRegStr HKLM "${REG_UNINSTALL}" "UninstallString" \
'"$INSTDIR\S&M-uninst.exe"'
  WriteRegStr HKLM "${REG_UNINSTALL}" "ModifyPath" '"$EXEDIR\${InstFile}"'

;Here we can specify the shortcuts to create

;Creates a new group in Start Menu / Programs group called S&M
CreateDirectory "$SMPROGRAMS\S&M"
;Then we create shortcuts for uninstall and the program file.
CreateShortCut "$SMPROGRAMS\S&M\S&M.lnk" "$INSTDIR\S&M.exe"
SectionEnd


;Uninstallation Section - Here we specify, what we need to remove

Section "Uninstall"

;Deletes all the files

Delete "$INSTDIR\*.*"
RMDir "$INSTDIR"
Delete "$INSTDIR\DLL\*.*"
RMDir "$INSTDIR\DLL"

;Remove the links
Delete "$SMPROGRAMS\S&M\*.*"
RMDir "$SMPROGRAMS\S&M"

SectionEnd


5. Compile the script with NSIS

Click to view attachment

6. Now you should have these files in your c:\S&M\ directory

Click to view attachment

7. Then you must create the NLite addon. There is a nice tool called NLite Add-on Maker.

8. Copy the S&M_Setup.exe to C:\S&M\setup folder, because you don't need the other files in the Nlite Add-on.

9. Open the prog and make the following changes:

Click to view attachment

Then press Make File and choose a folder to place the .cab file.

Now you should have a nice NLite addon to put in your unattended windows installation.
Gorki
geezery would it be possible to add some entry so program can be uninstaled from CP (add/remove programs),not just via start/programs or folder uninstaler shortcut? blink.gif
BTW nice turtorial newwink.gif
geezery
I added the Add / Remove also to the example. Nice to notice someone else has watched this topic.

Here is the URL for the NSIS Add / Remove example. http://nsis.sourceforge.net/Add/Remove_Functionality

I didn't test the script. I also removed the uninstall icon from the start menu.
Gorki
Yes I'm triying to use this script as a template for other programs that do not have installer. smile.gif
hmm..thanks for the info,I just test script and ai get 10 warnings i the end and no uninstall entries in CP?
here is the end of warning log. Other than that it installs fine,no problem.

QUOTE
10 warnings:
unknown variable/constant "{REG_UNINSTALL}" detected, ignoring (C:\S&M\comp.nsi:34)
unknown variable/constant "{REG_UNINSTALL}" detected, ignoring (C:\S&M\comp.nsi:35)
unknown variable/constant "{REG_UNINSTALL}" detected, ignoring (C:\S&M\comp.nsi:36)
unknown variable/constant "{REG_UNINSTALL}" detected, ignoring (C:\S&M\comp.nsi:37)
unknown variable/constant "{REG_UNINSTALL}" detected, ignoring (C:\S&M\comp.nsi:38)
unknown variable/constant "{REG_UNINSTALL}" detected, ignoring (C:\S&M\comp.nsi:42)
unknown variable/constant "{REG_UNINSTALL}" detected, ignoring (C:\S&M\comp.nsi:43)
unknown variable/constant "{REG_UNINSTALL}" detected, ignoring (C:\S&M\comp.nsi:45)
unknown variable/constant "{REG_UNINSTALL}" detected, ignoring (C:\S&M\comp.nsi:46)
unknown variable/constant "{InstFile}" detected, ignoring (C:\S&M\comp.nsi:46)

and ...comp is script name in S&M folder wacko.gif

Thank U
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.