cancel
Showing results for 
Search instead for 
Did you mean: 

NwEngine.Shell.DeleteRegKey doesn't work

Former Member
0 Kudos

Hi all,

we are currently planning our SAPGui 7.30 deployment.

I try following in "OnEndUpdate":

If NwEngine.Shell.RegKeyExist("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\SAPLOGON_INI_FILE") Then

    NwEngine.Shell.DeleteRegKey ("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\SAPLOGON_INI_FILE")

End If

Unfortunately the reg key SAPLOGON_INI_FILE will not be deleted. All the other things (copy files, setting reg keys) work.

Can you please help me what is may the problem?

Best regards

Tony

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ok I finally got it. Thanks to Mary and following (ooooold) documentation I could figure out how it works: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b05e4fdd-644e-2a10-f988-9c0f5018a...

The correct line is:

If NwEngine.Shell.RegValueExist("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\SAPLOGON_INI_FILE") Then

    NwEngine.Shell.DeleteRegValue ("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\SAPLOGON_INI_FILE")

End If

I checked for a reg key and NOT for a value. With RegValueExist I get a correct If result and the DeleteRegValue will be executed.

Answers (3)

Answers (3)

maryjane_steele2
Active Participant
0 Kudos

Try DeleteRegValue, it worked for me.

Former Member
0 Kudos

Hello Mary,

thanks fort your reply. I tried RemoveRegKey, UnsetRegKey and now also DeleteRegValue but without any effect.

Can you may please post the snippet with your DeleteRegValue code?

What I am also missing is a FULL documentation of all NwSapSetup VB Script actions. I bet there are tons of possibilities undocumented.

Best regards

Tony

jesus_e_osorio
Discoverer
0 Kudos

Try with

'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\SAPLOGON_INI_FILE'

When I use HKLM the script fail

maryjane_steele2
Active Participant
0 Kudos

Hello, I am working on a script to clean up the 720 registry entries in prepartion for 730.  I don't have an answer but I think it has something to do with HKLM.  I can delete HKCU keys but for some reason the HKLM keys do not delete due to a "not existing" error .

Former Member
0 Kudos

This message was moderated.