home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

VB Calling MSDOS commands

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1567
Discussions: 200,988, Posts: 2,379,867, Members: 246,357
Old September 28th, 2003, 04:38 PM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Aug 2003
Posts: 17
VB Calling MSDOS commands

Hi guys,

I have a button that i made in one of my VB projects. It looks nice.
I want that button to call a batch file or run a dos command at the command prompt, like 'ipconfig', how od i go about this?
The full code would be very helpful or a point in the right direction would be great.
(I'm lazy too, can someone do this one for me???)
lol, kidding about that last bit.
Thanks guys for any help or advice.

Pritesh
Pritesh is offline   Reply With Quote
Old September 29th, 2003, 03:00 PM     #2 (permalink)
Senior Member
 
Join Date: Oct 2001
Location: New Hampshire, USA
Posts: 641
You want to use SHELL commands to run your DOS command through a batch file.

There is syntax simmilar to this in the following forum:

http://www.techimo.com/forum/t80672.html
ctaylor is offline   Reply With Quote
Old September 29th, 2003, 10:58 PM     #3 (permalink)
Not Really a Member
 
Join Date: Oct 2001
Posts: 25,398
or a bit easier, w/o the API calls
Dim oWSHShell

Set oWSHShell = CreateObject("WScript.Shell")

oWSHShell.Run "Command line string"
__________________
Helicopters don't fly; they vibrate so much and make so much noise that the earth rejects them.
vass0922 is offline   Reply With Quote
Old October 1st, 2003, 09:40 AM     #4 (permalink)
Junior Member
 
Join Date: Aug 2003
Posts: 17
excellent guys, thanks for the help, it worked!!!
Pritesh is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3066)
Charges against non-tippers dropped.. (20)
Health Care Rationing (11)
Delete an OS (17)
Nvidia GTX 260 problem (10)
Laptop with wireless problem. (12)
windows vista security holes (19)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
Point and Shoot Camera Suggestions. (8)
windows 7 problem (7)
[F@H SPAM 11/16/09] ! 1/2 months to.. (39)
Internet Lost (5)
Recent Discussions
Jedi Academy Problem (3)
Desktop Calendar Application (1)
Can a page file be "too big".. (1)
Nvidia GTX 260 problem (10)
Point and Shoot Camera Suggestions. (8)
Looking for new motherboard (0)
Size after cutting 700Mb file is 2.5 .. (0)
Delete an OS (17)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (39)
windows vista security holes (19)
updating BIOS via winflash, claims fi.. (1)
New Server Configuration Suggestions (0)
cheap gaming laptop? (12)
Unallocated Space (2)
help me pls laptop just stopped worki.. (1)
C# + LINQ Help (7)
Dynex DX E-402 (3)
EVGA 9800 gtx help with finding a goo.. (12)
Multiple Restarts Required at Boot (5)
cell phone won't work (0)
Is the PSU I received dead? (15)
Can't open Word (12)
Steam ID's, Gamertags etc... (4)
Games, Cables, PCI cards, and more fo.. (6)
Dept. of HS: NSA 'Helped' Develop Vis.. (17)


All times are GMT -4. The time now is 07:16 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28