473,788 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.NET App wont start with system when told to

Ok this is wierd I am seeing this issue with C# and VB.NET apps made in
..NET...

I have the framework installed (.NET 3.5 currently)... i installed my
applications... I placed them in the registry to start up when the user logs
in so I placed it in the
HKEY_Current_US ER_\Software\Mi crosoft\Windows \CurrentVersion \Run key... ok
seems like it should start... nope nothing.. place a C++ app in there starts
right up with the login! ok wierd... place the app in the Startup group in
control panel... nothing... once again place a C++ app in there (non-managed
of course) and boom starts up on login... what the heck is going on? I need
this app to start with the system when the client logs in... and it can not
be a service because it has UI interaction... any ideas what is going on?
Thanks!
Dec 18 '07 #1
11 1711
Smokey,

I would put some sort of logging in the app, espectially around your
call to the static Run method on the Application class (in a try/catch
block) to see if there is an exception that is being thrown. I'm not saying
this is the case, but it's definitely a place to start.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Smokey Grindel" <no****@nospam. comwrote in message
news:O7******** ******@TK2MSFTN GP04.phx.gbl...
Ok this is wierd I am seeing this issue with C# and VB.NET apps made in
.NET...

I have the framework installed (.NET 3.5 currently)... i installed my
applications... I placed them in the registry to start up when the user
logs in so I placed it in the
HKEY_Current_US ER_\Software\Mi crosoft\Windows \CurrentVersion \Run key... ok
seems like it should start... nope nothing.. place a C++ app in there
starts right up with the login! ok wierd... place the app in the Startup
group in control panel... nothing... once again place a C++ app in there
(non-managed of course) and boom starts up on login... what the heck is
going on? I need this app to start with the system when the client logs
in... and it can not be a service because it has UI interaction... any
ideas what is going on? Thanks!
Dec 18 '07 #2
Anything in the eventlog about what happend?

not done that (starting .net app from run/autostart) so I dont know if
there is a problem...

writing to files that user doesnt have rights to but you do when
testing? nah...

does it work with your account but not another (rights)

otherwise i solved one strange with delay of start (didnt find a nice
sleep or wait in dos)
a .bat file and some ping before it started but that was to get 2
different programs to start with a few seconds delay like "ping -n 1 -
w 5000 x"

UI *should* work until vista as a service as far as I know, but would
not recommend it - using it myself with an old VB6 app, but that has
to go soon.

//CY
Dec 18 '07 #3
This doesn't even work if I just make a winforms app with nothing in it,
compile it and place it in there... so it souldnt be permission or file IO
errors... because the app is in a folder the user has permission to... so I
am confused... no event logs or anything

<ch*******@gmai l.comwrote in message
news:86******** *************** ***********@18g 2000hsf.googleg roups.com...
Anything in the eventlog about what happend?

not done that (starting .net app from run/autostart) so I dont know if
there is a problem...

writing to files that user doesnt have rights to but you do when
testing? nah...

does it work with your account but not another (rights)

otherwise i solved one strange with delay of start (didnt find a nice
sleep or wait in dos)
a .bat file and some ping before it started but that was to get 2
different programs to start with a few seconds delay like "ping -n 1 -
w 5000 x"

UI *should* work until vista as a service as far as I know, but would
not recommend it - using it myself with an old VB6 app, but that has
to go soon.

//CY

Dec 18 '07 #4
Hi,
Personally I never use the registry, I use the startup folder accesible from
the start menu.
Having said that I have never ever encountered any problem doing it.

As Paldino said put some logging int he app and see what is going on.

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"Smokey Grindel" <no****@nospam. comwrote in message
news:O7******** ******@TK2MSFTN GP04.phx.gbl...
Ok this is wierd I am seeing this issue with C# and VB.NET apps made in
.NET...

I have the framework installed (.NET 3.5 currently)... i installed my
applications... I placed them in the registry to start up when the user
logs in so I placed it in the
HKEY_Current_US ER_\Software\Mi crosoft\Windows \CurrentVersion \Run key... ok
seems like it should start... nope nothing.. place a C++ app in there
starts right up with the login! ok wierd... place the app in the Startup
group in control panel... nothing... once again place a C++ app in there
(non-managed of course) and boom starts up on login... what the heck is
going on? I need this app to start with the system when the client logs
in... and it can not be a service because it has UI interaction... any
ideas what is going on? Thanks!

Dec 18 '07 #5
On Dec 18, 7:33 pm, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions .comwrote:
Hi,

Personally I never use the registry, I use the startup folder accesible from
the start menu.
Having said that I have never ever encountered any problem doing it.

As Paldino said put some logging int he app and see what is going on.

--
Ignacio Machinhttp://www.laceupsolut ions.com
Mobile & warehouse Solutions."Smok ey Grindel" <nos...@nospam. comwrote in message

news:O7******** ******@TK2MSFTN GP04.phx.gbl...
Ok this is wierd I am seeing this issue with C# and VB.NET apps made in
.NET...
I have the framework installed (.NET 3.5 currently)... i installed my
applications... I placed them in the registry to start up when the user
logs in so I placed it in the
HKEY_Current_US ER_\Software\Mi crosoft\Windows \CurrentVersion \Run key... ok
seems like it should start... nope nothing.. place a C++ app in there
starts right up with the login! ok wierd... place the app in the Startup
group in control panel... nothing... once again place a C++ app in there
(non-managed of course) and boom starts up on login... what the heck is
going on? I need this app to start with the system when the client logs
in... and it can not be a service because it has UI interaction... any
ideas what is going on? Thanks!
Could be a timing problem? At startup, usually all the processes are
forced to load at the same time, thus CPU must process them at the
same time. If the app tries to run before .NET libraries is loaded and
services being configured, then maybe that could be the reason. But at
this point it's likely that you should have get a run-time error if
the .NET framework runtime libraries cannot be found due to app can be
launced before .NET libraries.
Dec 18 '07 #6
Hi,

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"kimiraikko nen" <ki************ *@gmail.comwrot e in message
news:ab******** *************** ***********@s19 g2000prg.google groups.com...
>
Could be a timing problem? At startup, usually all the processes are
forced to load at the same time, thus CPU must process them at the
same time. If the app tries to run before .NET libraries is loaded and
services being configured, then maybe that could be the reason. But at
this point it's likely that you should have get a run-time error if
the .NET framework runtime libraries cannot be found due to app can be
launced before .NET libraries.
I do not think so, I'm pretty sure that all the services are started first,
and you can write a service in .NET so that kind of invalidate your point.
Dec 18 '07 #7


"Smokey Grindel" wrote:
Ok this is wierd I am seeing this issue with C# and VB.NET apps made in
..NET...

I have the framework installed (.NET 3.5 currently)... i installed my
applications... I placed them in the registry to start up when the user logs
in so I placed it in the
HKEY_Current_US ER_\Software\Mi crosoft\Windows \CurrentVersion \Run key... ok
seems like it should start... nope nothing.. place a C++ app in there starts
right up with the login! ok wierd... place the app in the Startup group in
control panel... nothing... once again place a C++ app in there (non-managed
of course) and boom starts up on login... what the heck is going on? I need
this app to start with the system when the client logs in... and it can not
be a service because it has UI interaction... any ideas what is going on?
Thanks!

I tried this on my machine with no problems. Is the problem isolated to a
single machine or account? I just created a simple dialog which displays
"Hello, <username>".

>
Dec 19 '07 #8
"kimiraikko nen" <ki************ *@gmail.comwrot e in message
news:ab******** *************** ***********@s19 g2000prg.google groups.com...
On Dec 18, 7:33 pm, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions .comwrote:
>Hi,

Personally I never use the registry, I use the startup folder accesible
from
the start menu.
Having said that I have never ever encountered any problem doing it.

As Paldino said put some logging int he app and see what is going on.

--
Ignacio Machinhttp://www.laceupsolut ions.com
Mobile & warehouse Solutions."Smok ey Grindel" <nos...@nospam. comwrote
in message

news:O7******* *******@TK2MSFT NGP04.phx.gbl.. .
Ok this is wierd I am seeing this issue with C# and VB.NET apps made in
.NET...
I have the framework installed (.NET 3.5 currently)... i installed my
applications... I placed them in the registry to start up when the user
logs in so I placed it in the
HKEY_Current_US ER_\Software\Mi crosoft\Windows \CurrentVersion \Run key...
ok
seems like it should start... nope nothing.. place a C++ app in there
starts right up with the login! ok wierd... place the app in the
Startup
group in control panel... nothing... once again place a C++ app in
there
(non-managed of course) and boom starts up on login... what the heck is
going on? I need this app to start with the system when the client logs
in... and it can not be a service because it has UI interaction... any
ideas what is going on? Thanks!

Could be a timing problem? At startup, usually all the processes are
forced to load at the same time, thus CPU must process them at the
same time. If the app tries to run before .NET libraries is loaded and
services being configured, then maybe that could be the reason. But at
this point it's likely that you should have get a run-time error if
the .NET framework runtime libraries cannot be found due to app can be
launced before .NET libraries.


This is nonsense, there are no .NET libraries to be loaded or configured
during logon , .NET libraries are loaded as part of the application itself.

Willy.

Dec 19 '07 #9
On Dec 19, 2:55 pm, "Willy Denoyette [MVP]"
<willy.denoye.. .@telenet.bewro te:
"kimiraikko nen" <kimiraikkone.. .@gmail.comwrot e in message

news:ab******** *************** ***********@s19 g2000prg.google groups.com...
On Dec 18, 7:33 pm, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions .comwrote:
Hi,
Personally I never use the registry, I use the startup folder accesible
from
the start menu.
Having said that I have never ever encountered any problem doing it.
As Paldino said put some logging int he app and see what is going on.
--
Ignacio Machinhttp://www.laceupsolut ions.com
Mobile & warehouse Solutions."Smok ey Grindel" <nos...@nospam. comwrote
in message
>news:O7******* *******@TK2MSFT NGP04.phx.gbl.. .
Ok this is wierd I am seeing this issue with C# and VB.NET apps made in
.NET...
I have the framework installed (.NET 3.5 currently)... i installed my
applications... I placed them in the registry to start up when the user
logs in so I placed it in the
HKEY_Current_US ER_\Software\Mi crosoft\Windows \CurrentVersion \Run key...
ok
seems like it should start... nope nothing.. place a C++ app in there
starts right up with the login! ok wierd... place the app in the
Startup
group in control panel... nothing... once again place a C++ app in
there
(non-managed of course) and boom starts up on login... what the heck is
going on? I need this app to start with the system when the client logs
in... and it can not be a service because it has UI interaction... any
ideas what is going on? Thanks!
Could be a timing problem? At startup, usually all the processes are
forced to load at the same time, thus CPU must process them at the
same time. If the app tries to run before .NET libraries is loaded and
services being configured, then maybe that could be the reason. But at
this point it's likely that you should have get a run-time error if
the .NET framework runtime libraries cannot be found due to app can be
launced before .NET libraries.

This is nonsense, there are no .NET libraries to be loaded or configured
during logon , .NET libraries are loaded as part of the application itself.

Willy.
Embedded into app? No .NET runtimelibaries loaded by Windows? But none
of .NET-powered apps can run without .NET runtime libraries installed.
Dec 20 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1924
by: manokumar | last post by:
hiye, i notice that some if not all of my folders in winxp pro. are set as read only and its giving me some problem with development. so as the natural thing, i unchecked the read only option and click apply then click ok. and when i right click on the same folder again JUST TO MAKE SURE the read only option is checked AGAIN. so again, unchecked, and again its check and the cycle repeats. anyway, i'm the administrator to this computer. so...
5
1043
by: Nick | last post by:
Hi there, This one is really doing my head in, I am attempting to start a thread using the following code, -------------------- Public Sub start() cTrdImportThread = New Threading.Thread(AddressOf cTrdImportThread_Callback)
4
21758
by: carson | last post by:
I have written two windows services: - service A does some crunching of local data files and uploads them to a central processing computer via http. - service B monitors a manifest file on a webserver to see if service A needs to be updated. What service B does if it sees their is an update for service A is to download a new copy of the service A executable, stop service A, replace the executable with the new copy, and start service B...
7
11111
by: moondaddy | last post by:
I'm running a wpf windows app and want to add the appSettings element to the config file. when I do, the app wont start up and I get the following error: {"The type initializer for 'System.Windows.Application' threw an exception."} {"The type initializer for 'System.Windows.Navigation.BaseUriHelper' threw an exception."} " at System.Windows.Application..ctor()\r\n at DiagramTool_v1.App..ctor()\r\n at DiagramTool_v1.App.Main() in
11
1262
by: Smokey Grindel | last post by:
Ok this is wierd I am seeing this issue with C# and VB.NET apps made in ..NET... I have the framework installed (.NET 3.5 currently)... i installed my applications... I placed them in the registry to start up when the user logs in so I placed it in the HKEY_Current_USER_\Software\Microsoft\Windows\CurrentVersion\Run key... ok seems like it should start... nope nothing.. place a C++ app in there starts right up with the login! ok...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10370
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10113
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8995
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5402
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.