mrrlg Posted March 4, 2005 Posted March 4, 2005 Ok, script wizzards I need to figure out how to push out a template to selected users that would end up in C:\documents and Settings\<user>\Application Data\Microsoft\Templates folder. The user would have to enter their name in the script in a $Username = InPutBox to be added later in the script. The line FileCopy("C:\test.txt", "C:\Documents and Settings\$Username\Application Data\Microsoft\Templates") appears to run, but the template does not show up in the users profile. I do not get any error messages and the file is not copied. I suspect it has to do with either how the $username is processed or perhaps the fact that Application Data is a hidden folder. Any ideas?
Developers Jos Posted March 4, 2005 Developers Posted March 4, 2005 Ok, script wizzards I need to figure out how to push out a template to selected users that would end up in C:\documents and Settings\<user>\Application Data\Microsoft\Templates folder. The user would have to enter their name in the script in a $Username = InPutBox to be added later in the script.The line FileCopy("C:\test.txt", "C:\Documents and Settings\$Username\Application Data\Microsoft\Templates") appears to run, but the template does not show up in the users profile. I do not get any error messages and the file is not copied. I suspect it has to do with either how the $username is processed or perhaps the fact that Application Data is a hidden folder.Any ideas?<{POST_SNAPBACK}>you have the variable inside the quoted string... should be :"C:\Documents and Settings\" & $Username & "\Application Data\Microsoft\Templates") But what about doing it this way:FileCopy("C:\test.txt", @AppDataDir & "\Microsoft\Templates")Should give the correct directory without any prompting... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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