Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


COMSPEC and cacls not working properly

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,36868
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> COMSPEC and cacls not working properly
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 COMSPEC and cacls not working properly - 8/9/2006 5:38:17 AM   
  Tnguyen81

 

Posts: 7
Score: 0
Joined: 8/8/2006
Status: offline
intRunError = objShell.Run("%COMSPEC% /k Echo Y| cacls " _
& strDirectory & " /t /c /g Administrators:F "_
& """Domain Admins"":F " & strUsername & ":C " & "SYSTEM:F" ,2,True)

thats my vbscript for cacls to set permissions.  The problem I am having now is that if I go %COMSPEC% /c (it closes the window) the permissions never get set... but if I got %COMSPEC% /k (leaves the window open) the permissions do get set properly.. I'm trying to figure out why I'm having this problem.. I dont know why its doesn't work when it closes manually..

Any help?  I'm stumpped and annoyed... who needs sum
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> COMSPEC and cacls not working properly Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts