cancel
Showing results for 
Search instead for 
Did you mean: 

SAP GUI 720 Installation Server - How to copy saplogon.ini?

Former Member
0 Kudos

Hello,

I set up an installation server for SAP GUI 720 and want to hand the saplogon.ini out automatically after the installation succeded. To do this, I created the following script on the installation server:

strSrcFile = NwEngine.Variables.ResolveString("%SapSrcDir%\CustomerFiles\saplogon.ini")

strDstFile = NwEngine.Variables.ResolveString("%APPDATA%\SAP\Common\saplogon.ini")

The files from the source in dir CustomerFiles should be copied to the destination in the %appdata%/sap/common dir according to note 1409494. (This is an on-end-install-script)

But funnily enough it doesnt work. The file is not copied after an installation.

Can someone help please?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Not sure if you just omitted it in your post, but you also need to include the actual command for the copy:

E.g.

strSrcFile = NwEngine.Variables.ResolveString("%SapSrcDir%\Setup\CustomerFiles\saplogon.ini")
strDstFile = NwEngine.Variables.ResolveString("%AppData%\SAP\Common\saplogon.ini")
NwEngine.Shell.CopyFileEx strSrcFile, strDstFile, vbTrue

The problem you will have here is that you will typically not execute this as the actual end-user on a workstation, as they typically do not have adminstrator's rights. So if you execute it as another user, the file will be written to their user specific AppData folder, and subsequently not be visible to other users.

Refer to note 1409494.

So workaround is to store the SAPLOGON.INI in a common location and reference them on the client workstation with:

File name from command line parameter /INI_FILE=

or

File name from environment variable SAPLOGON_INI_FILE

Edited by: Ockert Baxter on Apr 13, 2011 1:12 PM

Note that you can also get around this by activating Local Security Handling, which allows users to deploy the package themselves even if they don't have admin rights.

Edited by: Ockert Baxter on Apr 13, 2011 1:56 PM

If you use the Single Package installer, make sure the CustomerFiles directory is in the root of your SAPSrcDir, otherwise it is not packaged. In my example it is incorrect (in the subfolder Setup).

Former Member
0 Kudos

Hi,

thank you for this! As I am on holidays, I will give it a try when I am back at work... Luckily our users work with administrative rights, hence we have no LSH configured yet.

Former Member
0 Kudos

Hi,

I am currently testing SAP GUI deployed with Server and I faced the same issue. In my case since my customers wants to manage modifying SAPLOGON.INI by themselves when they are not administrators, so the place to store SAPLOGON.INI remains the same, that is %APPDATA%\SAP\Common. Since you can not use %APPDATA% variable at the end of installation using server installation, you can add this 2 lines in the logon script, before you execute "nwsetup.exe":

copy /Y "
srvismsap\NW720GUI\CustomerFiles\saplogon.ini" "%APPDATA%\SAP\Common\saplogon.ini"

copy /Y "
srvismsap\NW720GUI\CustomerFiles\SapLogonTree.xml" "%APPDATA%\SAP\Common\SapLogonTree.xml"

Which are executed with the final user and then %APPDATA% is loaded properly, since services is a file which is located in %windir%, you should use "on the end installation" script provided by SAP GUI installation Server.

I hope this is usefull for you.

Best Regards.

Former Member
0 Kudos

Hello

I was able to use %APPDATA% in the "On End Install" event.

I am curious if anyone has input on how 'best' to maintain changes to customer files over time.

Answers (2)

Answers (2)

former_member206857
Active Participant
0 Kudos

Where do you put the customerfiles directory? does that directory need to be seen by all computers the GUI is being installed on?

I tried creating that folder under my installation server directory. I created a single install file and hoped it would generate a single exe with my INI in it. Never happened. Now I think I just need to script it. But I guess the location of the iNI must be somewhere where all installations cans see it

Matt_Fraser
Active Contributor
0 Kudos

Hi Joshua,

This is a fairly old thread, but regardless, you can find the answer in my document on this topic at .

If your intent is to have this included in a single-file-installer (useful for offline installations, not intended for online use), the issue might be with capitalization. The single-file-installer creation looks for a folder called CustomerFiles directly off the root of the installation server. If you give it a different name, even to the extent of missing the capitalization, it won't work.

If you just intend to have this be accessible for copying via script, or better yet in an online scenario for use as a central configuration repository, then you can call it whatever you want, but I still recommend using CustomerFiles so that it will be compatible with single-file installers.

Regards,

Matt

Former Member
0 Kudos

Hello Jann,

I am performing the same setup in my environment. I agree with the below statement that you can copy it based on the "on end installation" and I have done this in the past.

Since we have many different groups of users this became somewhat complex, and I actually ended up talking to my Wintel network admin. He designed a login script and GPO that delivered specific SAPlogon.ini files to different user groups.

No, this is not an SAP best practice scenario, but it works and is an alternative route that worked for me in a complex landscape.