How to replace files on Windows 7 PC's at logon perhaps?
As support for sims is dropping next year for server 2003 I have created a new 2008R2 server and installed SQL etc and created a new sims instance ready to make the swap.
On each workstation that runs sims there are two files that need to be edited (or replaced).
C:\Program Files (x86)\SIMS\SIMS .net\connect.ini
Both of these files contain lines of code that points to the old server name.
I was hoping to just add something in to the logon script for staff that did something like:
if file exists then copy "\\servername\share\simsinifiles\connect.ini" "C:\Program Files (x86)\SIMS\SIMS .net\connect.ini"
if file exists then copy "\\servername\share\simsinifiles\sims.ini" "C:\Windows\sims.ini"
However whether it is standard permissions on the folders or the UAC being turned on I cannot get the files to copy over to the C:\Windows\ folder - the other one in to C:\Program Files (x86)\SIMS\SIMS .net works fine....
What are my options?
1. Logon to each PC manually as admin after the server change-over and edit/replace the files with the new - around 100
2. Create a GPO that can test for the existance of the files and if there copy over the new versions.
3. Work out a way to script the file copy and put this in the logon script for staff.
If anyone has any ideas/comments I would be grateful.
You could use a start up script which would do the same thing. Might also be worth putting something in to check to see if the correct version of the file is there or if the computer has already had the script run so that it doesn't do it every time a user logs in or boots up.
I wrote the script attached to this post for updating our SIMS.ini when we moved servers a couple of years ago now, not tested on Windows 7 but should work as far as I can tell. I just added it as a startup script for a while and then eventually removed it again, it just searches through the file and replaces OLDSERVER with NEWSERVER