Skip to Content
avatar image
Former Member

SAP Gui 730 Silent install Package

Hi Basis Gurus,

i am trying to set up a silent install package for SAP Gui 730.

I am using the NwSapSetupAdmin.exe. I created a Package with the products i need. Then i created a Package Definition File. Now i am able to install the Package with this command:

\\server\SAP\SAPGui 7.30\Setup\NwSapSetup.exe /Silent /Package="SAPGui730"

So far it is working fine. But now i want to set some registry entries after finishing the installation. I tried to add the following commands in Tab "On Installation End".

NwEngine.Shell.SetRegValue "HKEY_CURRENT_USER\Software\SAP\General\Appearance\SplashOff", "REG_DWORD", "00000000"

NwEngine.Shell.SetRegValue "HKEY_CURRENT_USER\Software\SAP\General\Appearance\Sound", "REG_SZ", "off"

NwEngine.Shell.SetRegValue "HKEY_CURRENT_USER\Software\SAP\General\Appearance\Animation", "REG_SZ", "off"

NwEngine.Shell.SetRegValue "HKEY_CURRENT_USER\Software\SAP\SAPLogon\Settings\CurrentNewSapLogonView", "REG_SZ", "2"

NwEngine.Shell.SetRegValue "HKEY_CURRENT_USER\Software\SAP\SAPGUI Front\SAP Frontend Server\Customize\StatusShowMode", "REG_DWORD", "00000001"

NwEngine.Shell.SetRegValue "HKEY_CURRENT_USER\Software\SAP\SAPGUI Front\SAP Frontend Server\Customize\Statusbar.Layout", "REG_DWORD", "00000001"

NwEngine.Shell.SetRegValue "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions\MaxAllowedZone", "REG_DWORD", "00000001"

NwEngine.Shell.SetRegValue "HKEY_CURRENT_USER\Software\SAP\SAPGUI Front\SAP Frontend Server\Security\DefaultAction", "REG_DWORD", "00000000"

NwEngine.Shell.SetRegValue "HKEY_CURRENT_USER\Software\SAP\SAPGUI Front\SAP Frontend Server\Security\SecurityLevel", "REG_DWORD", "00000000"

NwEngine.Shell.SetRegValue “HKEY_LOCAL_MACHINE\SOFTWARE\SAP\SAPGUI Front\SAP Frontend Server\Security\SecurityLevel”, “REG_DWORD”, “0"

After that i pressed the Button Save and created a new Package Definition File.

I tested the installation on a brand new Windows XP Test VM. The Registry Keys are not working.....

What is my mistake?

I exported this keys from a other computer to a regfile. When i run this Regfile on the Test VM the Values will be set. But it is not working with my silent installation.

Best regards,

Klaus

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Jan 22, 2014 at 03:02 PM

    Hello Klaus,


    I'm also facing a similar issue.

    Setting registry keys for HK_LOCAL_MACHINE works usually fine because those are available for any user.

    I have a package that does the following at the "On Installation End" step:


    NwEngine.Shell.SetRegValue "HKEY_LOCAL_MACHINE\Software\SAP\SAPGUI Front\SAP Frontend Server\Security\SecurityLevel", "REG_DWORD", "0"

    NwEngine.Shell.SetRegValue "HKEY_LOCAL_MACHINE\Software\Wow6432Node\SAP\SAPGUI Front\SAP Frontend Server\Security\SecurityLevel", "REG_DWORD", "0"

    NwEngine.Shell.SetRegValue "HKEY_LOCAL_MACHINE\Software\SAP\SAP Shared\SaphistoryDir", "REG_EXPAND_SZ", "%APPDATA%\SAP\SAP GUI\History"

    NwEngine.Shell.SetRegValue "HKEY_LOCAL_MACHINE\Software\Wow6432Node\SAP\SAP Shared\SaphistoryDir", "REG_EXPAND_SZ", "%APPDATA%\SAP\SAP GUI\History"

    NwEngine.Shell.SetRegValue "HKEY_LOCAL_MACHINE\Software\SAP\SAP Shared\SapWorkDir", "REG_EXPAND_SZ", "%USERPROFILE%\SapWorkDir"

    NwEngine.Shell.SetRegValue "HKEY_LOCAL_MACHINE\Software\Wow6432Node\SAP\SAP Shared\SapWorkDir", "REG_EXPAND_SZ", "%USERPROFILE%\SapWorkDir"

    Problem with CURRENT_USER registry keys and such a silent installation is that usually the installation is performed under a service user (for instance using Microsoft SCCM) that has admin rights on the machine to perform any software installation.

    Then you try to launch SAPGUI but usually with a different user than the one used to perform the installation.

    Of course this user won't see the registry settings that are supposed to be set because those ones are only available for the user who performed the installation.

    I also noticed that most of these related CURRENT_USER registry keys don't have an equivalence as LOCAL_MACHINE registry keys unfortunately.

    Examples of keys (to disable transaction/ok-code field) that are user specific:

    [HKEY_CURRENT_USER\SOFTWARE\SAP\SAPGUI Front\SAP Frontend Server\Customize]

    "CmdLine.DisableWhenInvisible"=dword:00000001

    "HideCmdLineInplace"="1"

    "HideCmdLineInplaceAllSession"="1"

    To bypass such a problem in my company we are using tools (regcloner.exe) that are copying registry keys from the LOCAL_MACHINE area to CURRENT_USER area at logon time of the user. It is the concept of Shadow Keys. Note that you can manage it without any particular tool. Usually a bit of Windows scripting might be sufficient (refer to REG command as well).

    A potential solution would be that your package generated on your SAPGUI installation server could set within LOCAL_MACHINE (you can define your own keys storage) all the keys you need for CURRENT USER.

    Example for "On Installation End" step:

    NwEngine.Shell.SetRegValue "HKEY_LOCAL_MACHINE\Software\MYCOMPANY\SAPGUI_HK_CU\SOFTWARE\SAP\SAPGUI Front\SAP Frontend Server\Customize\CmdLine.DisableWhenInvisible", "REG_DWORD", "1"

    Then you you need to set up a script that can be called by your logon script (refer to MS litterarure on how logon scripts are set) with the help of the REG QUERY command you might be able to read the registry key set above from LOCAL_MACHINE, retrieve the information you need from the returned string, probably set a couple of variables and run REG ADD command to set the registry keys for CURRENT_USER.

    This will require a bit of Windows scripting but it is achievable.

    There are pros and cons for this approach:

    Pros:

    Registry Keys are set according to your expectation.

    Cons:

    If the user wants to set its own SAPGUI settings that are already covered by yours, he/she will lose his/her own settings at next logon.

    So you really have to identify what the user is allowed to configure in SAPGUI configuration and what you want to force.

    Hope you will get the idea. However it will be good to get advices from SAP colleagues to see if they have better ideas.

    Regards, Christophe

    Add comment
    10|10000 characters needed characters exceeded

    • Dear Klaus,

      About the logging you can refer to C:\Program Files\SAP\SapSetup\LOGs\nwsapsetup(x).log files and search for your registry keys.

      You might find if there was an error or not while creating them.

      I've tested myself by creating package with a bunch of keys and this is working has expected.

      Also don't forget to Save the package after adding or removing stuff in "On/ Installation


      Regards.

      Christophe

  • Jan 22, 2014 at 09:46 AM

    hi Klaus,

    You need to put this thread on SAP GUI forum.

    anyways.

    You can find instruction from this link.

    SAP GUI Installation Server

    Regards,

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 22, 2014 at 10:11 AM

    HI Klaus,

    pls refer below links,

    SAP GUI Server Installation

    Regards

    Nayeem

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 28, 2014 at 09:49 AM

    Hi Guys,

    thanks for your help. It was a Syntax Problem. Now it is working fine. But for me it is better to run a small Batch file after the Installation which set the neccessary keys. On this way it is possible to set current user keys.

    Add comment
    10|10000 characters needed characters exceeded