This shows you the differences between two versions of the page.
userspace:net_framework_3.5 [2012/08/18 17:11] MatCris |
userspace:net_framework_3.5 [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== .NetFramework 3.5 ====== | ||
- | **Versions**\\ | ||
- | By // | ||
- | |||
- | |||
- | Tested with opsi xxxxx\\ | ||
- | requiredWinstVersion >= 4.10.8.6 | ||
- | By // | ||
- | |||
- | Das Skript lässt sich wahrscheinlich noch ein wenig optimieren, funktioniert aber. | ||
- | |||
- | Das Setup-File wird im ScriptPath in einem Unterverzeichnis " | ||
- | |||
- | Tree:\\ | ||
- | delsub3264.ins\\ | ||
- | dotnet_framework_35.png\\ | ||
- | setup\dotnetfx35.exe\\ | ||
- | setup3264.ins\\ | ||
- | uninstall3264.ins | ||
- | |||
- | ==== setup3264.ins ==== | ||
- | <code winst> | ||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $MsiId32_1$ | ||
- | DefVar $MsiId32_2$ | ||
- | DefVar $MsiId32_3$ | ||
- | DefVar $MsiId32_4$ | ||
- | DefVar $MsiId32_5$ | ||
- | DefVar $MsiId32_6$ | ||
- | DefVar $MsiId64_1$ | ||
- | DefVar $MsiId64_2$ | ||
- | DefVar $MsiId64_3$ | ||
- | DefVar $MsiId64_4$ | ||
- | DefVar $MsiId64_5$ | ||
- | DefVar $MsiId64_6$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $MinimumSpace$ | ||
- | DefVar $InstallDir32$ | ||
- | DefVar $InstallDir64$ | ||
- | DefVar $SetupFile$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $INST_SystemType$ | ||
- | DefVar $INST_architecture$ | ||
- | |||
- | Set $INST_SystemType$ = GetSystemType | ||
- | Set $INST_architecture$ = GetProductProperty(" | ||
- | |||
- | Set $LogDir$ = " | ||
- | Set $ProductId$ | ||
- | Set $MinimumSpace$ | ||
- | Set $InstallDir32$ | ||
- | Set $InstallDir64$ | ||
- | Set $SetupFile$ = " | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | if not(HasMinimumSpace (" | ||
- | LogError "Not enough space on %SystemDrive%, | ||
- | isFatalError | ||
- | ; Stop process and set installation status to failed | ||
- | else | ||
- | comment "Show product picture" | ||
- | ShowBitmap " | ||
- | |||
- | if FileExists(" | ||
- | comment "Start uninstall sub section" | ||
- | Sub " | ||
- | endif | ||
- | |||
- | comment " | ||
- | |||
- | if (($INST_SystemType$ = "x86 System" | ||
- | Message " | ||
- | comment "Start setup program" | ||
- | |||
- | comment "Copy files" | ||
- | Files_copy_32 /32Bit | ||
- | |||
- | Winbatch_install_32 | ||
- | Sub_check_exitcode | ||
- | endif | ||
- | |||
- | if ($INST_SystemType$ = "64 Bit System" | ||
- | Message " | ||
- | comment "Start setup program" | ||
- | |||
- | comment "Copy files" | ||
- | Files_copy_64 /64Bit | ||
- | |||
- | Winbatch_install_64 | ||
- | Sub_check_exitcode | ||
- | endif | ||
- | endif | ||
- | |||
- | |||
- | [Files_copy_32] | ||
- | copy -s " | ||
- | |||
- | |||
- | [Winbatch_install_32] | ||
- | " | ||
- | |||
- | |||
- | [Files_copy_64] | ||
- | copy -s " | ||
- | |||
- | |||
- | [Winbatch_install_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 | ||
- | </ | ||
- | |||
- | |||
- | ==== delsub3264.ins ==== | ||
- | <code winst> | ||
- | Set $MsiId32_1$ = ' | ||
- | Set $MsiId32_2$ = ' | ||
- | Set $MsiId32_3$ = ' | ||
- | Set $MsiId32_4$ = ' | ||
- | Set $MsiId32_5$ = ' | ||
- | Set $MsiId32_6$ = ' | ||
- | |||
- | Set $MsiId64_1$ = ' | ||
- | Set $MsiId64_2$ = ' | ||
- | Set $MsiId64_3$ = ' | ||
- | Set $MsiId64_4$ = ' | ||
- | Set $MsiId64_5$ = ' | ||
- | Set $MsiId64_6$ = ' | ||
- | |||
- | |||
- | if (($INST_SystemType$ = "x86 System" | ||
- | Message " | ||
- | |||
- | if not (GetRegistryStringValue32(" | ||
- | comment "MSI id " + $MsiId32_1$ + " found in registry, starting msiexec to uninstall" | ||
- | Winbatch_uninstall_msi_32 | ||
- | sub_check_exitcode | ||
- | endif | ||
- | |||
- | comment " | ||
- | Files_delete_32 /32Bit | ||
- | |||
- | endif | ||
- | |||
- | if ($INST_SystemType$ = "64 Bit System" | ||
- | Message " | ||
- | |||
- | if not (GetRegistryStringValue64(" | ||
- | comment "MSI id " + $MsiId64_1$ + " found in registry, starting msiexec to uninstall" | ||
- | Winbatch_uninstall_msi_64 | ||
- | sub_check_exitcode | ||
- | endif | ||
- | |||
- | comment " | ||
- | Files_delete_64 /64Bit | ||
- | endif | ||
- | |||
- | |||
- | |||
- | [Winbatch_uninstall_msi_32] | ||
- | msiexec /x $MsiId32_1$ /qb! REBOOT=ReallySuppress | ||
- | msiexec /x $MsiId32_2$ /qb! REBOOT=ReallySuppress | ||
- | msiexec /x $MsiId32_3$ /qb! REBOOT=ReallySuppress | ||
- | msiexec /x $MsiId32_4$ /qb! REBOOT=ReallySuppress | ||
- | msiexec /x $MsiId32_5$ /qb! REBOOT=ReallySuppress | ||
- | msiexec /x $MsiId32_6$ /qb! REBOOT=ReallySuppress | ||
- | |||
- | |||
- | [Files_delete_32] | ||
- | delete -sf " | ||
- | |||
- | |||
- | [Winbatch_uninstall_msi_64] | ||
- | msiexec /x $MsiId64_1$ /qb! REBOOT=ReallySuppress | ||
- | msiexec /x $MsiId64_2$ /qb! REBOOT=ReallySuppress | ||
- | msiexec /x $MsiId64_3$ /qb! REBOOT=ReallySuppress | ||
- | msiexec /x $MsiId64_4$ /qb! REBOOT=ReallySuppress | ||
- | msiexec /x $MsiId64_5$ /qb! REBOOT=ReallySuppress | ||
- | msiexec /x $MsiId64_6$ /qb! REBOOT=ReallySuppress | ||
- | |||
- | |||
- | [Files_delete_64] | ||
- | delete -sf " | ||
- | |||
- | |||
- | [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> | ||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $MsiId32_1$ | ||
- | DefVar $MsiId32_2$ | ||
- | DefVar $MsiId32_3$ | ||
- | DefVar $MsiId32_4$ | ||
- | DefVar $MsiId32_5$ | ||
- | DefVar $MsiId32_6$ | ||
- | DefVar $MsiId64_1$ | ||
- | DefVar $MsiId64_2$ | ||
- | DefVar $MsiId64_3$ | ||
- | DefVar $MsiId64_4$ | ||
- | DefVar $MsiId64_5$ | ||
- | DefVar $MsiId64_6$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $InstallDir32$ | ||
- | DefVar $InstallDir64$ | ||
- | DefVar $SetupFile$ | ||
- | DefVar $INST_SystemType$ | ||
- | DefVar $INST_architecture$ | ||
- | |||
- | Set $INST_SystemType$ = GetSystemType | ||
- | set $INST_architecture$ = GetProductProperty(" | ||
- | |||
- | Set $LogDir$ = " | ||
- | Set $ProductId$ | ||
- | Set $InstallDir32$ | ||
- | Set $InstallDir64$ | ||
- | Set $SetupFile$ = " | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | comment "Show product picture" | ||
- | ShowBitmap " | ||
- | |||
- | Message " | ||
- | |||
- | if FileExists(" | ||
- | comment "Start uninstall sub section" | ||
- | Sub " | ||
- | endif | ||
- | </ |