Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Getting ObjShell.Exec Output

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,53022
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Getting ObjShell.Exec Output
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Getting ObjShell.Exec Output - 10/25/2007 2:48:08 AM   
  4scriptmoni


Posts: 208
Score: 0
Joined: 5/3/2007
Status: offline
I need to get the output of a cmd, but it is not working.
Other .exe works, why is it inconsitant, is there another way to get the output?


      

thx in advance,

_____________________________

Enterprise Microsoft Scripts
Exchange, Login/Logout Monitor,TS, Monitoring, Security, AD, etc...
http://www.felipeferreira.net
 
 
Post #: 1
 
 RE: Getting ObjShell.Exec Output - 10/25/2007 2:52:59 AM   
  ebgreen


Posts: 5035
Score: 31
Joined: 7/12/2005
Status: online
To be honest with you, I have never researched the issue in depth, but some apps just don't play well with .Exec. I suspect that it has to do with the way the app handles StdOut. For situations like this I just pipe the output to a temp file in the command then read the file contents and delete the file.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to 4scriptmoni)
 
 
Post #: 2
 
 RE: Getting ObjShell.Exec Output - 10/29/2007 4:39:47 AM   
  mcds99


Posts: 434
Score: 4
Joined: 2/28/2006
Status: online
Try slowing down the execution, wait for it to complete.

vbs runs very fast and will end before everything is done working.

_____________________________

Sam

Keep it Simple Make it Fun KiSMiF

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: Getting ObjShell.Exec Output - 10/29/2007 5:20:12 AM   
  Rischip


Posts: 502
Score: 2
Joined: 3/26/2007
Status: offline
Some applications are designed to detect redirected pipes and quit or other things.
Runas and Net Use come to mind. They don't like their pipes being redirected.

_____________________________

Rischip
Author of - The Grim Linker

(in reply to mcds99)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Getting ObjShell.Exec Output Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts