Briandr Posted December 17, 2014 Share Posted December 17, 2014 Would Run as opposed to RunWait be better for this? RunWait(@ComSpec & " /c net localgroup administrators /ADD " & @LogonDomain & "\PCSupport" ,"",@SW_HIDE) RunWait(@ComSpec & " /c net localgroup administrators /ADD " & @LogonDomain & "\svcs_ricoh" ,"",@SW_HIDE) First line executes correctly second one not so much. From the help file it says RunWait runs and executes. Should I do just Run? Thanks Link to comment Share on other sites More sharing options...
Developers Jos Posted December 17, 2014 Developers Share Posted December 17, 2014 Not sure why Run() would solve anything here. What is the issue with the second line? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Briandr Posted December 17, 2014 Author Share Posted December 17, 2014 just not executing, but is odd and I think the problem it is executing in (Dell Kace). Outside of the environment it works fine. So I too thought RunWait should be fine too.Just looking at other possible ways to tame this. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted December 17, 2014 Moderators Share Posted December 17, 2014 My question is have you tried it? You're asking if you should use Run or RunWait; I daresay trying it for yourself would take you less time than posting here. Then, if it doesn't work, we can try to assist you in finding out why. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Briandr Posted December 17, 2014 Author Share Posted December 17, 2014 (edited) Come on give me a break. I am always appreciative of the help I get here. I did try it, both ways. Please give me some credit. I am not a jerk on the forums Edited December 17, 2014 by Briandr Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 17, 2014 Moderators Share Posted December 17, 2014 (edited) Using the close session switch, the only difference between the two, I'd imagine, is that if you want to interact with the stdout/in/err, you'd use the Run() scenario, if you're launching and moving on to another part of your script, you'd use the Run() scenario, if you need to wait for the comspec to end before you do something else, you'd use the RunWait() scenario. Edit: I just want to iterate, this is my interpretation (and a stab in the dark at helping), I don't play across networks so it may be moot even posting here. Edited December 17, 2014 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted December 17, 2014 Moderators Share Posted December 17, 2014 Should I do just Run? My point was that you're being unclear by asking "Should I do just Run", rather than saying "I've tried both ways, and neither is working" That said, I would change your /c to /k, so you can view the command line window and potentially see why it is failing. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
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