Jump to content

Recommended Posts

Posted

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??

Posted (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 by Pashers

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...