Jump to content

[REQ] S&M 1.9 StressTest


theSLug

Recommended Posts


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

;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

post-105112-1179747127_thumb.jpg

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

post-105112-1179747936_thumb.jpg

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:

post-105112-1179748398_thumb.jpg

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.

Edited by geezery
Link to comment
Share on other sites

  • 3 weeks later...

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:

BTW nice turtorial ;)

Link to comment
Share on other sites

Yes I'm triying to use this script as a template for other programs that do not have installer. :)

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.

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:

Thank U

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...