Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 28th, 2007, 10:38 PM
Registered User
 
Join Date: Oct 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Open a C# application while window starts

I need to run a C# .NET 2 application (itvC.exe) while starting Windows. I have added the exe file to startup menu. Then the application is running but very slow and it looks like hanging.

Also I tried the same making a batch file like below

dim objshell
Set objshell=CreateObject ("Wscript.Shell")
objshell.run "c:\bin\Debug\ItvC.exe"

But I am getting the same result

Also I made C# application to run the needed application itvC.exe using the command

System.Diagnostics.Process.Start

But in all the way if I run my application its running slowly.

But if I double click the application and run then it works fine.

I need some one help to sort this please

Thanks

Reply With Quote
  #2 (permalink)  
Old October 29th, 2007, 07:57 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,413
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I imagine that the problem is that during windows startup there is a lot going on. Many programs are starting and your program is simply competing for system resources.

-Peter
Reply With Quote
  #3 (permalink)  
Old October 30th, 2007, 09:24 AM
Authorized User
 
Join Date: Sep 2007
Location: , , Finland.
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You could create your program as Windows Service (NT Service) so OS starts it up for you and takes care for it. I think Visual Studio (at least pro version) has template for services. Or you could google for something like C# .NET Windows Service.

This doesn't necesserily correct your situation but at least it would be more elegant solution than using scripts :) Oh, and in Vista I think there's some service level that could be used to start resource consuming services (it delays service startup until all the necessary stuff is loaded).

Reply With Quote
Reply


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
run an application automaticaly when server starts sureshrgsl Servlets 1 April 16th, 2007 11:25 PM
window.open() ckrajeshvarma ASP.NET 2.0 Professional 5 August 16th, 2006 09:13 AM
Application starts again sarvesh189 Forum and Wrox.com Feedback 2 May 25th, 2005 02:07 AM
Open in new window sridevi Excel VBA 1 November 4th, 2004 05:49 AM



All times are GMT -4. The time now is 05:35 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.