Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Problems with %comspec% and SetAcl.exe

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Problems with %comspec% and SetAcl.exe
  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 >>
 Problems with %comspec% and SetAcl.exe - 6/24/2007 7:44:59 PM   
  TOPHOLM


Posts: 22
Score: 0
Joined: 5/14/2006
From: Copenhagen
Status: offline
Hi everyone
I'm trying to create a script to correct NTFS permissions on a bunch
of files on a W2K3 server (std. edt.) but I'm experiencing problems
getting the script to do as I want it to do. I hope someone inhere is
able to help.

It's a really simple script using the capability of the utility
SetACL.exe (http://www.helge.mynetcologne.de/setacl/index.htm)

When I run the script nothing happens, but if I for testing purposes
copy the cmdline variable and paste it directly in to a command prompt
the changes is implemented and the output gets piped to the text file
as intended.

So, my question is: WHY DOES IT NOT WORK IN THE SCRIPT ?!?


      

Anyway I hope someone can help... I don't really want to change
permissions on 150 files on each server manually *LOL*

Best Regards
Søren Tøpholm

 
 
Post #: 1
 
 RE: Problems with %comspec% and SetAcl.exe - 6/24/2007 10:51:40 PM   
  mbouchard


Posts: 1924
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
Try removing the |, not sure why that is in there, but I am not familiar with the setACL app.  Also, change /c to /k this way the cmd window will stay open and you can see what, if any, errors there are.  Also, if %comspec% is not working, try cmd.exe instead.

objShell.Run ("%COMSPEC% /K " & cmdline), 2, True 

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to TOPHOLM)
 
 
Post #: 2
 
 RE: Problems with %comspec% and SetAcl.exe - 6/24/2007 10:52:07 PM   
  TOPHOLM


Posts: 22
Score: 0
Joined: 5/14/2006
From: Copenhagen
Status: offline
Hi again

Just wanted you to know I found the solution. All I had to do was
delete the pipe


      

Thanks anyway

BR
Søren

(in reply to TOPHOLM)
 
 
Post #: 3
 
 
 
  

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 >> Problems with %comspec% and SetAcl.exe 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