Moin,
ich benötige die Abfrage, ob es sich um ein 32 Bit oder 64 Bit System handelt, wer kann mir da helfen?
Vielen Dank
userlogin.opsiscript get systemarchitecture
- SisterOfMercy
- Beiträge: 1528
- Registriert: 22 Jun 2012, 19:18
Re: userlogin.opsiscript get systemarchitecture
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Re: userlogin.opsiscript get systemarchitecture
Danke,
das ist die Lösung:
[Actions]
requiredWinstVersion >= "4.11.3.2"
comment "Patch the local Profiles ..."
[ProfileActions]
comment "Profiles Actions Section..."
setloglevel = 8
DefVar $Inst_SystemType$
Set $Inst_SystemType$ = GetSystemType
Message="execute profile settings"
comment "Did we run this script before ? - and set version stamp in profile"
if not (scriptWasExecutedBefore)
If ($Inst_SystemType$ = "x86 System")
comment "Installing on " + $Inst_SystemType$
Files_profile_copy_x86
; registry loadUnicodeTextFile("%ScriptPath%\profiles\Registry\Nodepad++.reg") /regedit
; Registry_currentuser_set
; Patches_profile_ini "%userprofiledir%\opsi-winst-test.ini"
endif
If ($Inst_SystemType$ = "x86 System")
comment "Installing on " + $Inst_SystemType$
Files_profile_copy_x64
; registry loadUnicodeTextFile("%ScriptPath%\profiles\Registry\Nodepad++.reg") /regedit
; Registry_currentuser_set
; Patches_profile_ini "%userprofiledir%\opsi-winst-test.ini"
endif
endif
[Files_profile_copy_x86]
copy -s "%Scriptpath%\profiles\AppData_x86\*.*" "%CurrentAppdataDir%"
[Files_profile_copy_x64]
copy -s "%Scriptpath%\profiles\AppData_x64\*.*" "%CurrentAppdataDir%"
[Registry_currentuser_set]
openkey [HKCU\Software\Nodepad++]
set "show_greeting_window" = "no"
[Patches_profile_ini]
add [Nodepad++] dummy1=add1
*****************************************************************************************
gutes Beispiel:
https://github.com/opsi-org/opsi-script ... opsiscript
das ist die Lösung:
[Actions]
requiredWinstVersion >= "4.11.3.2"
comment "Patch the local Profiles ..."
[ProfileActions]
comment "Profiles Actions Section..."
setloglevel = 8
DefVar $Inst_SystemType$
Set $Inst_SystemType$ = GetSystemType
Message="execute profile settings"
comment "Did we run this script before ? - and set version stamp in profile"
if not (scriptWasExecutedBefore)
If ($Inst_SystemType$ = "x86 System")
comment "Installing on " + $Inst_SystemType$
Files_profile_copy_x86
; registry loadUnicodeTextFile("%ScriptPath%\profiles\Registry\Nodepad++.reg") /regedit
; Registry_currentuser_set
; Patches_profile_ini "%userprofiledir%\opsi-winst-test.ini"
endif
If ($Inst_SystemType$ = "x86 System")
comment "Installing on " + $Inst_SystemType$
Files_profile_copy_x64
; registry loadUnicodeTextFile("%ScriptPath%\profiles\Registry\Nodepad++.reg") /regedit
; Registry_currentuser_set
; Patches_profile_ini "%userprofiledir%\opsi-winst-test.ini"
endif
endif
[Files_profile_copy_x86]
copy -s "%Scriptpath%\profiles\AppData_x86\*.*" "%CurrentAppdataDir%"
[Files_profile_copy_x64]
copy -s "%Scriptpath%\profiles\AppData_x64\*.*" "%CurrentAppdataDir%"
[Registry_currentuser_set]
openkey [HKCU\Software\Nodepad++]
set "show_greeting_window" = "no"
[Patches_profile_ini]
add [Nodepad++] dummy1=add1
*****************************************************************************************
gutes Beispiel:
https://github.com/opsi-org/opsi-script ... opsiscript
- SisterOfMercy
- Beiträge: 1528
- Registriert: 22 Jun 2012, 19:18
Re: userlogin.opsiscript get systemarchitecture
This part doesn't seem to be correct. You have the "If ($Inst_SystemType$ = "x86 System")" twice in there.dkalass hat geschrieben: ↑14 Apr 2023, 15:30 If ($Inst_SystemType$ = "x86 System")
comment "Installing on " + $Inst_SystemType$
Files_profile_copy_x64
; registry loadUnicodeTextFile("%ScriptPath%\profiles\Registry\Nodepad++.reg") /regedit
; Registry_currentuser_set
; Patches_profile_ini "%userprofiledir%\opsi-winst-test.ini"
endif
endif
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!