Scripts Thread, VBS - Full control permission??? in Coding and Web Development; 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 ...
3rd December 2012, 03:50 PM #1
VBS - Full control permission???
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
IDG Tech News
6th December 2012, 11:59 AM #2
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
Last edited by Pashers; 6th December 2012 at 12:01 PM.
6th December 2012, 12:50 PM #3
Lee91 is using cacls but calling it from vbs.
6th December 2012, 01:49 PM #4
Oh yeah, ignore me then :-). Long week.
6th December 2012, 01:53 PM #5
What exactly is the problem? Does it simply not do what you expect, or does it throw a WScript error?
By mattx in forum Enterprise Software
Last Post: 14th July 2012, 09:00 AM
By cpjitservices in forum How do you do....it?
Last Post: 17th August 2011, 04:50 PM
By Oops_my_bad in forum Windows
Last Post: 21st June 2007, 12:07 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)