Using a program as shell ?

  • Thread starter Thread starter Daniele Piccinini
  • Start date Start date
D

Daniele Piccinini

Hi,

I've developed a VC++ supervision application. This app have to be the only
user interface app that is running on the pc. Doing so the user cannot
"play" with other XP functionality.
I've tried to set this app as shell in this way :

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"Shell"="C:\\MyApp.exe"

The app use a connection to a sql server database, and when the app try to
connect the login fails. If i close the app and restart the app using task
manager it's all right.

How can i avoid this problem ?
Someone have a different solution for this problem?

Thanks

- Dany -
 
It is just a guess, but perhaps your app (Shell) is available and ready to
connect before the actual network connectivity has been established by the
OS. Why not delay the initial SQL connection by a few seconds,
programatically, to allow the rest of the OS to come to life? It may take 10
seconds of waiting to allow the OS to build the IP stack, etc. Again, just a
guess...

Vinson
 
Thank you Vinson,
I've tried to delay the connection up to 5 min. but this still don't work.
On the other hand, if i stop the app 1 min after the boot and restart it,
the connection works fine.
It looks like the program started as shell is not able to connect ...

- Dany -

Vinson said:
It is just a guess, but perhaps your app (Shell) is available and ready to
connect before the actual network connectivity has been established by the
OS. Why not delay the initial SQL connection by a few seconds,
programatically, to allow the rest of the OS to come to life? It may take
10
seconds of waiting to allow the OS to build the IP stack, etc. Again,
just a
guess...

Vinson

Daniele Piccinini said:
Hi,

I've developed a VC++ supervision application. This app have to be the
only
user interface app that is running on the pc. Doing so the user cannot
"play" with other XP functionality.
I've tried to set this app as shell in this way :

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon]
"Shell"="C:\\MyApp.exe"

The app use a connection to a sql server database, and when the app try
to
connect the login fails. If i close the app and restart the app using
task
manager it's all right.

How can i avoid this problem ?
Someone have a different solution for this problem?

Thanks

- Dany -
 
That is strange!

It is a wild shot, but why not write a small shell program that will launch
your SQL program, after a slight delay? Then your SQL program would not be
the actual shell program, and may have no problem connecting on the first
attempt.

Daniele Piccinini said:
Thank you Vinson,
I've tried to delay the connection up to 5 min. but this still don't work.
On the other hand, if i stop the app 1 min after the boot and restart it,
the connection works fine.
It looks like the program started as shell is not able to connect ...

- Dany -

Vinson said:
It is just a guess, but perhaps your app (Shell) is available and ready to
connect before the actual network connectivity has been established by the
OS. Why not delay the initial SQL connection by a few seconds,
programatically, to allow the rest of the OS to come to life? It may take
10
seconds of waiting to allow the OS to build the IP stack, etc. Again,
just a
guess...

Vinson

Daniele Piccinini said:
Hi,

I've developed a VC++ supervision application. This app have to be the
only
user interface app that is running on the pc. Doing so the user cannot
"play" with other XP functionality.
I've tried to set this app as shell in this way :

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon]
"Shell"="C:\\MyApp.exe"

The app use a connection to a sql server database, and when the app try
to
connect the login fails. If i close the app and restart the app using
task
manager it's all right.

How can i avoid this problem ?
Someone have a different solution for this problem?

Thanks

- Dany -
 
Thank you Vinson,

I've used a .bat that launch my App, without any delay, and the connection
is established on the first attempt.
I don't know the reason of this behavior but doing so it works good.
Thank you again.

- Dany -

Vinson said:
That is strange!

It is a wild shot, but why not write a small shell program that will
launch
your SQL program, after a slight delay? Then your SQL program would not
be
the actual shell program, and may have no problem connecting on the first
attempt.

Daniele Piccinini said:
Thank you Vinson,
I've tried to delay the connection up to 5 min. but this still don't
work.
On the other hand, if i stop the app 1 min after the boot and restart it,
the connection works fine.
It looks like the program started as shell is not able to connect ...

- Dany -

Vinson said:
It is just a guess, but perhaps your app (Shell) is available and ready
to
connect before the actual network connectivity has been established by
the
OS. Why not delay the initial SQL connection by a few seconds,
programatically, to allow the rest of the OS to come to life? It may
take
10
seconds of waiting to allow the OS to build the IP stack, etc. Again,
just a
guess...

Vinson

:

Hi,

I've developed a VC++ supervision application. This app have to be the
only
user interface app that is running on the pc. Doing so the user cannot
"play" with other XP functionality.
I've tried to set this app as shell in this way :

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon]
"Shell"="C:\\MyApp.exe"

The app use a connection to a sql server database, and when the app
try
to
connect the login fails. If i close the app and restart the app using
task
manager it's all right.

How can i avoid this problem ?
Someone have a different solution for this problem?

Thanks

- Dany -
 
Back
Top