This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
userspace:netfx_4.0 [2011/10/27 14:14] Thomas_H created |
userspace:netfx_4.0 [2021/08/23 08:37] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== .NetFX 4.0 ====== | ====== .NetFX 4.0 ====== | ||
+ | |||
+ | **Versions**\\ | ||
+ | By // | ||
+ | By // | ||
+ | |||
Tested with opsi 4.0.1\\ | Tested with opsi 4.0.1\\ | ||
requiredWinstVersion >= 4.10.8.6 | requiredWinstVersion >= 4.10.8.6 | ||
- | By // | + | By // |
+ | The installation-files can be downloaded at http:// | ||
+ | |||
+ | Special thanks to: joerg.ludwig for his code, to be found in the [[https:// | ||
Tree:\\ | Tree:\\ | ||
+ | AutoIt3.exe\\ | ||
delsub.ins\\ | delsub.ins\\ | ||
dotNetFX.jpg\\ | dotNetFX.jpg\\ | ||
Line 14: | Line 23: | ||
==== setup.ins ==== | ==== setup.ins ==== | ||
<code winst> | <code winst> | ||
- | |||
[Initial] | [Initial] | ||
LogLevel=9 | LogLevel=9 | ||
Line 50: | Line 58: | ||
DefVar $Uninst_Prg$ | DefVar $Uninst_Prg$ | ||
DefVar $LogDir$ | DefVar $LogDir$ | ||
+ | DefVar $opsiadminuser$ | ||
+ | DefVar $opsiadminpwd$ | ||
Set $INST_SystemType$ = GetSystemType | Set $INST_SystemType$ = GetSystemType | ||
Line 56: | Line 66: | ||
Set $LogDir$ = " | Set $LogDir$ = " | ||
+ | |||
; ---------------------------------------------------------------- | ; ---------------------------------------------------------------- | ||
; - Please edit the following values | ; - Please edit the following values | ||
Line 71: | Line 82: | ||
Set $LicensePool$ | Set $LicensePool$ | ||
Set $Inst_Prg$ | Set $Inst_Prg$ | ||
- | Set $Inst_Cmd32$ | + | Set $Inst_Cmd32$ |
- | Set $Inst_Cmd64$ | + | Set $Inst_Cmd64$ |
Set $Uninst_Cmd32$ | Set $Uninst_Cmd32$ | ||
Set $Uninst_Cmd64$ | Set $Uninst_Cmd64$ | ||
Set $Uninst_Prg$ | Set $Uninst_Prg$ | ||
+ | Set $opsiadminuser$ = " | ||
+ | Set $opsiadminpwd$ = randomstr | ||
; ---------------------------------------------------------------- | ; ---------------------------------------------------------------- | ||
Line 84: | Line 97: | ||
else | else | ||
comment "Show product picture" | comment "Show product picture" | ||
- | ShowBitmap " | + | ShowBitmap " |
if FileExists(" | if FileExists(" | ||
Line 98: | Line 111: | ||
comment " | comment " | ||
- | | + | |
- | | + | FilesCopy |
- | | + | Message " |
- | | + | comment "Start setup program" |
- | Sub_check_exitcode | + | DosBatchUserdel |
+ | DosBatchUseradd | ||
+ | DefStringList $res$ | ||
+ | Set $res$ = getOutStreamFromSection("ExecWithSetup ' | ||
+ | if count($res$) = "1" | ||
+ | DefVar $e$ | ||
+ | Set $e$ = takeString(0, | ||
+ | Comment "setup exit code: " + $e$ | ||
+ | if ($e$ = "1614") or ($e$ = "3010") | ||
+ | | ||
+ | | ||
+ | else | ||
+ | LogError | ||
+ | | ||
endif | endif | ||
- | + | DosBatchUserdel | |
- | if ($INST_SystemType$ = "64 Bit System" | + | |
- | Message " | + | if not(FileExists("%systemroot%\Microsoft.NET\Framework\v4.0.30319")) |
- | | + | |
- | | + | |
- | Sub_check_exitcode | + | |
endif | endif | ||
+ | FilesDelete | ||
+ | Sub_check_exitcode | ||
endif | endif | ||
- | [Winbatch_install_32] | + | [FilesCopy] |
- | %ScriptPath%\$Inst_Prg$ $Inst_Cmd32$ | + | copy "%ScriptPath%\dotNetFx40_Full_x86_x64.exe" |
+ | [DosBatchUseradd] | ||
+ | net user " | ||
+ | net localgroup Administratoren /add " | ||
- | [Winbatch_install_64] | + | [DosBatchUserdel] |
- | %ScriptPath%\$Inst_Prg$ $Inst_Cmd64$ | + | net user " |
+ | rmdir /s /q "%ProfileDir%\$opsiadminuser$" | ||
+ | |||
+ | [ExecWithSetup] | ||
+ | ; http:// | ||
+ | ; return exit code via stdout as winst cannot read exit codes from ExecWith | ||
+ | $ExitCode = RunAsWait(" | ||
+ | '" | ||
+ | if not @error then | ||
+ | ConsoleWrite($exitcode) | ||
+ | endif | ||
+ | |||
+ | [FilesDelete] | ||
+ | delete " | ||
[Sub_check_exitcode] | [Sub_check_exitcode] | ||
Line 150: | Line 193: | ||
endif | endif | ||
- | </ | ||
+ | </ | ||
==== uninstall.ins ==== | ==== uninstall.ins ==== | ||
Line 171: | Line 214: | ||
DefVar $UninstallProgram32$ | DefVar $UninstallProgram32$ | ||
DefVar $UninstallProgram64$ | DefVar $UninstallProgram64$ | ||
+ | DefVar $UninstallProgram32_2$ | ||
+ | DefVar $UninstallProgram64_2$ | ||
DefVar $LogDir$ | DefVar $LogDir$ | ||
DefVar $ExitCode$ | DefVar $ExitCode$ | ||
DefVar $ProductId$ | DefVar $ProductId$ | ||
DefVar $InstallDir32$ | DefVar $InstallDir32$ | ||
+ | DefVar $InstallDir32_2$ | ||
DefVar $InstallDir64$ | DefVar $InstallDir64$ | ||
+ | DefVar $InstallDir64_2$ | ||
DefVar $LicenseRequired$ | DefVar $LicenseRequired$ | ||
DefVar $LicensePool$ | DefVar $LicensePool$ | ||
Line 181: | Line 228: | ||
DefVar $INST_architecture$ | DefVar $INST_architecture$ | ||
DefVar $Uninst_Cmd32$ | DefVar $Uninst_Cmd32$ | ||
+ | DefVar $Uninst_Cmd32_2$ | ||
DefVar $Uninst_Cmd64$ | DefVar $Uninst_Cmd64$ | ||
+ | DefVar $Uninst_Cmd64_2$ | ||
DefVar $Uninst_Prg$ | DefVar $Uninst_Prg$ | ||
Line 195: | Line 244: | ||
Set $ProductId$ | Set $ProductId$ | ||
Set $InstallDir32$ | Set $InstallDir32$ | ||
+ | Set $InstallDir32_2$ | ||
Set $InstallDir64$ | Set $InstallDir64$ | ||
+ | Set $InstallDir64_2$ | ||
Set $LicenseRequired$ = " | Set $LicenseRequired$ = " | ||
Set $LicensePool$ | Set $LicensePool$ | ||
Set $Uninst_Prg$ | Set $Uninst_Prg$ | ||
Set $Uninst_Cmd32$ | Set $Uninst_Cmd32$ | ||
+ | Set $Uninst_Cmd32_2$ | ||
Set $Uninst_Cmd64$ | Set $Uninst_Cmd64$ | ||
+ | Set $Uninst_Cmd64_2$ | ||
; ---------------------------------------------------------------- | ; ---------------------------------------------------------------- | ||
Line 243: | Line 296: | ||
Set $UninstallProgram32$ = $InstallDir32$+" | Set $UninstallProgram32$ = $InstallDir32$+" | ||
Set $UninstallProgram64$ = $InstallDir64$+" | Set $UninstallProgram64$ = $InstallDir64$+" | ||
+ | |||
+ | Set $UninstallProgram32_2$ = $InstallDir32_2$+" | ||
+ | Set $UninstallProgram64_2$ = $InstallDir64_2$+" | ||
if (($INST_SystemType$ = "x86 System" | if (($INST_SystemType$ = "x86 System" | ||
Line 254: | Line 310: | ||
sub_check_exitcode | sub_check_exitcode | ||
endif | endif | ||
- | Mendif | + | endif |
if ($INST_SystemType$ = "64 Bit System" | if ($INST_SystemType$ = "64 Bit System" | ||
Line 270: | Line 326: | ||
[Winbatch_uninstall_32] | [Winbatch_uninstall_32] | ||
$UninstallProgram32$ $Uninst_Cmd32$ | $UninstallProgram32$ $Uninst_Cmd32$ | ||
+ | $UninstallProgram32_2$ $Uninst_Cmd32_2$ | ||
[Winbatch_uninstall_64] | [Winbatch_uninstall_64] | ||
$UninstallProgram64$ $Uninst_Cmd64$ | $UninstallProgram64$ $Uninst_Cmd64$ | ||
+ | $UninstallProgram64_2$ $Uninst_Cmd64_2$ | ||
[Files_uninstall_32] | [Files_uninstall_32] |