Advertisement
Guest User

Untitled

a guest
Jun 18th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; TeamViewerQS_sv_100p_NSIS
  2. ;
  3. ; TeamViewer QuickSupport installer for 100 Procent Media AB
  4. ; Created by LPE
  5. ;
  6. ; The function of this installer is to put a shortcut on users desktop with 100 Procent Media AB branded icon
  7. ;
  8. ; Changelog
  9. ;
  10. ; 2010-09-29
  11. ;       * TeamViewerQS_sv_100p_NSIS.nsi created
  12. ;       First entry
  13. ;
  14. ; 2010-10-01
  15. ;       * SetShellVarContext
  16. ;       Used 'SetShellVarContext all' to install to all users, not just the one running the program
  17. ;-----------------------------
  18.  
  19. ; Name of the installer
  20. Name "100 Procent Support"
  21.  
  22. ; Changes installer and uninstaller icon
  23. Icon "install.ico"
  24. UninstallIcon "uninstall.ico"
  25.  
  26. ; Changes the caption, default beeing 'Setup'
  27. Caption "100 Procent Support"
  28.  
  29. ; Set as silent install/uninstall
  30. ;SilentInstall silent
  31. ;SilentUnInstall silent
  32.  
  33. ; Output file
  34. OutFile "100 Procent Support.exe"
  35.  
  36. ; Default installation directory
  37. InstallDir "$PROGRAMFILES\100 Procent Media AB"
  38.  
  39. ; Request application privileges
  40. RequestExecutionLevel admin
  41.  
  42. ;-----------------------------
  43.  
  44. ; Pages
  45.  
  46. Page directory
  47. Page instfiles
  48.  
  49. UninstPage uninstConfirm
  50. UninstPage instfiles
  51.  
  52. ;-----------------------------
  53.  
  54. ; What to install
  55.  
  56. Section "Install"
  57.  
  58. ; Installs to every user
  59. SetShellVarContext all
  60.  
  61. SetOutPath $INSTDIR
  62.  
  63. ; Put file in directory
  64.  
  65. File "TeamViewerQS_sv.exe"
  66. File "install.ico"
  67. File "uninstall.ico"
  68.  
  69. ; Create desktop shortcut
  70.  
  71. CreateShortCut "$DESKTOP\100 Procent Support.lnk" "$INSTDIR\TeamViewerQS_sv.exe" "" "$INSTDIR\install.ico"
  72.  
  73. ; Create Startmenu shortcuts
  74.  
  75. CreateDirectory "$SMPROGRAMS\100 Procent Support"
  76. CreateShortCut "$SMPROGRAMS\100 Procent Support\100 Procent Support.lnk" "$INSTDIR\TeamViewerQS_sv.exe" "" "$INSTDIR\install.ico"
  77. CreateShortCut "$SMPROGRAMS\100 Procent Support\Avinstallera.lnk" "$INSTDIR\Uninstall.exe"
  78.  
  79. ; Create uninstaller
  80. WriteUninstaller $INSTDIR\Uninstall.exe
  81.  
  82. ; Write registrykeys for Add/Remove -programs at the Control Panel
  83. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\100procentsupport" \
  84.                  "DisplayName" "100 Procent Media Support"
  85. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\100procentsupport" \
  86.                  "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
  87. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\100procentsupport" \
  88.                  "DisplayIcon" "$\"$INSTDIR\install.ico$\""
  89.                  
  90. ; Send message to user
  91. MessageBox MB_OK|MB_USERICON  "100 Procent Support installerat utan fel"
  92.  
  93. SectionEnd
  94.  
  95. ;-----------------------------
  96.  
  97. ; Uninstall
  98.  
  99.  
  100. Section "Uninstall"
  101.  
  102. ; Delete program files
  103. Delete "$INSTDIR\TeamViewerQS_sv.exe"
  104. Delete "$INSTDIR\install.ico"
  105. Delete "$INSTDIR\uninstall.ico"
  106.  
  107. ; Delete desktop shortcut
  108. Delete "$DESKTOP\100 Procent Support.lnk"
  109.  
  110. ; Delete Startmenu shortcuts
  111. Delete "$SMPROGRAMS\100 Procent Support\100 Procent Support.lnk"
  112. Delete "$SMPROGRAMS\100 Procent Support\Avinstallera.lnk"
  113. RMDir "$SMPROGRAMS\100 Procent Support"
  114.  
  115. DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\100procentsupport"
  116.  
  117. ; Delete uninstaller
  118. Delete "$INSTDIR\Uninstall.exe"
  119.  
  120. ; Delete installationdirectory
  121. RMDir $INSTDIR
  122.  
  123. ; Send message to user
  124. MessageBox MB_OK|MB_USERICON  "100 Procent Support avinstallerat utan fel"
  125.  
  126. SectionEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement