Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem setting the registry value for Security settings

Former Member
0 Kudos

Hi,

I need to change the security configuration for Default Action(Ask/Allow/Deny) to Ask.

I know this can be changed by setting the registry value to 0 for Allow.

this was possible for 32-bit OS by using the below command:

NwEngine.Shell.SetRegValue "HKEY_LOCAL_MACHINE\Software\SAP\SAPGUI Front\SAP Frontend

Server\Security\DefaultAction", "REG_DWORD", "0"

I used the below command for 64-bit OS:

NwEngine.Shell.SetRegValue "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP\SAPGUI Front\SAP

Frontend Server\Security\DefaultAction", "REG_DWORD", "0"

This did not work.

I tried both the scenarios in different GUI packages.

But i need to use in a single package .

How can i identify 32 bit or 64 bit OS and apply the registry change?

Also for 64-bit is the above command correct?

I am new to this thing ,Please provide some advice.

I need to distribute the GUI package among end users and i am setting the registry value so as the end users do not face the security popups while working on GUI.

Urgently required.

Thanks,

Deep

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi!

You can check the OS system like this:

If "%WOW64MODE%" = "true" Then

   .... do your stuff for 64bit OS

Else

   .... do your stuff for 32bit Os

End If

And instead of full registry branch name :

"HKEY_LOCAL_MACHINE\..."

you can shorten it just to:

"HKLM\..."

5 REPLIES 5

Former Member
0 Kudos

Hi!

You can check the OS system like this:

If "%WOW64MODE%" = "true" Then

   .... do your stuff for 64bit OS

Else

   .... do your stuff for 32bit Os

End If

And instead of full registry branch name :

"HKEY_LOCAL_MACHINE\..."

you can shorten it just to:

"HKLM\..."

0 Kudos

Thanks O.

Actually the setting of registry is not working .

Can you help on that?

0 Kudos

Hello Deep,

Did you also create the registry key SecurityLevel REG_DWORD=0?

0 Kudos

HI Jude,

Yes , I did create the registry key SecurityLevel.

In fact,I put the script in the SAP GUI self installer in the End Install section with

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\SAP\SAPGUI Front\SAP Frontend

Server\Security\DefaultAction", "REG_DWORD", "0"

But it has no effect.

Also i created a separate cmd file that did change the registry values but it happens for HCUK and not for HKLM.For HKLM it says access is denied.

0 Kudos

It finally worked.

I was using HKEY_CURRENT_USER previously.

Instead i used HCUK and it worked.

Thanks for your help guys