tosca925 Posted October 20, 2005 Posted October 20, 2005 I need to copy 2 files into the system folder of my XP clients. Can some one give me a idea how to this with a script at logon on th OU.
ChrisH Posted October 20, 2005 Posted October 20, 2005 Will a simple copy or xcopy batch file not suffice? Run as a start up script and it will run with system permissions. Maybe add a check to see if file already exists as well.
Ric_ Posted October 20, 2005 Posted October 20, 2005 @tosca: You should run the script at startup (a simple copy will do) so that you don't run into permissions problems writing to C:
tosca925 Posted October 20, 2005 Author Posted October 20, 2005 I'm rubbish at scripts, would one of you guys be so kind to give me a example please?
ChrisH Posted October 20, 2005 Posted October 20, 2005 IF NOT EXIST %systemroot%\myfile.txt copy n:\myfile.txt %systemroot% That would suffice. The path would have to be on a mapped drive. I can do it in VB script as well but that would mean about 4 more lines of code for the same thing, but that would accept a UNC path. You seriously need to learn how to script though your not going to get far in this game without it and it will save you a hell of alot of time when doing certain tasks. Start here Microsoft Script center I have this book which is the only book from Microsoft I would have said was well worth the money. It's a bit dated now but all of the stuff is still relelvant. This one seems more recent but its only 350 pages compared to 850 pages of the first one...... Theres plenty of script generators out tere as well which help you learn try the MS site.
Ric_ Posted October 20, 2005 Posted October 20, 2005 If you put the file in the NETLOGON share you don't need to map a drive IIRC. You do need to learn to script - it is very handy and it looks really cool if you write scripts which output loads of text!
GrumbleDook Posted October 20, 2005 Posted October 20, 2005 Please note that the first workshop on the conference (after the keynote from Becta) is scripting 101 from Steve Rochford of CNWL. I've had a look at his notes and have drooled ... We will try and publish as many of the materials afterwards that we can ... maybe even some vid clips :-)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now