> -----Original Message-----
> From: [email protected]
> To: [email protected]
> Sent: 11/3/2006 6:25 AM
> Subject: [power-pro] Problems with strings in do-command

> With the command net stop servicename you can stop a windows service. 
> If the servicename contains spaces, you can use 
> net stop "service name".

> I want to do this with powerpro. I use the following command:
> Do("*Dos *Hide net stop Servicename")
> This command works fine. But if the servicename contains spaces, it 
> doesn't work. I tried different methods, for example the following:
> 1. Do("*Dos *Hide net stop "service name" ") Or 
> 2. Local service ?~"~ ++ "service name" ++ ?~"~
> Do("*Dos *Hide net stop &(service)")

> But it doesn't work. I allways get a bad-expression-error-message.

You're on the right track with attempt #2.  The question mark syntax
replaces double quotes with something else, and so you can embed double
quotes into the string your attempting to send.

Try this. Untested since I don't have any services I want to turn off, but I
think you get the idea.
 Do(?~*Dos *Hide net stop "Service name"~)

Paul


Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/power-pro/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to