Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


cmd commands

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> cmd commands
  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 >>
 cmd commands - 6/17/2008 5:53:52 AM   
  simon

 

Posts: 8
Score: 0
Joined: 6/6/2008
Status: offline
    Hi

Im trying to run an .exe with arguments from a vbs script. 

In cmd for example, i would type: nc -l -h 1007

How would i do this in a vbs script?
 
 
Post #: 1
 
 RE: cmd commands - 6/17/2008 6:10:26 AM   
  ehvbs

 

Posts: 2106
Score: 50
Joined: 6/22/2005
From: Germany
Status: offline
Hi simon,

use the VBScript Docs to read about the .Run and .Exec methods
of the WScript.Shell object.

Good luck

ehvbs

(in reply to simon)
 
 
Post #: 2
 
 RE: cmd commands - 6/17/2008 7:06:50 AM   
  mcds99


Posts: 429
Score: 4
Joined: 2/28/2006
Status: offline
 
This is Run to use Exec just replace Run with Exec

      

Now go read everything on vbscript in this forum because it's all available.


_____________________________

Sam

Keep it Simple Make it Fun KiSMiF

(in reply to simon)
 
 
Post #: 3
 
 RE: cmd commands - 6/17/2008 8:02:26 AM   
  ehvbs

 

Posts: 2106
Score: 50
Joined: 6/22/2005
From: Germany
Status: offline
Set objWshScriptRun = objShell.Run(dir /?)

.Run returns an integer, so Set is wrong and the type prefix is fraud

First parameter to .Run is the command to run/execute, so quotes are missing

I'd stick to the documentation.

(in reply to mcds99)
 
 
Post #: 4
 
 RE: cmd commands - 6/17/2008 11:19:01 AM   
  DiGiTAL.SkReAM


Posts: 1170
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
Try this:

      


_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury

(in reply to ehvbs)
 
 
Post #: 5
 
 
 
  

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 >> cmd commands 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