| Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free! |
vb shell command in win 2000
|
Original Message
|
Name: sly
Date: February 6, 2003 at 09:52:25 Pacific
Subject: vb shell command in win 2000 OS: win 2000 CPU/Ram: 1.7ghz/256 ram
|
Comment: I am trying to execute a .cmd file using the VB(6.0) shell command...this is what I tried 1. Shell ("start C:\count.cmd"), vbHide 2. I = Shell("command.com c:\count.cmd", vbMinimizedFocus) 3. Dim ReturnValue ReturnValue = Shell("command.com", 1) AppActivate ReturnValue SendKeys "c:\count.cmd", True Thank You very much in Advance
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: CA
Date: February 6, 2003 at 22:29:38 Pacific
|
Reply: (edit)This is not the greatest way to do this...but maybe it'll do what you need... Dim BatchFile As String BatchFile = "C:\tmpbatch.bat" Open BatchFile For Output As #1 Print #1, "start C:\count.cmd" Close #1 Shell BatchFile, vbMinimizedNoFocus It basicly creates a batch file with your command in it and then shell to the batch file.
Hope this helps...
Report Offensive Follow Up For Removal
|

Post Locked
This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
Go to Programming Forum Home