This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
userspace:notepad2 [2012/07/12 14:09] SisterOfMercy |
userspace:notepad2 [2014/05/28 22:26] SisterOfMercy |
||
---|---|---|---|
Line 11: | Line 11: | ||
<code winst> | <code winst> | ||
[Package] | [Package] | ||
- | version: | + | version: |
depends: | depends: | ||
incremental: | incremental: | ||
Line 18: | Line 18: | ||
type: localboot | type: localboot | ||
id: notepad2 | id: notepad2 | ||
- | name: Notepad2 Editor | + | name: Notepad2 |
- | description: | + | description: |
advice: | advice: | ||
version: 4.2.25 | version: 4.2.25 | ||
- | priority: | + | priority: |
licenseRequired: | licenseRequired: | ||
productClasses: | productClasses: | ||
- | setupScript: | + | setupScript: |
- | uninstallScript: | + | uninstallScript: |
updateScript: | updateScript: | ||
alwaysScript: | alwaysScript: | ||
Line 32: | Line 32: | ||
customScript: | customScript: | ||
userLoginScript: | userLoginScript: | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: install_architecture | ||
- | multivalue: False | ||
- | editable: True | ||
- | description: | ||
- | values: ["32 only", "64 only", " | ||
- | default: [" | ||
[Changelog] | [Changelog] | ||
Line 47: | Line 38: | ||
* Initial package | * Initial package | ||
- | -- ICT <ict@your-mom.com> Thu, 21 Jun 2012 03:03:14 +0000 | + | -- ICT <ict@gcecad-service.nl> Thu, 03 Apr 2014 19:01:31 +0000 |
- | </ | + | </ |
- | ==== setup.ins ==== | + | ==== setup3264.ins ==== |
<code winst> | <code winst> | ||
+ | ; Copyright (c) uib gmbh (www.uib.de) | ||
+ | ; This sourcecode is owned by uib | ||
+ | ; and published under the Terms of the General Public License. | ||
+ | ; credits: http:// | ||
+ | ; | ||
+ | ; License Management removed | ||
+ | |||
+ | |||
[Actions] | [Actions] | ||
requiredWinstVersion >= " | requiredWinstVersion >= " | ||
+ | ;DefVar $MsiId32$ | ||
+ | ;DefVar $UninstallProgram32$ | ||
+ | ;DefVar $MsiId64$ | ||
+ | ;DefVar $UninstallProgram64$ | ||
DefVar $LogDir$ | DefVar $LogDir$ | ||
DefVar $ProductId$ | DefVar $ProductId$ | ||
Line 64: | Line 67: | ||
DefVar $ExitCode$ | DefVar $ExitCode$ | ||
DefVar $INST_SystemType$ | DefVar $INST_SystemType$ | ||
- | DefVar $INST_architecture$ | + | ;DefVar $INST_architecture$ |
+ | DefVar $INST_MsVersion$ | ||
+ | set $INST_MsVersion$ = GetMsVersionInfo | ||
Set $INST_SystemType$ = GetSystemType | Set $INST_SystemType$ = GetSystemType | ||
- | set $INST_architecture$ = GetProductProperty(" | + | ;set $INST_architecture$ = GetProductProperty(" |
Set $LogDir$ = " | Set $LogDir$ = " | ||
Line 77: | Line 82: | ||
; no white space use ' | ; no white space use ' | ||
Set $ProductId$ | Set $ProductId$ | ||
- | Set $MinimumSpace$ | + | Set $MinimumSpace$ |
; the path were we find the product after the installation | ; the path were we find the product after the installation | ||
Set $InstallDir32$ | Set $InstallDir32$ | ||
Line 87: | Line 92: | ||
isFatalError | isFatalError | ||
; Stop process and set installation status to failed | ; Stop process and set installation status to failed | ||
- | else | ||
- | comment "Show product picture" | ||
- | ShowBitmap " | ||
- | comment " | ||
- | |||
- | if (($INST_SystemType$ = "x86 System" | ||
- | Message " | ||
- | comment "Start setup program" | ||
- | Winbatch_install_32 | ||
- | Sub_check_exitcode | ||
- | comment "Copy files" | ||
- | Files_install_32 /32Bit | ||
- | comment "Copy files to all userprofiles" | ||
- | Files_install_allusers / | ||
endif | endif | ||
+ | if $INST_MsVersion$ < " | ||
+ | LogError " | ||
+ | isFatalError | ||
+ | endif | ||
+ | |||
+ | comment "Show product picture" | ||
+ | ShowBitmap " | ||
- | if ($INST_SystemType$ = "64 Bit System" | + | if FileExists("%ScriptPath%\delsub3264.ins") |
- | Message " | + | comment " |
- | comment " | + | Sub "%ScriptPath%\delsub3264.ins" |
- | Winbatch_install_64 | + | endif |
- | Sub_check_exitcode | + | |
- | comment | + | |
- | Files_install_64 /64Bit | + | |
- | comment "Copy files to all userprofiles" | + | |
- | Files_install_allusers / | + | |
- | endif | + | |
+ | comment " | ||
+ | |||
+ | if ($INST_SystemType$ = "x86 System" | ||
+ | ;and ($INST_architecture$ = " | ||
+ | Message " | ||
+ | comment "Start setup program" | ||
+ | Winbatch_install_32 | ||
+ | Sub_check_exitcode | ||
+ | comment "Copy files" | ||
+ | Files_install_32 /32Bit | ||
+ | comment "Patch Registry" | ||
+ | Registry_install /32Bit | ||
+ | comment "Copy files to all userprofiles" | ||
+ | Files_install_allusers / | ||
+ | comment " | ||
+ | LinkFolder_install | ||
endif | endif | ||
+ | |||
+ | if ($INST_SystemType$ = "64 Bit System" | ||
+ | ;and (($INST_architecture$ = " | ||
+ | Message " | ||
+ | comment "Start setup program" | ||
+ | Winbatch_install_64 | ||
+ | Sub_check_exitcode | ||
+ | comment "Copy files" | ||
+ | Files_install_64 /64Bit | ||
+ | comment "Patch Registry" | ||
+ | Registry_install /64Bit | ||
+ | comment "Copy files to all userprofiles" | ||
+ | Files_install_allusers / | ||
+ | comment " | ||
+ | LinkFolder_install | ||
+ | endif | ||
+ | |||
[Winbatch_install_32] | [Winbatch_install_32] | ||
Line 131: | Line 156: | ||
copy -s " | copy -s " | ||
+ | [Registry_install] | ||
+ | ; Example of setting some values of an registry key: | ||
+ | ; | ||
+ | ; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] | ||
+ | ; set " | ||
+ | ; set " | ||
+ | ; set " | ||
+ | [LinkFolder_install] | ||
+ | ; Example of deleting a folder from AllUsers startmenu: | ||
+ | ; | ||
+ | ; set_basefolder common_programs | ||
+ | ; delete_subfolder $ProductId$ | ||
+ | ; | ||
+ | ; Example of creating an shortcut to the installed exe in AllUsers startmenu: | ||
+ | ; | ||
+ | ; set_basefolder common_programs | ||
+ | ; set_subfolder $ProductId$ | ||
+ | ; | ||
+ | ; set_link | ||
+ | ; name: $ProductId$ | ||
+ | ; target: <path to the program> | ||
+ | ; parameters: | ||
+ | ; working_dir: | ||
+ | ; icon_file: | ||
+ | ; icon_index: | ||
+ | ; end_link | ||
+ | ; | ||
+ | ; Example of creating an shortcut to the installed exe on AllUsers desktop: | ||
+ | ; | ||
+ | ; set_basefolder common_desktopdirectory | ||
+ | ; set_subfolder "" | ||
+ | ; | ||
+ | ; set_link | ||
+ | ; name: $ProductId$ | ||
+ | ; target: <path to the program> | ||
+ | ; parameters: | ||
+ | ; working_dir: | ||
+ | ; icon_file: <path to icon file> | ||
+ | ; icon_index: | ||
+ | ; end_link | ||
Line 164: | Line 229: | ||
</ | </ | ||
- | ==== uninstall.ins ==== | + | ==== uninstall3264.ins ==== |
- | <code winst> | + | <code winst>; Copyright (c) uib gmbh (www.uib.de) |
- | ; Copyright (c) uib gmbh (www.uib.de) | + | |
; This sourcecode is owned by uib gmbh | ; This sourcecode is owned by uib gmbh | ||
; and published under the Terms of the General Public License. | ; and published under the Terms of the General Public License. | ||
; credits: http:// | ; credits: http:// | ||
+ | ; | ||
+ | ; License Management removed | ||
[Actions] | [Actions] | ||
requiredWinstVersion >= " | requiredWinstVersion >= " | ||
- | DefVar $UninstallProgram32$ | + | ;DefVar $MsiId32$ |
- | DefVar $UninstallProgram64$ | + | ;DefVar $UninstallProgram32$ |
+ | ;DefVar $MsiId64$ | ||
+ | ;DefVar $UninstallProgram64$ | ||
DefVar $LogDir$ | DefVar $LogDir$ | ||
DefVar $ExitCode$ | DefVar $ExitCode$ | ||
Line 183: | Line 251: | ||
DefVar $InstallDir64$ | DefVar $InstallDir64$ | ||
DefVar $INST_SystemType$ | DefVar $INST_SystemType$ | ||
- | DefVar $INST_architecture$ | + | ;DefVar $INST_architecture$ |
Set $INST_SystemType$ = GetSystemType | Set $INST_SystemType$ = GetSystemType | ||
- | set $INST_architecture$ = GetProductProperty(" | + | ;set $INST_architecture$ = GetProductProperty(" |
+ | |||
Set $LogDir$ = " | Set $LogDir$ = " | ||
Line 196: | Line 266: | ||
Set $InstallDir64$ | Set $InstallDir64$ | ||
; ---------------------------------------------------------------- | ; ---------------------------------------------------------------- | ||
+ | |||
comment "Show product picture" | comment "Show product picture" | ||
ShowBitmap " | ShowBitmap " | ||
+ | |||
+ | Message " | ||
+ | |||
+ | if FileExists(" | ||
+ | comment "Start uninstall sub section" | ||
+ | Sub " | ||
+ | endif | ||
+ | </ | ||
+ | |||
+ | ==== delsub3264.ins ==== | ||
+ | |||
+ | <code winst> | ||
+ | ; Copyright (c) uib gmbh (www.uib.de) | ||
+ | ; This sourcecode is owned by uib gmbh | ||
+ | ; and published under the Terms of the General Public License. | ||
+ | ; credits: http:// | ||
+ | ; | ||
+ | ; License Management removed | ||
+ | |||
+ | DefVar $UninstallProgram32$ | ||
+ | DefVar $UninstallProgram64$ | ||
Set $UninstallProgram32$ = $InstallDir32$ + " | Set $UninstallProgram32$ = $InstallDir32$ + " | ||
Set $UninstallProgram64$ = $InstallDir64$ + " | Set $UninstallProgram64$ = $InstallDir64$ + " | ||
- | | + | |
- | if (($INST_SystemType$ = "x86 System" | + | if ($INST_SystemType$ = "x86 System" |
- | Message " | + | ;and ($INST_architecture$ = " |
+ | Message " | ||
if FileExists($UninstallProgram32$) | if FileExists($UninstallProgram32$) | ||
Line 211: | Line 304: | ||
sub_check_exitcode | sub_check_exitcode | ||
endif | endif | ||
+ | |||
+ | ; if not (GetRegistryStringValue32(" | ||
+ | ; comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall" | ||
+ | ; | ||
+ | ; | ||
+ | ; endif | ||
+ | |||
comment " | comment " | ||
+ | Files_uninstall_32 /32Bit | ||
Files_uninstall_allusers / | Files_uninstall_allusers / | ||
+ | comment " | ||
+ | Registry_uninstall /32Bit | ||
endif | endif | ||
- | + | if ($INST_SystemType$ = "64 Bit System" | |
- | if ($INST_SystemType$ = "64 Bit System" | + | ;and (($INST_architecture$ = " |
- | Message " | + | Message " |
if FileExists($UninstallProgram64$) | if FileExists($UninstallProgram64$) | ||
comment " | comment " | ||
- | ExecWith_uninstall_64 " | + | Winbatch_uninstall_64 |
sub_check_exitcode | sub_check_exitcode | ||
endif | endif | ||
- | + | ||
+ | ; if not (GetRegistryStringValue64(" | ||
+ | ; comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall" | ||
+ | ; | ||
+ | ; | ||
+ | ; endif | ||
+ | |||
comment " | comment " | ||
+ | Files_uninstall_64 /64Bit | ||
Files_uninstall_allusers / | Files_uninstall_allusers / | ||
+ | comment " | ||
+ | Registry_uninstall /64Bit | ||
endif | endif | ||
+ | |||
+ | comment " | ||
+ | LinkFolder_uninstall | ||
[Winbatch_uninstall_32] | [Winbatch_uninstall_32] | ||
rundll32.exe advpack.dll, | rundll32.exe advpack.dll, | ||
- | [ExecWith_uninstall_64] | + | [Files_uninstall_32] |
+ | ; Example for recursively deleting the installation directory (don't forget the trailing backslash): | ||
+ | ; | ||
+ | ; delete -sf " | ||
+ | |||
+ | [Winbatch_uninstall_64] | ||
rundll32.exe advpack.dll, | rundll32.exe advpack.dll, | ||
+ | |||
+ | [Files_uninstall_64] | ||
+ | ; Example for recursively deleting the installation directory (don't forget the trailing backslash): | ||
+ | ; | ||
+ | ; delete -sf " | ||
+ | |||
[Files_uninstall_allusers] | [Files_uninstall_allusers] | ||
- | delete -f "%UserProfileDir%\Application Data\Notepad2.ini" | + | delete -f "%AppdataDir%\Notepad2.ini" |
+ | |||
+ | [Registry_uninstall] | ||
+ | ; Example of deleting a registry key: | ||
+ | ; | ||
+ | ; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] | ||
+ | |||
+ | [LinkFolder_uninstall] | ||
+ | ; Example of deleting a folder from AllUsers startmenu: | ||
+ | ; | ||
+ | ; set_basefolder common_programs | ||
+ | ; delete_subfolder $ProductId$ | ||
+ | ; | ||
+ | ; Example of deleting a shortcut from AllUsers desktop: | ||
+ | ; | ||
+ | ; set_basefolder common_desktopdirectory | ||
+ | ; set_subfolder "" | ||
+ | ; delete_element $ProductId$ | ||
[Sub_check_exitcode] | [Sub_check_exitcode] | ||
Line 266: | Line 409: | ||
endif | endif | ||
endif | endif | ||
- | |||
</ | </ |