troubleshooting Question

Scripting to modify/create text file on Domain Machines

Avatar of every1isevil2
every1isevil2Flag for United States of America asked on
VB ScriptActive Directory
2 Comments1 Solution722 ViewsLast Modified:
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
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros