chiners_68 Posted March 22, 2007 Posted March 22, 2007 (edited) the following line works in a batch file. changing permissions on C:\Program Files\activePDF for local users to modify rights. "\\Server\Software\OS\Windows XP\CALCS\cacls.exe" "C:\Program Files\activePDF" /t /e /g "users":c how do i quote this to work as a runwait.? this is what ive got so far but it dosent work. runwait('\\Server\Software\OS\Windows XP\CALCS\cacls.exe ' & 'C:\Program Files\activePDF /t /e /g users :c ') Edited March 22, 2007 by chiners_68
GEOSoft Posted March 22, 2007 Posted March 22, 2007 the following line works in a batch file. changing permissions on C:\Program Files\activePDF for local users to modify rights. "\\Server\Software\OS\Windows XP\CALCS\cacls.exe" "C:\Program Files\activePDF" /t /e /g "users":c how do i quote this to work as a runwait.? this is what ive got so far but it dosent work. runwait('Server\Software\OS\Windows XP\CALCS\cacls.exe ' & 'C:\Program Files\activePDF /t /e /g users :c ')First of all take a look at your runwait line. Notice anyting missing? RunWait('\\Server\ George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
chiners_68 Posted March 22, 2007 Author Posted March 22, 2007 that was just a typo on my post not the actual script. i will amend.
GEOSoft Posted March 22, 2007 Posted March 22, 2007 (edited) that was just a typo on my post not the actual script. i will amend.The Quotes are also wrong in "C:\Program Files\activePDF" /t /e /g "users":cYoy can not have double quotes inide of double quotesYou could try$App = FileGetShortName("\\Server\Software\OS\Windows XP\CALCS\cacls.exe") & Chr(32)RunWait ($App & 'C:\Program Files\activePDF /t /e /g "users":c')If users does not need to be quoted then remove the quotes around that as well so they are not sent as part of the string.Edit:Here is the rule about Quotes, If a string contains single quotes then surrount it with double quotes. If it contains double quotes then surround it with single quotes. If it contains both then break the stringExample: $A = "This part needs 'double' quotes" & ' This part needs "single" quotes' Edited March 22, 2007 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
chiners_68 Posted March 22, 2007 Author Posted March 22, 2007 (edited) GEOSoft, Cant get this to work. $App = FileGetShortName("\\SERVER\Software\OS\Windows XP\CALCS\cacls.exe") & Chr(32) RunWait($App & 'C:\Program Files\activePDF /t /e /g "users" :c') what does this bit do..? Chr(32) Edited March 22, 2007 by chiners_68
GEOSoft Posted March 22, 2007 Posted March 22, 2007 (edited) GEOSoft, hi thanks for your coments.i dont see the point in putting $App = FileGetShortName("\\Server\Software\OS\Windows XP\CALCS\cacls.exe") & Chr(32) as it takes more to write than just by adding \\Server\Software\OS\Windows XP\CALCS\cacls.exe to the runwait line.ill give you one a try.You're right You have to type an extra 6 characters but you can probably do that in less than 2 hours.The reason is that on occasion commands don't like a space as in Windows XP. Edited March 22, 2007 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
MHz Posted March 22, 2007 Posted March 22, 2007 Like this Runwait('"\\Server\Software\OS\Windows XP\CALCS\cacls.exe" "C:\Program Files\activePDF" /t /e /g users :c ')
GEOSoft Posted March 22, 2007 Posted March 22, 2007 Like this Runwait('"\\Server\Software\OS\Windows XP\CALCS\cacls.exe" "C:\Program Files\activePDF" /t /e /g users :c ') Looking at his batch file code I'm not so sure that he needs any of the inner quotes. Runwait("\\Server\Software\OS\Windows XP\CALCS\cacls.exe C:\Program Files\activePDF /t /e /g users :c ") might even do it. No matter, I gave him the rule and the documentation about quotes in the help file is quite clear. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
jinxter Posted March 22, 2007 Posted March 22, 2007 me, who always tries to find other ways am saying, use setacl instead of cacls. I have had problems with cacls regarding the order in which it sets the rights. > there are 10 types of people in the world, those who understand binary and those who don't.
chiners_68 Posted March 22, 2007 Author Posted March 22, 2007 MhZ, gEOSoft, they didnt work. any other ideas..?
chiners_68 Posted March 22, 2007 Author Posted March 22, 2007 (edited) Hi Guys, with some playing around i got it working. thanks all for your help. this is what I did. Runwait('"\\Server\Software\OS\Windows XP\CALCS\cacls.exe" "C:\Program Files\activePDF" /t /e /g "users":c ') Edited March 22, 2007 by chiners_68
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now