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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...