473,322 Members | 1,307 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

.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_USER_\Software\Microsoft\Windows\Curr entVersion\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 1231
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.com
"Smokey Grindel" <no****@nospam.comwrote in message
news:O7**************@TK2MSFTNGP04.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_USER_\Software\Microsoft\Windows\Curr entVersion\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*******@gmail.comwrote in message
news:86**********************************@18g2000h sf.googlegroups.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**************@TK2MSFTNGP04.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_USER_\Software\Microsoft\Windows\Curr entVersion\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.laceupsolutions.com
Mobile & warehouse Solutions."Smokey Grindel" <nos...@nospam.comwrote in message

news:O7**************@TK2MSFTNGP04.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_USER_\Software\Microsoft\Windows\Curr entVersion\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.
"kimiraikkonen" <ki*************@gmail.comwrote in message
news:ab**********************************@s19g2000 prg.googlegroups.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_USER_\Software\Microsoft\Windows\Curr entVersion\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
"kimiraikkonen" <ki*************@gmail.comwrote in message
news:ab**********************************@s19g2000 prg.googlegroups.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.laceupsolutions.com
Mobile & warehouse Solutions."Smokey Grindel" <nos...@nospam.comwrote
in message

news:O7**************@TK2MSFTNGP04.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_USER_\Software\Microsoft\Windows\Curr entVersion\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.bewrote:
"kimiraikkonen" <kimiraikkone...@gmail.comwrote in message

news:ab**********************************@s19g2000 prg.googlegroups.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.laceupsolutions.com
Mobile & warehouse Solutions."Smokey Grindel" <nos...@nospam.comwrote
in message
>news:O7**************@TK2MSFTNGP04.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_USER_\Software\Microsoft\Windows\Curr entVersion\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
Precisely!

Surely you know the difference between 'installed' and 'loaded'.

When one logs in to a PC, an awful lot of work takes place before the system
is ready to start executing commands that you throw at it.

I suspect that your program is attempting to access some recource or other
before it is actually available.
"kimiraikkonen" <ki*************@gmail.comwrote in message
news:5a**********************************@q3g2000h sg.googlegroups.com...
On Dec 19, 2:55 pm, "Willy Denoyette [MVP]"
<willy.denoye...@telenet.bewrote:
>"kimiraikkonen" <kimiraikkone...@gmail.comwrote in message

news:ab**********************************@s19g200 0prg.googlegroups.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.laceupsolutions.com
Mobile & warehouse Solutions."Smokey Grindel" <nos...@nospam.com>
wrote
in message
>>news:O7**************@TK2MSFTNGP04.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_USER_\Software\Microsoft\Windows\Curr entVersion\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 #11
"kimiraikkonen" <ki*************@gmail.comwrote in message
news:5a**********************************@q3g2000h sg.googlegroups.com...
On Dec 19, 2:55 pm, "Willy Denoyette [MVP]"
<willy.denoye...@telenet.bewrote:
>"kimiraikkonen" <kimiraikkone...@gmail.comwrote in message

news:ab**********************************@s19g200 0prg.googlegroups.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.laceupsolutions.com
Mobile & warehouse Solutions."Smokey Grindel" <nos...@nospam.com>
wrote
in message
>>news:O7**************@TK2MSFTNGP04.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_USER_\Software\Microsoft\Windows\Curr entVersion\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.

Yes the CLR and .NET libraries are loaded *in the process* of the .NET
application. Windows does not load the runtime (why would it?), the runtime
is no stand-alone shared component and is not part of the Windows OS!
..NET applications cannot run without the Framework installed, just like non
..NET applications cannot run without some other runtime libraries , Windows
(other than Vista) has no dependency on the .NET Framework. Vista comes with
the Framework installed, but this is because some Vista utilities are .NET
applications, but the Vista OS basically does not require .NET to be
present.

Willy.

Dec 20 '07 #12

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

Similar topics

5
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...
5
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...
4
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...
7
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...
11
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.