Jump to content
Sign in to follow this  
t2d2c2

Help me about _RunDos

Recommended Posts

t2d2c2

Sorry all because my English very bad !

funtion _RunDos has Syntactic structure is :

_RunDos(" command line ")

But when my conmand line has " " , not run script !

I want run command line set IP.

In Dos has command line set IP is :

netsh interface IP set address "L" static 192.168.0.1 255.255.255.0

L : is netcard's name

And be in " "

when this,script error . Not run !

Please help me !

Share this post


Link to post
Share on other sites
SadBunny

Sorry all because my English very bad !

funtion _RunDos has Syntactic structure is :

_RunDos(" command line ")

But when my conmand line has " " , not run script !

I want run command line set IP.

In Dos has command line set IP is :

netsh interface IP set address "L" static 192.168.0.1 255.255.255.0

L : is netcard's name

And be in " "

when this,script error . Not run !

Please help me !

To use " (quote) in a string, you can do multiple things:

1) Try:

MsgBox(0,"test","I want to show ""quotes"" in this sentence.")oÝ÷ ØÚ-zØZ¶Ø^ªê-zÆ«yÚ.nWÂ+a¢ëªÚr׫²)ÛzÜzshÂØ^{^®ÞµêðYn±æªº^{azËkx"Ë^iÚn·)àºazËkx0éî²)à¢yrjȧWªº^Ù:òjëh×6MsgBox(0,"test",'This sentence also has "quotes" in it.')

Note that here I use an apostrophe ( ' ) around the string. AutoIt will treat this exactly the same as " (quote) only now you can use quotes in your string without trouble.


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites
Azazel

Sorry all because my English very bad !

funtion _RunDos has Syntactic structure is :

_RunDos(" command line ")

But when my conmand line has " " , not run script !

I want run command line set IP.

In Dos has command line set IP is :

netsh interface IP set address "L" static 192.168.0.1 255.255.255.0

L : is netcard's name

And be in " "

when this,script error . Not run !

Please help me !

When you have some " " you have to replace by ' '

So try this and let me know:

#include <Process.au3>
$rc = _RunDos('netsh interface IP set address "L" static 192.168.0.1 255.255.255.0')

Aza

Share this post


Link to post
Share on other sites
t2d2c2

Thanks to : Azazel & SadBunny very much .

Sorry,because my English very bad :)

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×