BassTech Posted December 3, 2012 Posted December 3, 2012 Hi All, All I'm trying to do is give "Everyone" Full Control of %USERPROFILE%\Local Settings\Temporary Internet Files\Content.Outlook by using a .vbs script but am having REAL difficulty... This is what I have: Set objShell = CreateObject("WScript.Shell") userProfilePath = objShell.ExpandEnvironmentStrings("%USERPROFILE%") strHomeFolder = "%USERPROFILE%\Local Settings\Temporary Internet Files\Content.Outlook" Set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FolderExists(strHomeFolder) Then ' Assign user permission to home folder. intRunError = objShell.Run("%COMSPEC% /c Echo Y| cacls " _ & strHomeFolder & " /e /c /g Everyone:F ", 2, True) If intRunError <> 0 Then Wscript.Echo "Error assigning permissions for user " _ & strUser & " to home folder " & strHomeFolder End If End If WScript.Quit Any ideas??
Pashers Posted December 6, 2012 Posted December 6, 2012 (edited) Sorry it might be a little late but have you looked at cacls? cacls "%USERPROFILE%\Local Settings\Temporary Internet Files\Content.Outlook" /g everyone:F I think that's it Edited December 6, 2012 by Pashers
LosOjos Posted December 6, 2012 Posted December 6, 2012 What exactly is the problem? Does it simply not do what you expect, or does it throw a WScript error?
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