Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Can I run a command in VBS but don't display Command window

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Can I run a command in VBS but don't display Command window
  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 >>
 Can I run a command in VBS but don't display Command wi... - 8/16/2005 6:57:08 PM   
  netxman

 

Posts: 104
Score: 0
Joined: 8/1/2005
Status: offline
I mean if I use this:

dim objShell
set objShell = WScript.CreateObject("Wscript.shel"l)
objShell.Run "net user account /delete"

I dont want it displays the black command window with "The command completed successfully." after the vbs ran. Does VBS can do ?
 
 
Post #: 1
 
 RE: Can I run a command in VBS but don't display Comman... - 8/16/2005 9:21:32 PM   
  ginolard


Posts: 1051
Score: 21
Joined: 8/10/2005
Status: online
Yup,

Just change your Run line to objShell.Run ("net user account /delete"),0

(in reply to netxman)
 
 
Post #: 2
 
 RE: Can I run a command in VBS but don't display Comman... - 8/17/2005 1:54:57 PM   
  netxman

 

Posts: 104
Score: 0
Joined: 8/1/2005
Status: offline
Thanks ginolard,it works fine.


Can you tell me how & where can  find this type of options or switches ? In which type of documents ?  


Thank you.

(in reply to netxman)
 
 
Post #: 3
 
 RE: Can I run a command in VBS but don't display Comman... - 8/17/2005 5:47:20 PM   
  ginolard


Posts: 1051
Score: 21
Joined: 8/10/2005
Status: online
I've a couple of CHM containing a list of all VBScript functions, constants, operators etc.  If you post an email address, I can send them to you.

Alternatively, you can check MSDN on the Microsoft site (though the CHM files are easier to use!)

(in reply to netxman)
 
 
Post #: 4
 
 RE: Can I run a command in VBS but don't display Comman... - 8/17/2005 11:41:45 PM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
The options in question can be found in the WSH Help Document, this is linked HERE

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to netxman)
 
 
Post #: 5
 
 RE: Can I run a command in VBS but don't display Comman... - 8/18/2005 12:40:58 PM   
  netxman

 

Posts: 104
Score: 0
Joined: 8/1/2005
Status: offline
Thanks very much mbouchard & ginolard .


You are both kind men.


(in reply to mbouchard)
 
 
Post #: 6
 
 
 
  

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 >> Can I run a command in VBS but don't display Command window 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