+ Post New Thread
Results 1 to 5 of 5
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 ...
  1. #1
    BassTech's Avatar
    Join Date
    Nov 2008
    Location
    West Midlands
    Posts
    475
    Thank Post
    48
    Thanked 30 Times in 23 Posts
    Rep Power
    23

    VBS - Full control permission???

    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:

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

  2. #2

    Join Date
    May 2008
    Location
    Cheshire
    Posts
    289
    Thank Post
    48
    Thanked 27 Times in 24 Posts
    Rep Power
    18
    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 11:01 AM.

  3. #3
    apeo's Avatar
    Join Date
    Sep 2005
    Location
    Lost
    Posts
    1,612
    Thank Post
    95
    Thanked 115 Times in 111 Posts
    Rep Power
    41
    Lee91 is using cacls but calling it from vbs.

  4. #4

    Join Date
    May 2008
    Location
    Cheshire
    Posts
    289
    Thank Post
    48
    Thanked 27 Times in 24 Posts
    Rep Power
    18
    Oh yeah, ignore me then :-). Long week.

  5. #5

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,447
    Thank Post
    1,438
    Thanked 1,168 Times in 797 Posts
    Rep Power
    707
    What exactly is the problem? Does it simply not do what you expect, or does it throw a WScript error?

SHARE:
+ Post New Thread

Similar Threads

  1. Exchange 2007 - Manage Full Access Permissions
    By mattx in forum Enterprise Software
    Replies: 4
    Last Post: 14th July 2012, 08:00 AM
  2. Admin Users - But not full control ?
    By cpjitservices in forum How do you do....it?
    Replies: 3
    Last Post: 17th August 2011, 03:50 PM
  3. Home paths in server 2k3 + full permissions to user
    By Oops_my_bad in forum Windows
    Replies: 7
    Last Post: 21st June 2007, 11:07 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •