Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old August 13th, 2003, 07:52 AM
Schway442 Schway442 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 43 Schway442 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m 55 sec
Reputation Power: 5
Question Run batch file on button click

I'm trying to automate a weekly update for users. Right now a batch file is run on startup to pull the file from a network drive. That presents a problem for some of our older machines as it is a large file and slows startup down on them.

So... I want to add a button to the current application that will run the batch file-- preferably, the shell window won't be seen. How can I do that in VB.net?

Last edited by Schway442 : August 13th, 2003 at 07:57 AM.

Reply With Quote
  #2  
Old August 14th, 2003, 11:38 AM
Kronique Kronique is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Danbury,CT
Posts: 14 Kronique User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
try this

Private Sub Command1_Click()
Shell "C:\WINNT\notepad.exe",vbMaximizedFocus
End Sub

i used it to display notepad. u would need the path of the .bat. Also instead of vbMaximizedFocus use vbHide constant.

Reply With Quote
  #3  
Old August 14th, 2003, 11:39 AM
Kronique Kronique is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Danbury,CT
Posts: 14 Kronique User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
im sorry this was for vb 6...cant help with .net,
might have to instantiate a shell class or watever

Reply With Quote
  #4  
Old August 15th, 2003, 07:40 AM
Schway442 Schway442 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 43 Schway442 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m 55 sec
Reputation Power: 5
Unhappy

If only I knew how to do that.

Last edited by Schway442 : August 19th, 2003 at 08:19 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Run batch file on button click


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway