cancel
Showing results for 
Search instead for 
Did you mean: 

Windows Username automatically populating sapshcut.exe

beergamesbeer
Explorer
0 Kudos
155

I am trying to create a shortcut to our SAP system using sapshcut.exe, but I am encountering an issue where the username field is automatically populated with the Windows username. Below is the command I am using, but I expect the username field to remain blank to allow the user to sign in manually.

sapshcut.exe -sid=EAL -client=600 -user="" -pw="" -max -command=lm01

Running SAP GUI 8000.1.7.1161

View Entire Topic
lucas_machado
Product and Topic Expert
Product and Topic Expert

Hello Folks,

It's not recommended at all add user and password to shortcuts... Doing so could make it much easier for an attacker who manages to gain access to a PC to obtain the credentials.

See SAP Note 103019 - SAP shortcut: Program parameters

you may consider using other authentication methods (e.g SSO...)

 

 

But here is the actual answer you want:

If the parameter -pw is not specified and an SSO logon does not take place, the SAP shortcut generally adds the Windows user ID to the corresponding field on the logon screen. This is useful if the Windows user ID and SAP system user ID are identical. If you do not want this behavior, you can set the following REG_DWORD registry value as of SAP GUI for Windows 7.50 Patch Level 10 and SAP GUI for Windows 7.60 Patch Level 0:
 
HKEY_LOCAL_MACHINE\Software\SAP\SAPShortcut\Options\InitializeUserAsEmpty (32-bit operating system or 64-bit operating system with a 64-bit version of SAP GUI for Windows)

HKEY_LOCAL_MACHINE\Software\WOW6432Node\SAP\SAPShortcut\Options\InitializeUserAsEmpty (64-bit operating system with a 32-bit version of SAP GUI for Windows)

HKEY_CURRENT_USER\Software\SAP\SAPShortcut\Options\InitializeUserAsEmpty (user-specific)

If this registry value is set to "1", the Windows user ID is not copied to the corresponding field on the logon screen; instead, the field remains empty. The read sequence of this registry value is HKEY_CURRENT_USER and then HKYE_LOCAL_MACHINE, which allows a user-specific setting. If this value does not exist, the Windows user ID is used.

 

All the best,

Lucas

 

 

beergamesbeer
Explorer

Hi Lucas,

This has fixed my issue - Many thanks!