This shows you the differences between two versions of the page.
userspace:ccleaner325 [2012/12/21 11:59] bobzbobz |
userspace:ccleaner325 [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== CCleaner 3.25 ====== | ||
- | //Scripts by Soren Birk// | ||
- | For this version i used CCleaner Slim version which can be downloaded from Piriform [[http:// | ||
- | |||
- | Tested with: | ||
- | * OPSI 4.0.2.4 | ||
- | * Winst 4.11.3.3 | ||
- | * Windows 7, 32 and 64-Bit | ||
- | |||
- | Edit the commented section about ini-files if you want to customize the rules for cleaning (how the program cleans the PC). | ||
- | |||
- | Take a look at [[http:// | ||
- | |||
- | Tree: | ||
- | < | ||
- | CLIENT_DATA | ||
- | ├ setup3264.ins | ||
- | ├ uninstall3264.ins | ||
- | ├ delsub3264.ins | ||
- | ├ ccleanerlogo.png | ||
- | └ ccsetup325_slim.exe | ||
- | </ | ||
- | |||
- | ==== setup3264.ins ==== | ||
- | <code winst> | ||
- | ; Author Soren Birk | ||
- | |||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $UninstallProgram32$ | ||
- | DefVar $UninstallProgram64$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $MinimumSpace$ | ||
- | DefVar $InstallDir32$ | ||
- | DefVar $InstallDir64$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $INST_SystemType$ | ||
- | DefVar $INST_architecture$ | ||
- | |||
- | Set $INST_SystemType$ = GetSystemType | ||
- | set $INST_architecture$ = GetProductProperty(" | ||
- | |||
- | |||
- | Set $LogDir$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; - Please edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | Set $ProductId$ | ||
- | Set $MinimumSpace$ | ||
- | Set $InstallDir32$ | ||
- | Set $InstallDir64$ | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | if not(HasMinimumSpace (" | ||
- | LogError "Not enough space on %SystemDrive%, | ||
- | isFatalError | ||
- | else | ||
- | comment "Show productlogo" | ||
- | ShowBitmap " | ||
- | |||
- | if FileExists(" | ||
- | comment "Start uninstall sub section" | ||
- | Sub " | ||
- | endif | ||
- | |||
- | comment " | ||
- | |||
- | if (($INST_SystemType$ = "x86 System" | ||
- | Message " | ||
- | |||
- | comment "Start setup program" | ||
- | ChangeDirectory " | ||
- | Winbatch_install_32 | ||
- | Sub_check_exitcode | ||
- | |||
- | comment " | ||
- | Registry_install /32Bit | ||
- | |||
- | ; comment " | ||
- | ; Dosbatch_export_32 | ||
- | |||
- | ; comment " | ||
- | ; Patches_ini_32 $InstallDir32$\inifile.ini | ||
- | endif | ||
- | |||
- | if ($INST_SystemType$ = "64 Bit System" | ||
- | Message " | ||
- | |||
- | comment "Start setup program" | ||
- | ChangeDirectory " | ||
- | Winbatch_install_64 | ||
- | Sub_check_exitcode | ||
- | |||
- | comment " | ||
- | Registry_install /64Bit | ||
- | |||
- | ; comment " | ||
- | ; Dosbatch_export_64 | ||
- | |||
- | ; comment " | ||
- | ; Patches_ini_64 $InstallDir64$\inifile.ini | ||
- | endif | ||
- | |||
- | comment " | ||
- | LinkFolder_remove_desktop_link | ||
- | endif | ||
- | |||
- | [Winbatch_install_32] | ||
- | ; Change the language by editing the Locale ID | ||
- | ; List of supported LCID' | ||
- | ; L=1031 is English | ||
- | " | ||
- | |||
- | [Winbatch_install_64] | ||
- | ; (To-Do Change LCID) | ||
- | " | ||
- | |||
- | [Registry_install] | ||
- | openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Piriform\CCleaner] | ||
- | set " | ||
- | |||
- | [DosBatch_export_32] | ||
- | ; " | ||
- | |||
- | [DosBatch_export_64] | ||
- | ; " | ||
- | |||
- | [Patches_ini_32] | ||
- | ; set [property] [parameter] | ||
- | |||
- | [Patches_ini_64] | ||
- | ; set [property] [parameter] | ||
- | |||
- | |||
- | [LinkFolder_remove_desktop_link] | ||
- | set_basefolder common_desktopdirectory | ||
- | set_subfolder "" | ||
- | delete_element " | ||
- | |||
- | [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 | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | </ | ||
- | |||
- | ==== uninstall3264.ins ==== | ||
- | <code winst> | ||
- | ; Author Soren Birk | ||
- | |||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $UninstallProgram32$ | ||
- | DefVar $UninstallProgram64$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $InstallDir32$ | ||
- | DefVar $InstallDir64$ | ||
- | DefVar $INST_SystemType$ | ||
- | DefVar $INST_architecture$ | ||
- | |||
- | Set $INST_SystemType$ = GetSystemType | ||
- | set $INST_architecture$ = GetProductProperty(" | ||
- | |||
- | |||
- | Set $LogDir$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; - Please edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | Set $ProductId$ | ||
- | Set $InstallDir32$ | ||
- | Set $InstallDir64$ | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | |||
- | comment "Show productlogo" | ||
- | ShowBitmap " | ||
- | |||
- | Message " | ||
- | |||
- | if FileExists(" | ||
- | comment "Start uninstall sub section" | ||
- | Sub " | ||
- | endif | ||
- | </ | ||
- | |||
- | ==== delsub3264.ins ==== | ||
- | <code winst> | ||
- | ; Author Soren Birk | ||
- | |||
- | |||
- | Set $UninstallProgram32$ = $InstallDir32$ + " | ||
- | |||
- | Set $UninstallProgram64$ = $InstallDir64$ + " | ||
- | |||
- | if (($INST_SystemType$ = "x86 System" | ||
- | Message " | ||
- | |||
- | if FileExists($UninstallProgram32$) | ||
- | comment " | ||
- | Winbatch_uninstall_32 / | ||
- | sub_check_exitcode | ||
- | endif | ||
- | endif | ||
- | |||
- | if ($INST_SystemType$ = "64 Bit System" | ||
- | Message " | ||
- | |||
- | if FileExists($UninstallProgram64$) | ||
- | comment " | ||
- | Winbatch_uninstall_64 / | ||
- | sub_check_exitcode | ||
- | endif | ||
- | endif | ||
- | |||
- | [Winbatch_uninstall_32] | ||
- | " | ||
- | |||
- | [Winbatch_uninstall_64] | ||
- | " | ||
- | |||
- | [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 | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | </ |