RSMTECH_KC
asked on
SAP Business One on Server 2008 R2 with roaming profiles?
Does anyone use SAP Business One with roaming profiles? I am stuck in an issue where SAP is storing critical user files in the local and locallow appdata folders, which are not included in the roaming profile. What about a script to copy these files to the roaming profile at user log off?
Any advice would be greatly appreciated. Thanks!
Any advice would be greatly appreciated. Thanks!
ASKER
I'm not sure if this is the same. Our users are working in the SAP B1 client on 2008 R2 terminal servers. I was not able to locate the SAPLOGN.ini at C:\Windows. The files that seem to be causing the issues for us are located at the following path; also listed are the names of the files themselves.
C:\Users\{UserProfile}\App Data\Local \SAP\SAP Business One\
b1-conf.dtd
b1-current-user.xml
-REGISTRY-HKEY_CURRENT_USE R-SOFTWARE -SAP-SAP_M anage-SAP_ Business_O ne-LogIN-C ompany-Com pany.binar y
-REGISTRY-HKEY_CURRENT_USE R-SOFTWARE -SAP-SAP_M anage-SAP_ Business_O ne-LogIN-C ompanyName -CompanyNa me.binary
-REGISTRY-HKEY_CURRENT_USE R-SOFTWARE -SAP-SAP_M anage-SAP_ Business_O ne-LogIN-P ort-Port.b inary
-REGISTRY-HKEY_CURRENT_USE R-SOFTWARE -SAP-SAP_M anage-SAP_ Business_O ne-LogIN-S erver-Serv er.binary
-REGISTRY-HKEY_CURRENT_USE R-SOFTWARE -SAP-SAP_M anage-SAP_ Business_O ne-LogIN-S erverType- ServerType .binary
If these files are present in the user profile the user settings are remembered during SAP login. If they are not present the user is forced to go through the initial process where they must choose a company, etc.
C:\Users\{UserProfile}\App
b1-conf.dtd
b1-current-user.xml
-REGISTRY-HKEY_CURRENT_USE
-REGISTRY-HKEY_CURRENT_USE
-REGISTRY-HKEY_CURRENT_USE
-REGISTRY-HKEY_CURRENT_USE
-REGISTRY-HKEY_CURRENT_USE
If these files are present in the user profile the user settings are remembered during SAP login. If they are not present the user is forced to go through the initial process where they must choose a company, etc.
If it
a) just those two files
b) there is no way of changing SAP B1 to make it look for them somewhere else
why don't you just create a script that copys them to somewhere else in their profile and back again when the user logs off and on.
eg on logoff
copy %userprofile%\AppData\Loca l\SAP\SAP Business One\b1-conf.dtd %userprofile%\documents\
copy %userprofile%\AppData\Loca l\SAP\SAP Business One\b1-current-user.xml %userprofile%\documents\
on logon do the reverse
Seriously nasty and clunky as hell..... but it will more than likely work.
a) just those two files
b) there is no way of changing SAP B1 to make it look for them somewhere else
why don't you just create a script that copys them to somewhere else in their profile and back again when the user logs off and on.
eg on logoff
copy %userprofile%\AppData\Loca
copy %userprofile%\AppData\Loca
on logon do the reverse
Seriously nasty and clunky as hell..... but it will more than likely work.
ASKER
Thanks, aoakeley. That's what I am doing now, minus the logon script part. I am running a user logoff script that copies these files directly into the users roaming profile on the network share. When the user logs in again these files are loaded back to the server with the roaming profile. Problem solved...or so I thought. If the user does not launch SAP, in turn these files are not modified and the logoff script is not only not copying the files back to the roaming profile share, it is actually deleting the folder altogether. Here is the script:
robocopy "%userprofile%\AppData\Loc al\SAP\SAP Business One" "\\{my server}\TSProfiles\%userna me%.{my domain}.v2\AppData\Local\S AP\SAP Business One" /s /LOG+:INFO
I want the script to copy the files to the destination and overwrite if they have been modified, but I surely don't want them deleted at the destination if they are not modified. Like I said earlier, this script works perfectly as long as the files are accessed and/or modified. Am I using the wrong switch or missing a switch somewhere?
robocopy "%userprofile%\AppData\Loc
I want the script to copy the files to the destination and overwrite if they have been modified, but I surely don't want them deleted at the destination if they are not modified. Like I said earlier, this script works perfectly as long as the files are accessed and/or modified. Am I using the wrong switch or missing a switch somewhere?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks! Creating a reverse logon script solved the file deletion.
We're using SAP Gui with Business Explorer and came across the same thing, our SAP Admin sent me the following PDF which fixes the problem:
http://wise.winshuttle.com/getAttach/92/AA-01615/sapnote_0001031740.pdf
Below is the Script referred to in the pdf.
You basically just setup a machine SAPLOGON_INI_FILE environment variable pointing to what ever location you want the ini file to be found.
Hope that helps.
Cheers
Open in new window