This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
userspace:tortoise-svn [2012/10/04 11:33] bhubal |
userspace:tortoise-svn [2021/08/23 08:37] (current) |
||
---|---|---|---|
Line 150: | Line 150: | ||
endif | endif | ||
endif | endif | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== delsub.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:// | ||
+ | |||
+ | comment " | ||
+ | set $MsiIdList$ = createStringList(' | ||
+ | set $MsiIdList$ = addtolist($MsiIdList$,' | ||
+ | set $MsiIdList$ = addtolist($MsiIdList$,' | ||
+ | set $MsiIdList$ = addtolist($MsiIdList$,' | ||
+ | |||
+ | comment " | ||
+ | set $MsiIdRegList$ = getRegistryKeyList32(" | ||
+ | set $MsiIdRegList$ = addListToList($MsiIdRegList$, | ||
+ | |||
+ | comment " | ||
+ | for %s% in $MsiIdList$ do sub_uninstall | ||
+ | |||
+ | [sub_uninstall] | ||
+ | if not ("" | ||
+ | comment "MSI id %s% found in registry, starting msiexec to uninstall" | ||
+ | if not ("" | ||
+ | comment " | ||
+ | Exitwindows /Reboot | ||
+ | endif | ||
+ | set $MsiId$ = " | ||
+ | ExecWith_autoit_close_window " | ||
+ | Winbatch_uninstall_msi | ||
+ | killtask " | ||
+ | sub_check_exitcode | ||
+ | includelog $LogDir$+" | ||
+ | endif | ||
+ | |||
+ | [Winbatch_uninstall_msi] | ||
+ | msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress | ||
+ | |||
+ | [ExecWith_autoit_close_window] | ||
+ | ; exact title match | ||
+ | ; | ||
+ | $mylog = FileOpen(" | ||
+ | FileWriteLine($mylog," | ||
+ | ; do not use winwait(), it will fail on other desktops than current | ||
+ | $seconds = 0 | ||
+ | $exists = 0 | ||
+ | While ($seconds <= 300) and ($exists = 0) | ||
+ | $exists = WinExists(" | ||
+ | FileWriteLine($mylog," | ||
+ | $seconds = $seconds + 1 | ||
+ | sleep(1000) | ||
+ | WEnd | ||
+ | FileWriteLine($mylog," | ||
+ | ; next | ||
+ | $result = ControlClick(" | ||
+ | FileWriteLine($mylog," | ||
+ | Blockinput(0) | ||
+ | FileClose($mylog) | ||
+ | ;Sleep(500) | ||
+ | ;and good bye | ||
+ | Exit @error | ||
+ | |||
+ | [Sub_check_exitcode] | ||
+ | comment "Test for installation success via exit code" | ||
+ | set $ExitCode$ = getLastExitCode | ||
+ | ; informations to exit codes see | ||
+ | ; http:// | ||
+ | ; http:// | ||
+ | if ($ExitCode$ = " | ||
+ | comment "Looks good: setup program gives exitcode zero" | ||
+ | else | ||
+ | comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ | ||
+ | if ($ExitCode$ = " | ||
+ | comment " | ||
+ | comment " | ||
+ | else | ||
+ | if ($ExitCode$ = " | ||
+ | comment "looks good: setup program gives exitcode 1641" | ||
+ | comment " | ||
+ | else | ||
+ | if ($ExitCode$ = " | ||
+ | comment "looks good: setup program gives exitcode 3010" | ||
+ | comment " | ||
+ | else | ||
+ | logError " | ||
+ | isFatalError "Exit Code=" + $ExitCode$ | ||
+ | endif | ||
+ | endif | ||
+ | endif | ||
+ | endif | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== uninstall.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:// | ||
+ | |||
+ | [Actions] | ||
+ | requiredWinstVersion >= " | ||
+ | |||
+ | DefVar $LogDir$ | ||
+ | DefVar $ExitCode$ | ||
+ | DefVar $ProductId$ | ||
+ | DefVar $InstallDir32$ | ||
+ | DefVar $InstallDir64$ | ||
+ | DefVar $LicenseRequired$ | ||
+ | DefVar $LicensePool$ | ||
+ | DefVar $INST_SystemType$ | ||
+ | DefVar $INST_architecture$ | ||
+ | DefVar $MsiId$ | ||
+ | |||
+ | DefStringlist $MsiIdList$ | ||
+ | DefStringlist $MsiIdRegList$ | ||
+ | |||
+ | Set $INST_SystemType$ = GetSystemType | ||
+ | set $INST_architecture$ = GetProductProperty(" | ||
+ | |||
+ | |||
+ | Set $LogDir$ = " | ||
+ | |||
+ | ; ---------------------------------------------------------------- | ||
+ | ; - Please edit the following values | ||
+ | ; ---------------------------------------------------------------- | ||
+ | Set $ProductId$ | ||
+ | Set $InstallDir32$ | ||
+ | Set $InstallDir64$ | ||
+ | ; ---------------------------------------------------------------- | ||
+ | |||
+ | |||
+ | comment "Show product picture" | ||
+ | ShowBitmap " | ||
+ | |||
+ | Message " | ||
+ | |||
+ | if FileExists(" | ||
+ | comment "Start uninstall sub section" | ||
+ | Sub " | ||
+ | endif | ||
+ | |||
+ | [Winbatch_uninstall_msi] | ||
+ | msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress | ||
+ | |||
</ | </ |