|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Schedule task in VB.NETHi,
I have a console application written in VB.NET. I schedule the job using windows 2000 scheduler. It is all working fine but, its opening a console when it was running. How to disable the console? any clues? Thanks. This is what you can do to get around your problem:
1) Open VS.NET & choose BLANK SOLUTION 2) Add a module to the project 3) Add references to SYSTEM & SYSTEM.WINDOWS.FORMS.DLL 4) Paste in the following code: ------------------------------------------------------------------------------------------------ Imports System Imports System.Diagnostics Imports System.Windows.Forms Module Module1 Sub main() Dim strStartupPath As String = Application.StartupPath Dim strFileToRun As String = IO.Path.Combine(strStartupPath, "TestApp.exe") Dim psi As New ProcessStartInfo(strFileToRun) psi.WindowStyle = ProcessWindowStyle.Hidden Process.Start(psi) End Sub End Module ------------------------------------------------------------------------------------------------ Obviously, I have made it so that you put your console application that you want to run in the same directory as your BIN directory for this blank solution Set your Task Scheduler to run the blank solution, which will run your application hidden. I hope this helps Crouchie1998 BA (HONS) MCP MCSE
Dragging a mail from Outlook/Outlook Express in to a .NET VB app
DataGrid Bind to DataSet, then Bind to DaTaview, GOT ERROR...PLS HELP File pointer to be positioned at the last occurance of a keyword How to back up an object... Newbie VB Question MDIChild form controls: how to pass information between them? Connectionstring Can't set focus to controls on TabPage Unexpected behaviour of MyClass (please ignore 1st post) Why use Dim outside of sub? |
|||||||||||||||||||||||