»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 09-28-2003, 01:38 PM   #1 (permalink)
Registered User
 
Join Date: Aug 2003
Posts: 17
Pritesh is on a distinguished road
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 09-29-2003, 12:00 PM   #2 (permalink)
Registered User
 
Join Date: Oct 2001
Location: New Hampshire, USA
Posts: 604
ctaylor is on a distinguished road
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 09-29-2003, 07:58 PM   #3 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
or a bit easier, w/o the API calls
Dim oWSHShell

Set oWSHShell = CreateObject("WScript.Shell")

oWSHShell.Run "Command line string"
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
vass0922 is offline   Reply With Quote
Old 10-01-2003, 06:40 AM   #4 (permalink)
Registered User
 
Join Date: Aug 2003
Posts: 17
Pritesh is on a distinguished road
excellent guys, thanks for the help, it worked!!!
Pritesh is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 10:04 PM.