Sign in to follow this  
Followers 0
EliTe_ThuT

_RunDos

8 posts in this topic

#1 ·  Posted (edited)

Hi,

I would like to know what is the thing that doesn't work with this, and how to resolve it.

#include <Process.au3>

$01 = _RunDos("cd " & @ScriptDir & "\exe{ENTER}ServiceLogger.exe -i{ENTER}net start servicelogger{ENTER}")
Sleep(5000)
$02 = _RunDos("cd " & @ScriptDir & "\exe{ENTER}net stop servicelogger{ENTER}ServiceLogger.exe -d{ENTER}")

Thanks

Edited by EliTe_ThuT

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Have you tried running this command in a dos box manually?

I suspect your command is flawed. I know for a fact that _RunDOS works wonderfully, there is something wrong with your command.

It looks like your use of @scriptdir is used incorrectly and the ENTER is not supposed to be there either.

RTFM!

Edit: and your name is misleading, you are note elite =) :whistle:

Edited by joshiieeii

Share this post


Link to post
Share on other sites

Hi,

I would like to know what is the thing that doesn't work with this, and how to resolve it.

#include <Process.au3>

$01 = _RunDos("cd " & @ScriptDir & "\exe{ENTER}ServiceLogger.exe -i{ENTER}net start servicelogger{ENTER}")
Sleep(5000)
$02 = _RunDos("cd " & @ScriptDir & "\exe{ENTER}net stop servicelogger{ENTER}ServiceLogger.exe -d{ENTER}")

Thanks

Who told you to use {ENTER} in the string for _RunDos(). I'm pretty sure it was NOT the help file, right? :whistle:

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

_RunDOS is not like Send(). It doesn't accept keys like {ENTER}.

_RunDOS is literally, just like entering this into your Start > Run command.

%comspec% /c $sCommand

Where $sCommand is obviously what you would pass to _RunDOS()

To accomplish what you're looking to do, I would suggest filewrite'ing to a bat file.

Something like this:

$hFile = FileOpen('mybatch.bat', 2)
FileWriteLine($hFile, "cd " & @ScriptDir & "\exe")
FileWriteLine($hFile, "ServiceLogger.exe -i")
FileWriteLine($hFile, "net start servicelogger")
FileClose($hFile)

RunWait('mybatch.bat')

*Edit: Wow, I guess I took too long, two posts before mine that weren't there when I started writing. :whistle:

Edited by Saunders

Share this post


Link to post
Share on other sites

*Edit: Wow, I guess I took too long, two posts before mine that weren't there when I started writing. :)

You needed 18 minutes for that text? Tsk, tsk, tsk.... :whistle:


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

You needed 18 minutes for that text? Tsk, tsk, tsk.... :whistle:

I... type... slow... :)

Share this post


Link to post
Share on other sites

kk...

I'll try all of these

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  
Followers 0