Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; TeamViewerQS_sv_100p_NSIS
- ;
- ; TeamViewer QuickSupport installer for 100 Procent Media AB
- ; Created by LPE
- ;
- ; The function of this installer is to put a shortcut on users desktop with 100 Procent Media AB branded icon
- ;
- ; Changelog
- ;
- ; 2010-09-29
- ; * TeamViewerQS_sv_100p_NSIS.nsi created
- ; First entry
- ;
- ; 2010-10-01
- ; * SetShellVarContext
- ; Used 'SetShellVarContext all' to install to all users, not just the one running the program
- ;-----------------------------
- ; Name of the installer
- Name "100 Procent Support"
- ; Changes installer and uninstaller icon
- Icon "install.ico"
- UninstallIcon "uninstall.ico"
- ; Changes the caption, default beeing 'Setup'
- Caption "100 Procent Support"
- ; Set as silent install/uninstall
- ;SilentInstall silent
- ;SilentUnInstall silent
- ; Output file
- OutFile "100 Procent Support.exe"
- ; Default installation directory
- InstallDir "$PROGRAMFILES\100 Procent Media AB"
- ; Request application privileges
- RequestExecutionLevel admin
- ;-----------------------------
- ; Pages
- Page directory
- Page instfiles
- UninstPage uninstConfirm
- UninstPage instfiles
- ;-----------------------------
- ; What to install
- Section "Install"
- ; Installs to every user
- SetShellVarContext all
- SetOutPath $INSTDIR
- ; Put file in directory
- File "TeamViewerQS_sv.exe"
- File "install.ico"
- File "uninstall.ico"
- ; Create desktop shortcut
- CreateShortCut "$DESKTOP\100 Procent Support.lnk" "$INSTDIR\TeamViewerQS_sv.exe" "" "$INSTDIR\install.ico"
- ; Create Startmenu shortcuts
- CreateDirectory "$SMPROGRAMS\100 Procent Support"
- CreateShortCut "$SMPROGRAMS\100 Procent Support\100 Procent Support.lnk" "$INSTDIR\TeamViewerQS_sv.exe" "" "$INSTDIR\install.ico"
- CreateShortCut "$SMPROGRAMS\100 Procent Support\Avinstallera.lnk" "$INSTDIR\Uninstall.exe"
- ; Create uninstaller
- WriteUninstaller $INSTDIR\Uninstall.exe
- ; Write registrykeys for Add/Remove -programs at the Control Panel
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\100procentsupport" \
- "DisplayName" "100 Procent Media Support"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\100procentsupport" \
- "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\100procentsupport" \
- "DisplayIcon" "$\"$INSTDIR\install.ico$\""
- ; Send message to user
- MessageBox MB_OK|MB_USERICON "100 Procent Support installerat utan fel"
- SectionEnd
- ;-----------------------------
- ; Uninstall
- Section "Uninstall"
- ; Delete program files
- Delete "$INSTDIR\TeamViewerQS_sv.exe"
- Delete "$INSTDIR\install.ico"
- Delete "$INSTDIR\uninstall.ico"
- ; Delete desktop shortcut
- Delete "$DESKTOP\100 Procent Support.lnk"
- ; Delete Startmenu shortcuts
- Delete "$SMPROGRAMS\100 Procent Support\100 Procent Support.lnk"
- Delete "$SMPROGRAMS\100 Procent Support\Avinstallera.lnk"
- RMDir "$SMPROGRAMS\100 Procent Support"
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\100procentsupport"
- ; Delete uninstaller
- Delete "$INSTDIR\Uninstall.exe"
- ; Delete installationdirectory
- RMDir $INSTDIR
- ; Send message to user
- MessageBox MB_OK|MB_USERICON "100 Procent Support avinstallerat utan fel"
- SectionEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement