on 2015 Oct 21 9:13 PM
I have a SAPGui 7.40 Installation Server and I have built packages to be pushed to users. I have done some scripting previously and that works, including setting registry values for keys that already exist. SAP released Note 2229515 recently which says as a workaround to the error "Invalid GUI input data:ST_USER_MAX_WSIZE wrong data" you can set the command line parameter "/SUPPORTBIT_OFF=MAX_WSIZE". When you enter this command line option in the SAPGui options, it writes the value to a registry key under "HKEY_CURRENT_USER\Software\SAP\SAPLogon\Options". We use Microsoft SCCM to distribute software and it operates under a system user, so setting entries under HKEY_CURRENT_USER can be an issue, so I want to set this under HKEY_LOCAL_MACHINE. But I must not have the syntax correct because I can't get it to create the registry keys. Here is what I have currently in my OnEndInstall and OnEndUpdate tabs for my package:
NwEngine.Context.Log.Write "Event: Setting the registry key to use command-line arguments for SAP Logon Pad"
NwEngine.Shell.CreateRegKey "HKLM\SOFTWARE\SAP\SAPLogon\Options","REG_SZ"
NwEngine.Shell.CreateRegKey "HKLM\SOFTWARE\SAP\SAPLogon\Options\SapguiNTCmdOpts, "REG_SZ", "/SUPPORTBIT_OFF=MAX_WSIZE"
NwEngine.Shell.CreateRegKey "HKLM\SOFTWARE\Wow6432Node\SAP\SAPLogon\Options","REG_SZ"
NwEngine.Shell.CreateRegKey "HKLM\SOFTWARE\Wow6432Node\SAP\SAPLogon\Options\SapguiNTCmdOpts","REG_SZ", "/SUPPORTBIT_OFF=MAX_WSIZE"
Can anyone give me some pointers on creating this registry key under HKLM? I have the statement twice because we have both 32 and 64 bit machines. I didn't do any scripting to handle determining what the architecture is, but if someone has script examples of that I would appreciate that as well.
Regards,
Blair Towe
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Another slightly different approach is to insert this code snippet at the beginning of your script:
".....
If NwEngine.Shell.RegKeyExist("HKLM\SOFTWARE\Wow6432Node\SAP") Then
strSAPRegPath = "HKLM\SOFTWARE\Wow6432Node\SAP"
else
strSAPRegPath = "HKLM\SOFTWARE\SAP"
End If
..."
then use the string variable strSAPRegPath to build the full registry information, i.e.:
strUseBranding = strSAPRegPath & "\General\Appearance\UseBrandingImage"
Regards,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.