cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Gui 730 Silent install Package

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

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

Former Member
0 Kudos

Dear Christophe,


yeah, you are right, i never thought about the problem with HKCU Keys. This was definitly wrong from my side.


But i think i have a second Problem in my case. Now i deleted all my keys and only added the both sample keys:

NwEngine.Shell.SetRegValue "HKLM\SOFTWARE\SAP\TestKey\TestString", "REG_SZ", "TestValue"

NwEngine.Shell.SetRegValue "HKLM\SOFTWARE\SAP\TestKey\TestDWord", "REG_DWORD", "65536"

I started the installation on my new XP VM and SAP is installed, but the keys are not set.

I opend the PDF and the SMS file from the definition files, and i cant see any reg keys.

Is that correct? I thougt there must be the configuration.

Is it possible to enable a trace file ore logging that tells me what is going wrong?

Best regards,

Klaus

0 Kudos

Klaus Blab wrote:

...

NwEngine.Shell.SetRegValue "HKLM\SOFTWARE\SAP\TestKey\TestString", "REG_SZ", "TestValue"

NwEngine.Shell.SetRegValue "HKLM\SOFTWARE\SAP\TestKey\TestDWord", "REG_DWORD", "65536"

...

Dear Klaus,

Maybe your syntax is wrong ?

I would set them as follows:


NwEngine.Shell.SetRegValue "HKEY_LOCAL_MACHINE\Software\SAP\TestKey\TestString", "REG_SZ", "TestValue"

NwEngine.Shell.SetRegValue "HKEY_LOCAL_MACHINE\Software\SAP\TestKey\TestDWord", "REG_DWORD", "65536"

0 Kudos

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

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

former_member45419
Active Contributor
0 Kudos

HI Klaus,

pls refer below links,

Regards

Nayeem

Former Member
0 Kudos

Hi Basic Gurus,

lot of interresting articles, but no one tells me why my scripts are not working.

Best regards,

Klaus

former_member182034
Active Contributor
0 Kudos

hi Klaus,

You need to put this thread on SAP GUI forum.

anyways.

You can find instruction from this link.

Regards,