All Forums >> [Scripting] >> WSH & Client Side VBScript >> Folder Permissions and Folder Creation Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
I'm a bit of a newb to VBScript and have pretty much copied scripts from various sites and chopped and changed them until they work, I'm not really sure what all the commands do at this time, so please bear with me.....
Here is a script I use to copy BGInfo files off of the server which are place onto a users computer. THe script then takes the shortcut and places it in the All Users Startup folder (this may not be the best way, but it works!)
We have recently had a couple of users discover that it is easy to go in and change the wallpaper image in BGinfo to thier own. To combat this, on the users who do it, I have manually gone to the BGInfo folder and set the Special Permissions so that the user is denied access to delete and modify the contained files and folders which has worked.
I'd like to be able to do this to all of our users but manually sorting out permissions for 200 folders would take an age; could someone please advise me if there is anyway to do this through VBScript?
I also have a small script which I run before the BGInfo script to make a BGInfo folder on the C: drive. I tried to include it at the beginning of the script above, but after it runs the first time, it brings back a "file exists" error and does not continue.
This is the script:
Is there a bit of if/else script that would check t see if the folder was there so it doesn't bring up the error - I'd like it as silent as possible.