+ Post New Thread
Results 1 to 6 of 6
Windows 7 Thread, How to replace files on Windows 7 PC's at logon perhaps? in Technical; Hi, As support for sims is dropping next year for server 2003 I have created a new 2008R2 server and ...
  1. #1
    kennysarmy's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    1,401
    Thank Post
    93
    Thanked 48 Times in 34 Posts
    Rep Power
    31

    How to replace files on Windows 7 PC's at logon perhaps?

    Hi,

    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

    C:\Windows\sims.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.

    Thanks.

  2. #2


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    7,059
    Thank Post
    232
    Thanked 926 Times in 795 Posts
    Rep Power
    309
    option 1 run it as a startup script it then runs with admin permissions not the users permissions

    option 2 use group policy preferences to just copy the file there

    for option 1 id just create a script

    copy "\\server\share\connect.ini" "c:\program files (x86)\sims\sims .net\connect.ini" /y
    copy "\\server\share\sims.ini" "c:\windows\sims.ini" /y

    wouldnt bother with any error checking that way iuf you ever need to change it again just change the \\server\share copy and it will fire out next reboot

  3. #3
    EvLPhenom's Avatar
    Join Date
    Apr 2006
    Location
    Sutton Colfield
    Posts
    436
    Thank Post
    21
    Thanked 41 Times in 36 Posts
    Rep Power
    24
    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.

    Or you could use a GPP to replace the file?

  4. #4

    Join Date
    Apr 2006
    Location
    Hertfordshire
    Posts
    69
    Thank Post
    2
    Thanked 3 Times in 3 Posts
    Rep Power
    18
    Quote Originally Posted by EvLPhenom View Post
    Or you could use a GPP to replace the file?
    ^^ This.

    GPP is a much cleaner way to do this in my opinion.

    With GPP and Item Filtering you can do everything you need. File checks, version checks. All doable by GPP.

  5. #5
    kennysarmy's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    1,401
    Thank Post
    93
    Thanked 48 Times in 34 Posts
    Rep Power
    31
    This seems to work when I add it to the staff logon batch file:

    if exist "C:\Program Files (x86)\SIMS\SIMS .net\connect.ini" copy "\\fp2\shapps\simsinifiles\connect.ini" "C:\Program Files (x86)\SIMS\SIMS .net\connect.ini"
    if exist "C:\Program Files\SIMS\SIMS .net\connect.ini" copy "\\fp2\shapps\simsinifiles\connect.ini" "C:\Program Files\SIMS\SIMS .net\connect.ini"
    if exist "C:\Windows\sims.ini" copy "\\fp2\shapps\simsinifiles\sims.ini" "C:\Windows\sims.ini"

    I think my original testing failed as I was just trying to run the script rather than add it to the logon script

  6. #6
    Cache's Avatar
    Join Date
    Apr 2008
    Location
    Cumbria
    Posts
    1,305
    Thank Post
    488
    Thanked 190 Times in 184 Posts
    Blog Entries
    3
    Rep Power
    67
    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

    Spring Update grrrrr

    If you want a hand adjusting it for the connect.ini let me know, but other posts in that thread might help out too.
    Last edited by Cache; 28th November 2012 at 08:03 PM.



SHARE:
+ Post New Thread

Similar Threads

  1. HOW TO REPLACE A DAMAGED ADAPTOR ON A LAPSAFE MINI MENTOR TROLLEY
    By SYSMAN_MK in forum How do you do....it?
    Replies: 11
    Last Post: 14th February 2013, 02:54 PM
  2. RM CC4 Network - How to run files on startup via registry policy
    By davida50000 in forum Network and Classroom Management
    Replies: 0
    Last Post: 20th November 2012, 03:22 PM
  3. How to install SIMS on Windows Server 2008 R2?
    By RogerCorrigan in forum Windows
    Replies: 3
    Last Post: 29th September 2012, 08:25 PM
  4. Replies: 5
    Last Post: 13th April 2010, 06:26 PM
  5. Replies: 6
    Last Post: 20th October 2005, 07:48 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •