Jump to content

Help me about _RunDos


Recommended Posts

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 !

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...