Merrik Posted March 29, 2011 Posted March 29, 2011 Hi, I am having trouble with SC.EXE and Autoit. If I do this: $SvcStop = _RunDOS("Net stop COMsysapp") This works great. If I do this below: $SvcCfg = _RunDOS("sc config COMsysapp start= auto") When run, this starts spawning multiple process of the script. Next I tried: $SvcCfg = "sc config COMsysapp start= auto" RunWait(@ComSpec & " /C " & $SvcCfg, "", @SW_HIDE) When run, this also starts spawning multiple process of the script. What am I doing wrong? Thanks
hannes08 Posted March 29, 2011 Posted March 29, 2011 Hi Merrik,did you try the service UDF by engine I think this is pretty handy to use. Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Merrik Posted March 29, 2011 Author Posted March 29, 2011 I just tried calling a batch script with SC CONFIG in it and it does the same thing, it just starts spawning multiple instances of the script process.
tkocsir Posted March 29, 2011 Posted March 29, 2011 I don't know if you are using this command inside a loop, but if yes, then you should know that "net" command pauses the execution until it is finished but "sc" doesn't wait. So the RunWait, _RunDOS functions doesn't make it wait until finish.
spudw2k Posted March 29, 2011 Posted March 29, 2011 I don't suppose you named your script SC.exe or SC.bat did you? Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
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