Jump to content

Recommended Posts

Posted

I've checked and checked and re-double-checked the FAQ already, but... I'm trying simply to open the services control, which can be found in Control Panel/Administrative Tools/Services. The path to the file is: C:\WINDOWS\system32\services.msc

As it is not an .exe, .com, .bat, etc.. Run() gives an error. I've tried:

RunWait(@COMSPEC " /c Start C:\WINDOWS\system32\services.msc")

With no luck. Am I doing something wrong?

RunWait(@COMSPEC " /c Start c:\windows\system32\services.msc")

WinWait("Services", "Services (Local)")

$text = ControlGetText("Services", "Services (Local)", 12786)

MsgBox(0, "Services Tester", $text)

Exit

The error message I receive is:

"Error: Error in expression."

Please help!

[u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia

Posted

Hi neogia. Welcome to the forums.

Looks to me like you forgot the '&" after 'COMSPEC'. I ran the modifed code just fine.

RunWait(@COMSPEC & " /c Start c:\windows\system32\services.msc")

WinWait("Services", "Services (Local)")

$text = ControlGetText("Services", "Services (Local)", 12786)

MsgBox(0, "Services Tester", $text)

Exit
Posted

Thanks for the timely response. In that case, the FAQ needs to be updated with the missing "&"

Thanks again.

True, the 3.1.1 helpfile has the missing & but is already corrected within the Beta Helpfile. Very misfortunate for the error to have misled you.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...