Jump to content

multiple exec or run commands


Recommended Posts

Hello scripters ;) I want to make a console application(cscript.exe) in vbscript but i want to add colors. what i did is, I made an exe named colors.exe, when call this exe in a console window with cmd.exe and give it e.g. these arguments '0A' the next lines are in (green) a different color.Now I want to use vbscript's shell.exec or shell.run to StdOut.Write new lines in the same consolewindow but in diffirent colors. the problem is, how do you execute a new command in the same consolewindow when using cscript.exe or wscript.exec/run? I know you can do multiple commands using the '&' operator in a single line but in my case I don't want to do this in a single command because it's to long

+ i want to know if it is possible to do this appart...

I want to do something like this:

Set objStdOut = WScript.StdOutobjStdOut.Write "hello, " run"colors.exe 0C"objStdOut.Write "hello in red" 

thanks in advance,

TheAutomator. :)

Edited by theautomator
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
  • Create New...