




On Error Resume Next
Wscript.Sleep 15000 ' We need a short delay for network initialization
Set Wshell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
' Get Active Directory Informations
dn=Wshell.regread("HKLM\software\microsoft\windows\currentversion\group policy\state\machine\distinguished-name")
Set cObj=GetObject("LDAP://"&dn)
' Read Active Directory Groups and set corresponding Server Configuration File Path in Registry
groups = cObj.GetEx("memberOf")
For Each group In groups
mdn=Split(group,",")
Select Case mdn(0)
' AD-Group "sapuilandscape_default"
Case "CN=sapuilandscape_default"
Wshell.RegWrite "HKCU\Software\SAP\SAPLogon\Options\LandscapeFileOnServer", "\\server\SAPUILandscape_Default\SAPUILandscape.xml", "REG_EXPAND_SZ"
Wscript.echo "SAPGUI Standard"
' AD-Group "sapuilandscape_itdepartment"
Case "CN=sapuilandscape_itdepartment"
Wshell.RegWrite "HKCU\Software\SAP\SAPLogon\Options\LandscapeFileOnServer", "\\server\SAPUILandscape_ITDepartment\SAPUILandscape.xml", "REG_EXPAND_SZ"
Wscript.echo "SAPGUI IT"
' AD-Group "sapuilandscape_hr"
Case "CN=sapuilandscape_hr"
Wshell.RegWrite "HKCU\Software\SAP\SAPLogon\Options\LandscapeFileOnServer", "\\server\SAPUILandscape_HR\SAPUILandscape.xml", "REG_EXPAND_SZ"
Wscript.echo "SAPGUI HR"
End Select
NextYou must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 3143 | |
| 1916 | |
| 1916 | |
| 1213 | |
| 1079 | |
| 757 | |
| 755 | |
| 742 |