p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   General .NET (http://p2p.wrox.com/forumdisplay.php?f=122)
-   -   Open a C# application while window starts (http://p2p.wrox.com/showthread.php?t=63305)

jklanka October 28th, 2007 10:38 PM

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


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


planoie October 29th, 2007 07:57 AM

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.


weicco October 30th, 2007 09:24 AM

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).

All times are GMT -4. The time now is 06:16 AM.

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