.net und als Admin ausführen Fragen eines Anfängers

Antworten
Senku
Beiträge: 7
Registriert: 12 Feb 2019, 11:52

.net und als Admin ausführen Fragen eines Anfängers

Beitrag von Senku »

Hallo,

ich habe vor kurzem mit Opsi angefangen und möchte nun meine ersten eigenen Packete machen.
Das erste ist ein Packet für eine Software namens Stiller Alarm.
Das zweite für .net.

Zu .net:

ich habe zuerst Gegoogeld wie man .net am besten installiert und bin dann auf ein Template gestoßen.
wiki/doku.php?id=userspace:netfx_4.5.2

ich habe dieses Log erhalten mit opsi-script

Code: Alles auswählen

[1] [Jun 28 10:28:25:831] --
[1] [Jun 28 10:28:25:832] --
[1] [Jun 28 10:28:25:833] C:\Users\j101001\AppData\Local\opsi-script-part-Bo73Fm59.log
[1] [Jun 28 10:28:25:834] opsi-script 4.12.0.32 started at >>
[1] [Jun 28 10:28:25:835] opsi-script log file with encoding utf8
[1] [Jun 28 10:28:25:836] startmessage opsi-script created at CentralForm.FormCreate: 28.06.2019 10:28:24
[1] [Jun 28 10:28:25:836] Loading skin from: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-winst\winstskin
[1] [Jun 28 10:28:25:838] Called with parameter: C:\net\CLIENT_DATA-alt\setup2.opsiscript
[1] [Jun 28 10:28:25:839] startmessage StartProgramModes and create log: 28.06.2019 10:28:24
[1] [Jun 28 10:28:25:840] pm: 2 28.06.2019 10:28:24
[3] [Jun 28 10:28:25:841] readconfig failed: Perhaps got defaults
[6] [Jun 28 10:28:25:842] Depot path from readconfig:  p:\
[6] [Jun 28 10:28:25:843] Restoring depot path from backup
[1] [Jun 28 10:28:25:844] Prog: force_min_loglevel: 4
[1] [Jun 28 10:28:25:845] Prog: default_loglevel: 7
[1] [Jun 28 10:28:25:846] Prog: debug_prog: False
[1] [Jun 28 10:28:25:847] Prog: debug_lib: True
[1] [Jun 28 10:28:25:849] Prog: ScriptErrorMessages: False
[1] [Jun 28 10:28:25:850] Prog: AutoActivityDisplay: False
[6] [Jun 28 10:28:25:852] Using new Depot path:
[1] [Jun 28 10:28:25:868] 
[1] [Jun 28 10:28:25:869] ============ Version 4.12.0.32 script "C:\net\CLIENT_DATA-alt\setup2.opsiscript"
[1] [Jun 28 10:28:25:871]              used script encoding: cp1252
[1] [Jun 28 10:28:25:873]              used system encoding: cp1252
[1] [Jun 28 10:28:25:874]              start: 2019-06-28  10:28:25
[1] [Jun 28 10:28:25:876]              on client named    "R1203552"
[1] [Jun 28 10:28:25:878]              loggedin user    "J101001"
[1] [Jun 28 10:28:25:879]              opsi-script running as    "J101001"
[1] [Jun 28 10:28:25:882]              opsi-script running with admin privileges
[1] [Jun 28 10:28:25:883]              opsi-script running in standard script mode
[1] [Jun 28 10:28:25:885] executing: "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-winst\winst32.exe"
[1] [Jun 28 10:28:25:888] system infos:
[1] [Jun 28 10:28:25:899] 4C-CC-6A-13-4F-36  -  PC hardware address
[1] [Jun 28 10:28:25:901] r1203552.rheinberg.krzn.de  -  IP name
[1] [Jun 28 10:28:25:903] 10.37.9.236  -  IP address
[1] [Jun 28 10:28:25:905] DEU  -  System default locale
[1] [Jun 28 10:28:25:907] MS Windows 6.1 64 Bit, Edition: PRODUCT_PROFESSIONAL
[1] [Jun 28 10:28:25:909] 
[7] [Jun 28 10:28:25:911] Registry started readonly
[7] [Jun 28 10:28:25:912] Registry started without redirection (64 Bit)
[6] [Jun 28 10:28:25:915] Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion]  opened
[6] [Jun 28 10:28:25:917] Key closed
[6] [Jun 28 10:28:25:963] opsi-script has version  4.12.0.32, required is : >= 4.11.3.4
[6] [Jun 28 10:28:25:965] Set  $SystemType$ = GetSystemType
[6] [Jun 28 10:28:25:967]   The value of the variable "$SystemType$" is now: "64 Bit System"
[6] [Jun 28 10:28:25:969] Set  $ProductId$  = "dotnetfx45"
[6] [Jun 28 10:28:25:972]   The value of the variable "$ProductId$" is now: "dotnetfx45"
[6] [Jun 28 10:28:25:974] Set  $ProductName$  = ".NET Framework 4.5.x"
[6] [Jun 28 10:28:25:976]   The value of the variable "$ProductName$" is now: ".NET Framework 4.5.x"
[7] [Jun 28 10:28:25:985] Loaded sub from: C:\net\CLIENT_DATA-alt\delsub.ins with encoding: cp1252
[6] [Jun 28 10:28:25:986] 
[6] [Jun 28 10:28:25:989] ~~~~~~~ Start Sub ~~~~~~~  Sub "C:\net\CLIENT_DATA-alt\delsub.ins"
[5] [Jun 28 10:28:25:994] message Removing .NET Framework 4.5.x
[6] [Jun 28 10:28:26:027] If
[6] [Jun 28 10:28:26:029]   $SystemType$ = "x86 System"   <<< result false
[6] [Jun 28 10:28:26:031] Then
[6] [Jun 28 10:28:26:033] Else
[6] [Jun 28 10:28:26:035]   Set  $MsiId$ = "{1DB0C90B-2A9F-3A1E-B1DF-616C5A2A1417}"
[6] [Jun 28 10:28:26:037]     The value of the variable "$MsiId$" is now: "{1DB0C90B-2A9F-3A1E-B1DF-616C5A2A1417}"
[6] [Jun 28 10:28:26:039]   If
[7] [Jun 28 10:28:26:042]     Registry started readonly
[7] [Jun 28 10:28:26:044]     Registry started without redirection (64 Bit)
[6] [Jun 28 10:28:26:045]     Info: Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1DB0C90B-2A9F-3A1E-B1DF-616C5A2A1417}]   could not be opened by RegOpenKeyEx,  Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[7] [Jun 28 10:28:26:047]     GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = ""   <<< result true
[6] [Jun 28 10:28:26:050]     not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")   <<< result false
[6] [Jun 28 10:28:26:052]   Then
[6] [Jun 28 10:28:26:054]   EndIf
[6] [Jun 28 10:28:26:057]   Set  $MsiId$ = "{26784146-6E05-3FF9-9335-786C7C0FB5BE}"
[6] [Jun 28 10:28:26:059]     The value of the variable "$MsiId$" is now: "{26784146-6E05-3FF9-9335-786C7C0FB5BE}"
[6] [Jun 28 10:28:26:060]   If
[7] [Jun 28 10:28:26:064]     Registry started readonly
[7] [Jun 28 10:28:26:065]     Registry started without redirection (64 Bit)
[6] [Jun 28 10:28:26:067]     Info: Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{26784146-6E05-3FF9-9335-786C7C0FB5BE}]   could not be opened by RegOpenKeyEx,  Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[7] [Jun 28 10:28:26:069]     GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = ""   <<< result true
[6] [Jun 28 10:28:26:072]     not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")   <<< result false
[6] [Jun 28 10:28:26:074]   Then
[6] [Jun 28 10:28:26:076]   EndIf
[6] [Jun 28 10:28:26:078]   Set  $MsiId$ = "{92FB6C44-E685-45AD-9B20-CADF4CABA132}"
[6] [Jun 28 10:28:26:080]     The value of the variable "$MsiId$" is now: "{92FB6C44-E685-45AD-9B20-CADF4CABA132}"
[6] [Jun 28 10:28:26:082]   If
[7] [Jun 28 10:28:26:085]     Registry started readonly
[7] [Jun 28 10:28:26:087]     Registry started without redirection (64 Bit)
[6] [Jun 28 10:28:26:089]     Info: Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{92FB6C44-E685-45AD-9B20-CADF4CABA132}]   could not be opened by RegOpenKeyEx,  Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[7] [Jun 28 10:28:26:091]     GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = ""   <<< result true
[6] [Jun 28 10:28:26:093]     not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")   <<< result false
[6] [Jun 28 10:28:26:095]   Then
[6] [Jun 28 10:28:26:097]   EndIf
[6] [Jun 28 10:28:26:099]   Set  $MsiId$ = "{8E34682C-8118-31F1-BC4C-98CD9675E1C2}"
[6] [Jun 28 10:28:26:101]     The value of the variable "$MsiId$" is now: "{8E34682C-8118-31F1-BC4C-98CD9675E1C2}"
[6] [Jun 28 10:28:26:103]   If
[7] [Jun 28 10:28:26:106]     Registry started readonly
[7] [Jun 28 10:28:26:108]     Registry started without redirection (64 Bit)
[6] [Jun 28 10:28:26:109]     Info: Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8E34682C-8118-31F1-BC4C-98CD9675E1C2}]   could not be opened by RegOpenKeyEx,  Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[7] [Jun 28 10:28:26:111]     GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = ""   <<< result true
[6] [Jun 28 10:28:26:114]     not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")   <<< result false
[6] [Jun 28 10:28:26:115]   Then
[6] [Jun 28 10:28:26:117]   EndIf
[6] [Jun 28 10:28:26:120]   Set  $MsiId$ = "{F5B09CFD-F0B2-36AF-8DF4-1DF6B63FC7B4}"
[6] [Jun 28 10:28:26:123]     The value of the variable "$MsiId$" is now: "{F5B09CFD-F0B2-36AF-8DF4-1DF6B63FC7B4}"
[6] [Jun 28 10:28:26:125]   If
[7] [Jun 28 10:28:26:127]     Registry started readonly
[7] [Jun 28 10:28:26:128]     Registry started without redirection (64 Bit)
[6] [Jun 28 10:28:26:130]     Info: Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F5B09CFD-F0B2-36AF-8DF4-1DF6B63FC7B4}]   could not be opened by RegOpenKeyEx,  Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[7] [Jun 28 10:28:26:132]     GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = ""   <<< result true
[6] [Jun 28 10:28:26:135]     not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")   <<< result false
[6] [Jun 28 10:28:26:136]   Then
[6] [Jun 28 10:28:26:139]   EndIf
[6] [Jun 28 10:28:26:141] EndIf
[6] [Jun 28 10:28:26:143] 
[6] [Jun 28 10:28:26:144] ~~~~~~~ Start Sub ~~~~~~~  Sub_check_exitcode
[5] [Jun 28 10:28:26:148] comment: Test for installation success via exit code
[6] [Jun 28 10:28:26:150] Set  $ExitCode$ = getLastExitCode
[6] [Jun 28 10:28:26:152]   The value of the variable "$ExitCode$" is now: "0"
[6] [Jun 28 10:28:26:154] If
[7] [Jun 28 10:28:26:156]   $ExitCode$ = "0"   <<< result true
[6] [Jun 28 10:28:26:158]   ($ExitCode$ = "0")   <<< result true
[6] [Jun 28 10:28:26:159] Then
[5] [Jun 28 10:28:26:163]   comment: Looks good: setup program gives exitcode zero
[6] [Jun 28 10:28:26:164] Else
[6] [Jun 28 10:28:26:166]   If
[6] [Jun 28 10:28:26:167]   Then
[6] [Jun 28 10:28:26:170]   Else
[6] [Jun 28 10:28:26:173]     If
[6] [Jun 28 10:28:26:175]     Then
[6] [Jun 28 10:28:26:177]     Else
[6] [Jun 28 10:28:26:179]       If
[6] [Jun 28 10:28:26:180]       Then
[6] [Jun 28 10:28:26:182]       Else
[6] [Jun 28 10:28:26:186]       EndIf
[6] [Jun 28 10:28:26:187]     EndIf
[6] [Jun 28 10:28:26:190]   EndIf
[6] [Jun 28 10:28:26:191] EndIf
[6] [Jun 28 10:28:26:193] 
[6] [Jun 28 10:28:26:194] ~~~~~~~ End Sub   ~~~~~~~  Sub_check_exitcode
[6] [Jun 28 10:28:26:195] 
[6] [Jun 28 10:28:26:198] Section ending since next line is starting with "["
[6] [Jun 28 10:28:26:200] 
[6] [Jun 28 10:28:26:201] ~~~~~~~ End Sub   ~~~~~~~  Sub "C:\net\CLIENT_DATA-alt\delsub.ins"
[6] [Jun 28 10:28:26:204] 
[5] [Jun 28 10:28:26:211] message Installing .NET Framework 4.5.x
[5] [Jun 28 10:28:26:222] message Installing .NET Framework 4.5.x Core Files
[5] [Jun 28 10:28:26:224] Execution of: winbatch_install_netfx
[5] [Jun 28 10:28:26:226] 
[6] [Jun 28 10:28:26:227]   Call "C:\net\CLIENT_DATA-alt\dotNetFx40_Full_x86_x64.exe /passive /norestart"
[6] [Jun 28 10:28:26:228]      Waiting until the called process is finished
[6] [Jun 28 10:28:26:232]   Start process as invoker: J101001
[3] [Jun 28 10:28:27:294]   Exception in StartProcess_cp: Failed to execute C:\net\CLIENT_DATA-alt\dotNetFx40_Full_x86_x64.exe /passive /norestart : 740
[6] [Jun 28 10:28:27:296]   
[6] [Jun 28 10:28:27:300] 
[6] [Jun 28 10:28:27:302] ~~~~~~~ Start Sub ~~~~~~~  Sub_check_exitcode
[5] [Jun 28 10:28:27:305] comment: Test for installation success via exit code
[6] [Jun 28 10:28:27:306] Set  $ExitCode$ = getLastExitCode
[6] [Jun 28 10:28:27:308]   The value of the variable "$ExitCode$" is now: "-1"
[6] [Jun 28 10:28:27:310] If
[7] [Jun 28 10:28:27:312]   $ExitCode$ = "0"   <<< result false
[6] [Jun 28 10:28:27:314]   ($ExitCode$ = "0")   <<< result false
[6] [Jun 28 10:28:27:316] Then
[6] [Jun 28 10:28:27:318] Else
[5] [Jun 28 10:28:27:320]   comment: Setup program gives a exitcode unequal zero: -1
[6] [Jun 28 10:28:27:322]   If
[7] [Jun 28 10:28:27:325]     $ExitCode$ = "1605"   <<< result false
[6] [Jun 28 10:28:27:326]     ($ExitCode$ = "1605")   <<< result false
[6] [Jun 28 10:28:27:328]   Then
[6] [Jun 28 10:28:27:330]   Else
[6] [Jun 28 10:28:27:331]     If
[7] [Jun 28 10:28:27:334]       $ExitCode$ = "1641"   <<< result false
[6] [Jun 28 10:28:27:335]       ($ExitCode$ = "1641")   <<< result false
[6] [Jun 28 10:28:27:337]     Then
[6] [Jun 28 10:28:27:340]     Else
[6] [Jun 28 10:28:27:342]       If
[7] [Jun 28 10:28:27:344]         $ExitCode$ = "3010"   <<< result false
[6] [Jun 28 10:28:27:345]         ($ExitCode$ = "3010")   <<< result false
[6] [Jun 28 10:28:27:348]       Then
[6] [Jun 28 10:28:27:350]       Else
[3] [Jun 28 10:28:27:352]         Error: Fatal: Setup program gives an unknown exitcode unequal zero: -1
[2] [Jun 28 10:28:27:354]         Error level set to fatal
[6] [Jun 28 10:28:27:355]         Process aborted
[6] [Jun 28 10:28:27:358] 
[6] [Jun 28 10:28:27:360] ~~~~~~~ End Sub   ~~~~~~~  Sub_check_exitcode
[6] [Jun 28 10:28:27:361] 
[6] [Jun 28 10:28:27:362] Process aborted
[1] [Jun 28 10:28:27:369] ___________________
[1] [Jun 28 10:28:27:370] script finished: failed
[1] [Jun 28 10:28:27:372] 3 errors
[1] [Jun 28 10:28:27:373] 0 warnings
[1] [Jun 28 10:28:27:376] 
[1] [Jun 28 10:28:27:377] 
Danach dachte ich, dass Vieleicht Adminrechte fehlen und habe mal geschaut wie man das unter dem Localen admin machen kann.
Dort habe ich dann im Internet $ExitCode = RunAsWait("testadmin", @computername, "testpw", 1, _
'"%ScriptPath%\$Inst_Prg$" $Inst_Cmd32$') gefunden und habe es so verstanden, das man damit die Installation dann mit den Rechten des lokalen Benutzers testadmin mit dem passwort testpw laufen lassen kann.
Dies hat jedoch auch nicht wie gewünscht funktioniert sondern das Log unten verursacht.

Code: Alles auswählen

[Actions]
requiredWinstVersion >= "4.11.3.4"
 
DefVar $SystemType$
DefVar $ProductId$  
DefVar $ProductName$
DefVar $ExitCode$
DefVar $MsiId$  
DefVar $Inst_Cmd32$
DefVar $LogDir$
DefVar $Inst_Prg$
 
set $SystemType$ = GetSystemType
Set $ProductId$  = "dotnetfx45"
Set $ProductName$  = ".NET Framework 4.5.x"
Set $Inst_Cmd32$ = "/passive /norestart"

Set $Inst_Prg$  = "dotNetFx40_Full_x86_x64.exe"
 
Sub "%ScriptPath%\delsub.ins"
 
Message "Installing " + $ProductName$
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductName$
 
Message "Installing " + $ProductName$ + " Core Files"
winbatch_install_netfx
Sub_check_exitcode
 
;Message "Installing " + $ProductName$ + " Update Files"
;winbatch_install_netfx_sp
;Sub_check_exitcode
 
;Message "Installing " + $ProductName$ + " Language Pack"
;winbatch_install_netfx_lang
;Sub_check_exitcode
 
[winbatch_install_netfx]
$ExitCode = RunAsWait("testadmin", @computername, "testpw", 1, _
  '"%ScriptPath%\$Inst_Prg$" $Inst_Cmd32$')
if not @error then
  ConsoleWrite($exitcode)
endif
;%ScriptPath%\dotNetFx40_Full_x86_x64.exe /passive /norestart
 
[winbatch_install_netfx_sp]
;%ScriptPath%\NDP452-KB2901907-x86-x64-AllOS-ENU.exe /passive /norestart
 
[winbatch_install_netfx_lang]
;%ScriptPath%\NDP452-KB2901907-x86-x64-AllOS-DEU.exe /passive /norestart
 
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
	comment "Looks good: setup program gives exitcode zero"
else
	comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
	if ($ExitCode$ = "1605")
		comment "ERROR_UNKNOWN_PRODUCT	1605	This action is only valid for products that are currently installed."
		comment "Uninstall of a not installed product failed - no problem"
	else
		if ($ExitCode$ = "1641")
			comment "looks good: setup program gives exitcode 1641"
			comment "ERROR_SUCCESS_REBOOT_INITIATED	1641	The installer has initiated a restart. This message is indicative of a success."
		else
			if ($ExitCode$ = "3010")
				comment "looks good: setup program gives exitcode 3010"
				comment "ERROR_SUCCESS_REBOOT_REQUIRED	3010	A restart is required to complete the install. This message is indicative of a success."
			else
				logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
				isFatalError
			endif
		endif
	endif
endif

Code: Alles auswählen

[1] [Jun 28 10:10:17:506] --
[1] [Jun 28 10:10:17:518] --
[1] [Jun 28 10:10:17:518] C:\Users\j101001\AppData\Local\opsi-script-part-Sl00Oe87.log
[1] [Jun 28 10:10:17:520] opsi-script 4.12.0.32 started at >>
[1] [Jun 28 10:10:17:521] opsi-script log file with encoding utf8
[1] [Jun 28 10:10:17:522] startmessage opsi-script created at CentralForm.FormCreate: 28.06.2019 10:10:15
[1] [Jun 28 10:10:17:524] Loading skin from: C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-winst\winstskin
[1] [Jun 28 10:10:17:525] Called with parameter: C:\net\CLIENT_DATA-alt\setup.opsiscript
[1] [Jun 28 10:10:17:526] startmessage StartProgramModes and create log: 28.06.2019 10:10:15
[1] [Jun 28 10:10:17:527] pm: 2 28.06.2019 10:10:15
[3] [Jun 28 10:10:17:529] readconfig failed: Perhaps got defaults
[6] [Jun 28 10:10:17:530] Depot path from readconfig:  p:\
[6] [Jun 28 10:10:17:531] Restoring depot path from backup
[1] [Jun 28 10:10:17:534] Prog: force_min_loglevel: 4
[1] [Jun 28 10:10:17:535] Prog: default_loglevel: 7
[1] [Jun 28 10:10:17:537] Prog: debug_prog: False
[1] [Jun 28 10:10:17:538] Prog: debug_lib: True
[1] [Jun 28 10:10:17:541] Prog: ScriptErrorMessages: False
[1] [Jun 28 10:10:17:543] Prog: AutoActivityDisplay: False
[6] [Jun 28 10:10:17:545] Using new Depot path:
[1] [Jun 28 10:10:17:560] 
[1] [Jun 28 10:10:17:562] ============ Version 4.12.0.32 script "C:\net\CLIENT_DATA-alt\setup.opsiscript"
[1] [Jun 28 10:10:17:564]              used script encoding: cp1252
[1] [Jun 28 10:10:17:565]              used system encoding: cp1252
[1] [Jun 28 10:10:17:567]              start: 2019-06-28  10:10:17
[1] [Jun 28 10:10:17:570]              on client named    "R1203552"
[1] [Jun 28 10:10:17:572]              loggedin user    "J101001"
[1] [Jun 28 10:10:17:573]              opsi-script running as    "J101001"
[1] [Jun 28 10:10:17:576]              opsi-script running with admin privileges
[1] [Jun 28 10:10:17:577]              opsi-script running in standard script mode
[1] [Jun 28 10:10:17:579] executing: "C:\Program Files (x86)\opsi.org\opsi-client-agent\opsi-winst\winst32.exe"
[1] [Jun 28 10:10:17:581] system infos:
[1] [Jun 28 10:10:17:610] 4C-CC-6A-13-4F-36  -  PC hardware address
[1] [Jun 28 10:10:17:612] r1203552.rheinberg.krzn.de  -  IP name
[1] [Jun 28 10:10:17:613] 10.37.9.236  -  IP address
[1] [Jun 28 10:10:17:614] DEU  -  System default locale
[1] [Jun 28 10:10:17:616] MS Windows 6.1 64 Bit, Edition: PRODUCT_PROFESSIONAL
[1] [Jun 28 10:10:17:619] 
[7] [Jun 28 10:10:17:621] Registry started readonly
[7] [Jun 28 10:10:17:623] Registry started without redirection (64 Bit)
[6] [Jun 28 10:10:17:625] Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion]  opened
[6] [Jun 28 10:10:17:627] Key closed
[6] [Jun 28 10:10:17:673] opsi-script has version  4.12.0.32, required is : >= 4.11.3.4
[6] [Jun 28 10:10:17:675] Set  $SystemType$ = GetSystemType
[6] [Jun 28 10:10:17:681]   The value of the variable "$SystemType$" is now: "64 Bit System"
[6] [Jun 28 10:10:17:682] Set  $ProductId$  = "dotnetfx45"
[6] [Jun 28 10:10:17:686]   The value of the variable "$ProductId$" is now: "dotnetfx45"
[6] [Jun 28 10:10:17:688] Set  $ProductName$  = ".NET Framework 4.5.x"
[6] [Jun 28 10:10:17:690]   The value of the variable "$ProductName$" is now: ".NET Framework 4.5.x"
[6] [Jun 28 10:10:17:692] Set  $Inst_Cmd32$ = "/passive /norestart"
[6] [Jun 28 10:10:17:694]   The value of the variable "$Inst_Cmd32$" is now: "/passive /norestart"
[6] [Jun 28 10:10:17:695] Set  $Inst_Prg$  = "dotNetFx40_Full_x86_x64.exe"
[6] [Jun 28 10:10:17:698]   The value of the variable "$Inst_Prg$" is now: "dotNetFx40_Full_x86_x64.exe"
[7] [Jun 28 10:10:17:725] Loaded sub from: C:\net\CLIENT_DATA-alt\delsub.ins with encoding: cp1252
[6] [Jun 28 10:10:17:727] 
[6] [Jun 28 10:10:17:728] ~~~~~~~ Start Sub ~~~~~~~  Sub "C:\net\CLIENT_DATA-alt\delsub.ins"
[5] [Jun 28 10:10:17:733] message Removing .NET Framework 4.5.x
[6] [Jun 28 10:10:17:767] If
[6] [Jun 28 10:10:17:769]   $SystemType$ = "x86 System"   <<< result false
[6] [Jun 28 10:10:17:771] Then
[6] [Jun 28 10:10:17:773] Else
[6] [Jun 28 10:10:17:775]   Set  $MsiId$ = "{1DB0C90B-2A9F-3A1E-B1DF-616C5A2A1417}"
[6] [Jun 28 10:10:17:777]     The value of the variable "$MsiId$" is now: "{1DB0C90B-2A9F-3A1E-B1DF-616C5A2A1417}"
[6] [Jun 28 10:10:17:779]   If
[7] [Jun 28 10:10:17:782]     Registry started readonly
[7] [Jun 28 10:10:17:784]     Registry started without redirection (64 Bit)
[6] [Jun 28 10:10:17:786]     Info: Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1DB0C90B-2A9F-3A1E-B1DF-616C5A2A1417}]   could not be opened by RegOpenKeyEx,  Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[7] [Jun 28 10:10:17:788]     GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = ""   <<< result true
[6] [Jun 28 10:10:17:790]     not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")   <<< result false
[6] [Jun 28 10:10:17:791]   Then
[6] [Jun 28 10:10:17:793]   EndIf
[6] [Jun 28 10:10:17:796]   Set  $MsiId$ = "{26784146-6E05-3FF9-9335-786C7C0FB5BE}"
[6] [Jun 28 10:10:17:798]     The value of the variable "$MsiId$" is now: "{26784146-6E05-3FF9-9335-786C7C0FB5BE}"
[6] [Jun 28 10:10:17:800]   If
[7] [Jun 28 10:10:17:803]     Registry started readonly
[7] [Jun 28 10:10:17:804]     Registry started without redirection (64 Bit)
[6] [Jun 28 10:10:17:806]     Info: Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{26784146-6E05-3FF9-9335-786C7C0FB5BE}]   could not be opened by RegOpenKeyEx,  Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[7] [Jun 28 10:10:17:808]     GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = ""   <<< result true
[6] [Jun 28 10:10:17:810]     not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")   <<< result false
[6] [Jun 28 10:10:17:812]   Then
[6] [Jun 28 10:10:17:814]   EndIf
[6] [Jun 28 10:10:17:816]   Set  $MsiId$ = "{92FB6C44-E685-45AD-9B20-CADF4CABA132}"
[6] [Jun 28 10:10:17:819]     The value of the variable "$MsiId$" is now: "{92FB6C44-E685-45AD-9B20-CADF4CABA132}"
[6] [Jun 28 10:10:17:821]   If
[7] [Jun 28 10:10:17:823]     Registry started readonly
[7] [Jun 28 10:10:17:825]     Registry started without redirection (64 Bit)
[6] [Jun 28 10:10:17:826]     Info: Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{92FB6C44-E685-45AD-9B20-CADF4CABA132}]   could not be opened by RegOpenKeyEx,  Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[7] [Jun 28 10:10:17:828]     GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = ""   <<< result true
[6] [Jun 28 10:10:17:831]     not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")   <<< result false
[6] [Jun 28 10:10:17:832]   Then
[6] [Jun 28 10:10:17:834]   EndIf
[6] [Jun 28 10:10:17:837]   Set  $MsiId$ = "{8E34682C-8118-31F1-BC4C-98CD9675E1C2}"
[6] [Jun 28 10:10:17:839]     The value of the variable "$MsiId$" is now: "{8E34682C-8118-31F1-BC4C-98CD9675E1C2}"
[6] [Jun 28 10:10:17:841]   If
[7] [Jun 28 10:10:17:844]     Registry started readonly
[7] [Jun 28 10:10:17:845]     Registry started without redirection (64 Bit)
[6] [Jun 28 10:10:17:847]     Info: Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8E34682C-8118-31F1-BC4C-98CD9675E1C2}]   could not be opened by RegOpenKeyEx,  Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[7] [Jun 28 10:10:17:848]     GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = ""   <<< result true
[6] [Jun 28 10:10:17:851]     not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")   <<< result false
[6] [Jun 28 10:10:17:853]   Then
[6] [Jun 28 10:10:17:856]   EndIf
[6] [Jun 28 10:10:17:858]   Set  $MsiId$ = "{F5B09CFD-F0B2-36AF-8DF4-1DF6B63FC7B4}"
[6] [Jun 28 10:10:17:859]     The value of the variable "$MsiId$" is now: "{F5B09CFD-F0B2-36AF-8DF4-1DF6B63FC7B4}"
[6] [Jun 28 10:10:17:861]   If
[7] [Jun 28 10:10:17:864]     Registry started readonly
[7] [Jun 28 10:10:17:866]     Registry started without redirection (64 Bit)
[6] [Jun 28 10:10:17:867]     Info: Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F5B09CFD-F0B2-36AF-8DF4-1DF6B63FC7B4}]   could not be opened by RegOpenKeyEx,  Errorno 2 "Das System kann die angegebene Datei nicht finden.<"
[7] [Jun 28 10:10:17:869]     GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = ""   <<< result true
[6] [Jun 28 10:10:17:872]     not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")   <<< result false
[6] [Jun 28 10:10:17:874]   Then
[6] [Jun 28 10:10:17:876]   EndIf
[6] [Jun 28 10:10:17:878] EndIf
[6] [Jun 28 10:10:17:880] 
[6] [Jun 28 10:10:17:881] ~~~~~~~ Start Sub ~~~~~~~  Sub_check_exitcode
[5] [Jun 28 10:10:17:885] comment: Test for installation success via exit code
[6] [Jun 28 10:10:17:887] Set  $ExitCode$ = getLastExitCode
[6] [Jun 28 10:10:17:889]   The value of the variable "$ExitCode$" is now: "0"
[6] [Jun 28 10:10:17:890] If
[7] [Jun 28 10:10:17:892]   $ExitCode$ = "0"   <<< result true
[6] [Jun 28 10:10:17:894]   ($ExitCode$ = "0")   <<< result true
[6] [Jun 28 10:10:17:895] Then
[5] [Jun 28 10:10:17:898]   comment: Looks good: setup program gives exitcode zero
[6] [Jun 28 10:10:17:900] Else
[6] [Jun 28 10:10:17:902]   If
[6] [Jun 28 10:10:17:904]   Then
[6] [Jun 28 10:10:17:906]   Else
[6] [Jun 28 10:10:17:907]     If
[6] [Jun 28 10:10:17:909]     Then
[6] [Jun 28 10:10:17:913]     Else
[6] [Jun 28 10:10:17:914]       If
[6] [Jun 28 10:10:17:916]       Then
[6] [Jun 28 10:10:17:918]       Else
[6] [Jun 28 10:10:17:921]       EndIf
[6] [Jun 28 10:10:17:923]     EndIf
[6] [Jun 28 10:10:17:924]   EndIf
[6] [Jun 28 10:10:17:925] EndIf
[6] [Jun 28 10:10:17:928] 
[6] [Jun 28 10:10:17:929] ~~~~~~~ End Sub   ~~~~~~~  Sub_check_exitcode
[6] [Jun 28 10:10:17:931] 
[6] [Jun 28 10:10:17:933] Section ending since next line is starting with "["
[6] [Jun 28 10:10:17:935] 
[6] [Jun 28 10:10:17:937] ~~~~~~~ End Sub   ~~~~~~~  Sub "C:\net\CLIENT_DATA-alt\delsub.ins"
[6] [Jun 28 10:10:17:939] 
[5] [Jun 28 10:10:17:944] message Installing .NET Framework 4.5.x
[5] [Jun 28 10:10:17:956] message Installing .NET Framework 4.5.x Core Files
[5] [Jun 28 10:10:17:959] Execution of: winbatch_install_netfx
[5] [Jun 28 10:10:17:960] 
[6] [Jun 28 10:10:17:962]   Call "$ExitCode = RunAsWait("testadmin", @computername, "testpw", 1, _"
[6] [Jun 28 10:10:17:963]      Waiting until the called process is finished
[6] [Jun 28 10:10:17:967]   Start process as invoker: J101001
[3] [Jun 28 10:10:17:974]   Exception in StartProcess_cp: Failed to execute $ExitCode = RunAsWait("testadmin", @computername, "testpw", 1, _ : 2
[6] [Jun 28 10:10:17:976]   
[6] [Jun 28 10:10:17:978]   Call "'"C:\net\CLIENT_DATA-alt\dotNetFx40_Full_x86_x64.exe" /passive /norestart')"
[6] [Jun 28 10:10:17:979]      Waiting until the called process is finished
[6] [Jun 28 10:10:17:981]   Start process as invoker: J101001
[3] [Jun 28 10:10:17:985]   Exception in StartProcess_cp: Failed to execute '"C:\net\CLIENT_DATA-alt\dotNetFx40_Full_x86_x64.exe" /passive /norestart') : 2
[6] [Jun 28 10:10:17:987]   
[6] [Jun 28 10:10:17:988]   Call "if not @error then"
[6] [Jun 28 10:10:17:990]      Waiting until the called process is finished
[6] [Jun 28 10:10:17:992]   Start process as invoker: J101001
[3] [Jun 28 10:10:17:995]   Exception in StartProcess_cp: Failed to execute if not @error then : 2
[6] [Jun 28 10:10:17:997]   
[6] [Jun 28 10:10:17:998]   Call "ConsoleWrite($exitcode)"
[6] [Jun 28 10:10:18:000]      Waiting until the called process is finished
[6] [Jun 28 10:10:18:003]   Start process as invoker: J101001
[3] [Jun 28 10:10:18:005]   Exception in StartProcess_cp: Failed to execute ConsoleWrite($exitcode) : 2
[6] [Jun 28 10:10:18:007]   
[6] [Jun 28 10:10:18:009]   Call "endif"
[6] [Jun 28 10:10:18:011]      Waiting until the called process is finished
[6] [Jun 28 10:10:18:012]   Start process as invoker: J101001
[3] [Jun 28 10:10:18:015]   Exception in StartProcess_cp: Failed to execute endif : 2
[6] [Jun 28 10:10:18:017]   
[6] [Jun 28 10:10:18:020] 
[6] [Jun 28 10:10:18:022] ~~~~~~~ Start Sub ~~~~~~~  Sub_check_exitcode
[5] [Jun 28 10:10:18:025] comment: Test for installation success via exit code
[6] [Jun 28 10:10:18:027] Set  $ExitCode$ = getLastExitCode
[6] [Jun 28 10:10:18:029]   The value of the variable "$ExitCode$" is now: "-1"
[6] [Jun 28 10:10:18:031] If
[7] [Jun 28 10:10:18:033]   $ExitCode$ = "0"   <<< result false
[6] [Jun 28 10:10:18:035]   ($ExitCode$ = "0")   <<< result false
[6] [Jun 28 10:10:18:037] Then
[6] [Jun 28 10:10:18:039] Else
[5] [Jun 28 10:10:18:040]   comment: Setup program gives a exitcode unequal zero: -1
[6] [Jun 28 10:10:18:043]   If
[7] [Jun 28 10:10:18:044]     $ExitCode$ = "1605"   <<< result false
[6] [Jun 28 10:10:18:046]     ($ExitCode$ = "1605")   <<< result false
[6] [Jun 28 10:10:18:049]   Then
[6] [Jun 28 10:10:18:050]   Else
[6] [Jun 28 10:10:18:053]     If
[7] [Jun 28 10:10:18:056]       $ExitCode$ = "1641"   <<< result false
[6] [Jun 28 10:10:18:057]       ($ExitCode$ = "1641")   <<< result false
[6] [Jun 28 10:10:18:059]     Then
[6] [Jun 28 10:10:18:062]     Else
[6] [Jun 28 10:10:18:064]       If
[7] [Jun 28 10:10:18:066]         $ExitCode$ = "3010"   <<< result false
[6] [Jun 28 10:10:18:067]         ($ExitCode$ = "3010")   <<< result false
[6] [Jun 28 10:10:18:070]       Then
[6] [Jun 28 10:10:18:072]       Else
[3] [Jun 28 10:10:18:074]         Error: Fatal: Setup program gives an unknown exitcode unequal zero: -1
[2] [Jun 28 10:10:18:076]         Error level set to fatal
[6] [Jun 28 10:10:18:077]         Process aborted
[6] [Jun 28 10:10:18:079] 
[6] [Jun 28 10:10:18:080] ~~~~~~~ End Sub   ~~~~~~~  Sub_check_exitcode
[6] [Jun 28 10:10:18:083] 
[6] [Jun 28 10:10:18:084] Process aborted
[1] [Jun 28 10:10:18:091] ___________________
[1] [Jun 28 10:10:18:093] script finished: failed
[1] [Jun 28 10:10:18:094] 7 errors
[1] [Jun 28 10:10:18:096] 0 warnings
[1] [Jun 28 10:10:18:098] 
[1] [Jun 28 10:10:18:100]  

Jetzt meine Frage wie installiere ich am besten .net mit Opsi bzw was läuft da falsch.
Ich schätze es liegt an fehlenden adminrechten?

ich habe auf allen Rechnern einen lokalen admin mit identischen PW den ich auch nutzen kann aber wie muss ich das in dem Script machen damit das läuft.

Daas ist nämlich auch mein Problem mit der 2. Software Stiller Alarm, wenn ich meine Befehle in die Komandozeile von Windows eingebe und diese als Admin starte geht alles wenn ich diese ohne adminrechte starte geht nichts. daher fehlen mir auch hier für mein script das wissen wie ich dies als admin ausführen lassen kann.
Antworten