userlogin.opsiscript get systemarchitecture

Antworten
dkalass
Beiträge: 10
Registriert: 29 Okt 2008, 18:53
Wohnort: 23898 Sandesneben

userlogin.opsiscript get systemarchitecture

Beitrag von dkalass »

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
Benutzeravatar
SisterOfMercy
Beiträge: 1522
Registriert: 22 Jun 2012, 19:18

Re: userlogin.opsiscript get systemarchitecture

Beitrag von SisterOfMercy »

Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
dkalass
Beiträge: 10
Registriert: 29 Okt 2008, 18:53
Wohnort: 23898 Sandesneben

Re: userlogin.opsiscript get systemarchitecture

Beitrag von dkalass »

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
Benutzeravatar
SisterOfMercy
Beiträge: 1522
Registriert: 22 Jun 2012, 19:18

Re: userlogin.opsiscript get systemarchitecture

Beitrag von SisterOfMercy »

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
This part doesn't seem to be correct. You have the "If ($Inst_SystemType$ = "x86 System")" twice in there.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Antworten