on 07-21-2011 5:26 PM
I'm using sapshcut.exe to logon to SAP. Following is syntax of command that Iu2019m using for that prupose:
sapshcut.exe /sysname=IDES /client=800 /user=xxxx /pwd=yyyy
By default, the configuration file (saplogon.ini) that is being used during this process by sapshcut.exe is located in user directory (SAP GUI 7.2). However, Iu2019d like to use a different configuration file that is located at other location (e.g., h:/test/saplogon.ini). SAP has mentioned to use additional parameter "INI_FILE" for that purposes so Iu2019m using following command:
sapshcut.exe /sysname=IDES /client=800 /user=xxxx /pwd=yyyy /INI_FILE=h:/test/saplogon.ini
No matter what value I defined for the u2018INI_FILEu2019 parameter, SAP ignores it and always uses default configuration file located in the user directory and if given SAP system does not exist in that configuration file then I report an error. Interestingly, I found that if use 'saplogon.exe' instead of 'sapshcut.exe' and provide same parameter value for 'INI_FILE' parameter then SAP overwrite the default configuration file and uses saplogon.ini defined there. But i cannot use saplogon.exe as I must have to use sapchcut.exe to directly log into SAP system for automation testing.
I've also found out that the only way sapshcut.exe can overwrite the default ini file is through the use of environment variable "SAPLOGON_INI_FILE". But rather than using environment variable I'd like to define configuration file during the command line.
Any help would be really appreciated.
We stumbled upon the same problem. Thank you for mentioning that using the environment variable works.
This leads to the following single command line as a workaround.
First set the needed saplogon.ini and then execute in a nested command shell the call to sapshcut.exe
cmd /c set SAPLOGON_INI_FILE=C:\config\saplogon.ini & cmd /c "%ProgramFiles%\SAP\FrontEnd\SAPgui\sapshcut.exe" -user= -pw= -language=E -system=XXX -client=100
This works, but only if there is not already an instance of saplogon.exe running with a different saplogon.ini.
Best regards,
Axel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Obaid
i dont know why a sapshortcut need the information from the saplogon.ini--- because all neccessary
details are in the shortcut itself...
You can call the
sapshcut.exe /?
to see which paramters are possible. Other Paramaters are not possible.
The SAPLOGON.exe or Saplgpad.exe can be used with the / INI_FILE
paramtere.
Best Regards
Sven
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.