Link to home
Start Free TrialLog in
Avatar of every1isevil2
every1isevil2Flag for United States of America

asked on

Scripting to modify/create text file on Domain Machines

I need a script that does the following:

Deletes the file called "SyncClient.ini" located at

C:\Program Files\SMART Technologies\SMART Sync Student\


Creates a new file called "SyncClient.ini"

The contents of the file is:

#BEGIN

LanguageID=0000
Visible=0
AutoStart=1
ConnectTeacherID="Testing Supervisor"
ConnectIP="10.233.0.1"
StoreFilesToMyDocs=1
CustomSharedFolder=""
RedrawHooks=1000
MirrorDriver=1000
UnicastNoDelay=1
MulticastTTL=1
EnableChat=1
EnableQuestions=1
EnableFileTransfer=1
EnableHelp=0
DisplayExit=0
BroadcastZoomWindow=0
CtrlAltDelSettings=0
NICListLength=0
PasswordHash=""
NamingServerLoc=""
NamingServerPassedTest=0
SecurityUsed=0
ConnectionUsed=3
StudentIDMode=1
StudentID="_WORKSTATION_NAME_"
ActiveDirStudentIdField=""
EnableNICDefaultOrder=1
NTGroupListLength=0

#END


The only thing that needs changed is the StudentID= needs to be updated with the current workstation name.  I guess a WMI query will work.

So for example, on a workstation named "lab-1.student.gorton.edu" once the script is run it will have a file located at "C:\Program Files\SMART Technologies\SMART Sync Student\" named "SyncClient.ini" and the contents would be:


LanguageID=0000
Visible=0
AutoStart=1
ConnectTeacherID="Testing Supervisor"
ConnectIP="10.233.0.1"
StoreFilesToMyDocs=1
CustomSharedFolder=""
RedrawHooks=1000
MirrorDriver=1000
UnicastNoDelay=1
MulticastTTL=1
EnableChat=1
EnableQuestions=1
EnableFileTransfer=1
EnableHelp=0
DisplayExit=0
BroadcastZoomWindow=0
CtrlAltDelSettings=0
NICListLength=0
PasswordHash=""
NamingServerLoc=""
NamingServerPassedTest=0
SecurityUsed=0
ConnectionUsed=3
StudentIDMode=1
StudentID="lab-1"
ActiveDirStudentIdField=""
EnableNICDefaultOrder=1
NTGroupListLength=0




ASKER CERTIFIED SOLUTION
Avatar of jostrander
jostrander
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of every1isevil2

ASKER

Looks like gold to me.  Let me test it out and get back with you.  Thanks!