Skip to Content
avatar image
Former Member

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","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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 21, 2015 at 11:56 PM

    Hi Blair,

    I am not an expert in scripting, but can you try the excerpt below?

    "...

    If NwEngine.Shell.RegKeyExist ("HKLM\SOFTWARE\Wow6432Node\SAP\SAPLogon") Then

    // your code for a 64 bits Windows ?

    End If

    ..."

    I look at the registry of my Windows and couldn't find the entries above, only under current user folder.

    I hope this helps,

    Cris

    Add comment
    10|10000 characters needed characters exceeded

  • May 13, 2016 at 10:42 PM

    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

    Add comment
    10|10000 characters needed characters exceeded