VBS - hide exec

Microsoft Windows xp professional w/sp2
May 14, 2010 at 02:24:32
Specs: Windows XP
Hey, So i am looking to hide an exec windows, but heres the catch, i want to still be able to .stdin to that window so that makes .run out of the question.

anyone have any ideas?

See More: VBS - hide exec

Report •

May 17, 2010 at 05:21:43
i guess no1 knows how this is possible

Report •

May 17, 2010 at 08:41:43
I think you're SOL. WScript.Shell's .Run, WMI's Win32_Process, and shell.Shell_Application's .ShellExecute all allow you to hide windows, but only WScript.Shell's .Exec gives you access to the standard streams.

Report •

May 17, 2010 at 22:59:44
yeah seems abit annoying i can do one but not the other :(

Report •

Related Solutions

May 21, 2010 at 23:35:52
Well, I've been thinking about this, and in a fit of rum-based inspiration, I think I've hacked something together. The trick is to use two scripts. The first script calls CSCRIPT.EXE to run the second script in a hidden console window. It's in this hidden second script you can do your work.

Consider the following example:

CreateObject("WScript.Shell").Run "cscript B.vbs", 0, True


Set i = CreateObject("WScript.Shell").Exec("cmd /c dir c:\ /a/s")
CreateObject("Scripting.FileSystemObject").OpenTextFile( _
  "out.txt", 2, True).WriteLine i.StdOut.ReadAll

Report •

Ask Question