Registry keys for SAPGui command line option
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\SapguiNTCmdOpts, "REG_SZ", "/SUPPORTBIT_OFF=MAX_WSIZE"
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.