I need some help with a script/process to be able to overwrite a file at each login.
Here is my situation:
First, I understand that some settings I state below may not be "best" but they are how they are in our environment. That's it.
We are using SAP 7.20 PL6. For those unfamiliar with SAP 7.20, it stores its saplogon.ini file (server configuration file) in the user application folder (%appdata%\sap\common)
This is different than SAP 7.10, which stored it's saplogon.ini file in c:\windows.
Our user base does not have admin rights, which allowed us to completely control the saplogon.ini while it resided only in c:\windows. We used a GPO script to overwrite c:\windows\saplogon.ini at logon. It allowed centralized management of the file.
That same control now needs to be in place with 7.20. But now, the user has full control over their own profile and possibly "muck-up" their server connections.
Also to note: when you launch SAP 7.20, it first looks for saplogon.ini in %appdata%\sap\common. If it find it there, it uses that file. If it does not find it there, it looks to c:\windows. If c:\windows\saplogon.ini exists, it copies it to %appdata%\sap\common then uses the file from the userprofile. If c:\windows\saplogon.ini does not exist, SAP opens with a blank server configuration (and creating a blank %appdata%\sap\common\saplogon.ini file).
I would like to be able to control the saplogon.ini file that the users have, all out of LANDesk (not GPO).
I have run through several scripts, but have come up with the Batch file I have attached to this post.
I have the batch file in a Local Scheduler Script:
REMEXEC0=<qt/>%LDMS_CLIENT_DIR%\LocalSch.exe<qt/> /del /range=%quote%1001|2000%quote%
REMEXEC1001=<qt/>%LDMS_CLIENT_DIR%\LocalSch.exe<qt/> /exe=%quote%"\\PATH_TO_BATCH FILE\Support_ini.bat"%quote% /cmd=<qt/><qt/> /taskid=10001 /freq=900 /toe=logon /start=%quote%08 Feb 2011 10:47:55%quote%
My issue now, is that this batch file does not run silent. It is obtrusive. It pops up in the user's face. It does happen at login (at most every 15 min)...but sometimes it doesn't run for 10 minutes after login. Deleting all the saplogon.ini files takes some time, so if a user opens SAP while the script is running (after del saplogon.ini /s but before the new file is copied to c:\windows), they will get a blank server configuration - with the only solution, to reboot after 15 min.
So basically, I want to be able to control the saplogon.ini file, with some mechanism that is silent.
Can you all help?
I know I just dropped a lot of info, so please ask if I can clarify anything.
Production_ini.bat.zip 620 bytes