gcue Posted July 23, 2009 Share Posted July 23, 2009 what is the difference between @ComSpec /c and RunDos? in our environment, several pcs can run ComSpec dos commands just fine while others cannot. i am going to try to run rundos, hopefully this will work on all pcs =) i will let you know Link to comment Share on other sites More sharing options...
KaFu Posted July 23, 2009 Share Posted July 23, 2009 (edited) Func _RunDOS($sCommand) Local $nResult = RunWait(@ComSpec & " /C " & $sCommand, "", @SW_HIDE) Return SetError(@error, @extended, $nResult) EndFunc ;==>_RunDOS RunWait? No real 'difference', as RunDOS utilizes @ComSpec /c... Edited July 23, 2009 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
ResNullius Posted July 24, 2009 Share Posted July 24, 2009 in our environment, several pcs can run ComSpec dos commands just fine while others cannot.When you say "while others cannot", what happens exactly?Does a command prompt open and then just disappear without executing the expected command?Also, are you familiar with the "@Comspec & "/k" switch?It prevents the command prompt from closing after execution, and is useful for seeing any error messages output by the command. Link to comment Share on other sites More sharing options...
gcue Posted July 24, 2009 Author Share Posted July 24, 2009 ahhh good to know.. didnt know about the /kturns out reason it wasnt working some pcs was path had spaces.. tooootally unrelated.good to know kafu that they are one in the same thanks fellas!When you say "while others cannot", what happens exactly?Does a command prompt open and then just disappear without executing the expected command?Also, are you familiar with the "@Comspec & "/k" switch?It prevents the command prompt from closing after execution, and is useful for seeing any error messages output by the command. 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