Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 17th, 2004, 02:57 AM
Registered User
 
Join Date: Mar 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Run vb application automatically

Hi All,

I need to run the vb.net application automatically in a scheduled time. I don't want to add the application /exe to scheduled tasks. I want to implement code in the application to run the exe automatically in the scheduled time.

Any help will be appreciated.


 
Old March 17th, 2004, 03:42 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

And how do you think this application will wake up, know that it should run and start itself?
I am afraid you'll need to use scheduled tasks anyway to run your application at certain times. A program all by itself is no able to execute itself at will.

As an alternative, you could create a Windows service that is available in the background at all times.

A third alternative is to start the application, then have it automatically minimize to the Windows tray. This way, it's always active, and you can use a timer on a form for instance to have it execute specific tasks every now and then.

Does this help?

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 17th, 2004, 04:10 AM
Registered User
 
Join Date: Mar 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks,
now i understand the problem.plz don't mind I'm new to vb.net, Ok let me put my question in a different way as per my spec.
I need to run a vb.net application at command prompt starting from a button click event of the form which already exists in the code.
any help will be appreciated.thanks in advance.

 
Old March 17th, 2004, 04:18 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

In that case, make the other program a Console application.

From within your Windows Forms application, use System.Diagnostics.Process.Start to execute the external Console application.
Take a look at this article for some ideas. This is just one article; if you search Google for vb.net start process executable, you'll find lots more examples.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
run a program automatically hastikeyvan ASP.NET 2.0 Professional 1 December 18th, 2009 03:34 PM
making application run automatically liamfitz Pro VB 6 4 January 23rd, 2008 05:27 PM
Problem to run batch files from VB application Dmitriy VB How-To 7 September 13th, 2006 11:42 AM
Problem to run batch files from VB Application Dmitriy Pro VB 6 4 April 13th, 2006 02:27 AM
Run query automatically mateenmohd SQL Server 2000 9 March 28th, 2004 03:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.