Startup Programs in MinLogon

K

KM

Bernie,

Take a look into the XPe docs for these possible options:
- FBA Generic Command resource (at least once you will be able to run
your command)
- FBA Runonce resource (check Run type)
- Use [HKLM\Software\Microsoft\Windows\CurrentVersion\Run] registry
directly
- Consider [HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
"Shell" or "Userinit" registry entries
- If you have a custom shell, process (run) Startup items from there
using CreateProcess API.

KM
 
B

Bernie

How do I specify a .exe or .bat file that I want to run at Startup in a
Minlogon setup of XPe?

Bernie
 
S

Slobodan Brcin \(eMVP\)

Bernie,

I won't go in to the details why Run is/is not working with minlogon, but I will tell you how I am doing this.

Make your application, or modify this application to start as custom shell and to launch all other application that need to be
started.
This way you will make sure that your application is always started in deterministic way before any other application, and you will
have maximum possible control.

Regards,
Slobodan

PS: User API CreateProcess(...) not shell API.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Have an opinion on the effectiveness of Microsoft Embedded newsgroups? Tell Microsoft!
https://www.windowsembeddedeval.com/community/newsgroups
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Bernie said:
Hi KM,

Thanks for your reply.
I need my .exe application to run each time the system boots.

I tried :-
- Use [HKLM\Software\Microsoft\Windows\CurrentVersion\Run] registry
directly

but this not cause my application to run(?)

Is there anything you can think of that I may have done wrong?

Bernie

KM said:
Bernie,

Take a look into the XPe docs for these possible options:
- FBA Generic Command resource (at least once you will be able to run
your command)
- FBA Runonce resource (check Run type)
- Use [HKLM\Software\Microsoft\Windows\CurrentVersion\Run] registry
directly
- Consider [HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
"Shell" or "Userinit" registry entries
- If you have a custom shell, process (run) Startup items from there
using CreateProcess API.

KM
How do I specify a .exe or .bat file that I want to run at Startup in a
Minlogon setup of XPe?

Bernie
 
B

Bernie

Hi KM,

Thanks for your reply.
I need my .exe application to run each time the system boots.

I tried :-
- Use [HKLM\Software\Microsoft\Windows\CurrentVersion\Run] registry
directly

but this not cause my application to run(?)

Is there anything you can think of that I may have done wrong?

Bernie

KM said:
Bernie,

Take a look into the XPe docs for these possible options:
- FBA Generic Command resource (at least once you will be able to run
your command)
- FBA Runonce resource (check Run type)
- Use [HKLM\Software\Microsoft\Windows\CurrentVersion\Run] registry
directly
- Consider [HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
"Shell" or "Userinit" registry entries
- If you have a custom shell, process (run) Startup items from there
using CreateProcess API.

KM
How do I specify a .exe or .bat file that I want to run at Startup in a
Minlogon setup of XPe?

Bernie
 
K

KM

Bernie,

FBA handles the Run key within a Minlogon image (instead of Explorer). That should work for you.
I have a Minlogon image that launches some apps within Run key.

Does your app require any resources beside Win32 API?
Try to set a simple app to be launched from Run key. Test it, if it works then switch to your app.

--
Regards,
KM, BSquare Corp.

Hi KM,

Thanks for your reply.
I need my .exe application to run each time the system boots.

I tried :-
- Use [HKLM\Software\Microsoft\Windows\CurrentVersion\Run] registry
directly

but this not cause my application to run(?)

Is there anything you can think of that I may have done wrong?

Bernie

KM said:
Bernie,

Take a look into the XPe docs for these possible options:
- FBA Generic Command resource (at least once you will be able to run
your command)
- FBA Runonce resource (check Run type)
- Use [HKLM\Software\Microsoft\Windows\CurrentVersion\Run] registry
directly
- Consider [HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
"Shell" or "Userinit" registry entries
- If you have a custom shell, process (run) Startup items from there
using CreateProcess API.

KM
How do I specify a .exe or .bat file that I want to run at Startup in a
Minlogon setup of XPe?

Bernie
 
K

KM

Slobodan,
I won't go in to the details why Run is/is not working with minlogon, but I will tell you how I am doing this.

It does not?
It works perfectly for me (FBA handles the key if no Explorer there).
 
S

Slobodan Brcin \(eMVP\)

Konstantin,

"is/is not working". Yes that sounds little awkward. I meant to say that I did not wanted to comment on that subject :)

Regards,
Slobodan
 
B

Bernie

KM,

In fact that was what I was doing, I was using netsh.exe, which seems to run
OK from minLogon.
In my case a call to netsh.exe from the "run" registry entry didn't appear
to work.

I tried a custom shell (which works fine), however would prefer the registry
"run" method.

Bernie

KM said:
Bernie,

FBA handles the Run key within a Minlogon image (instead of Explorer). That should work for you.
I have a Minlogon image that launches some apps within Run key.

Does your app require any resources beside Win32 API?
Try to set a simple app to be launched from Run key. Test it, if it works then switch to your app.

--
Regards,
KM, BSquare Corp.

Hi KM,

Thanks for your reply.
I need my .exe application to run each time the system boots.

I tried :-
- Use [HKLM\Software\Microsoft\Windows\CurrentVersion\Run] registry
directly

but this not cause my application to run(?)

Is there anything you can think of that I may have done wrong?

Bernie

KM said:
Bernie,

Take a look into the XPe docs for these possible options:
- FBA Generic Command resource (at least once you will be able to run
your command)
- FBA Runonce resource (check Run type)
- Use [HKLM\Software\Microsoft\Windows\CurrentVersion\Run] registry
directly
- Consider [HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
"Shell" or "Userinit" registry entries
- If you have a custom shell, process (run) Startup items from there
using CreateProcess API.

KM

How do I specify a .exe or .bat file that I want to run at Startup in a
Minlogon setup of XPe?

Bernie
 
S

Slobodan Brcin \(eMVP\)

Hi Bernie,

I guess that you want to call netsh only once, right?
If so have you tried to call it during FBA by "FBA Generic Command"?

Regards,
Slobodan

Bernie said:
KM,

In fact that was what I was doing, I was using netsh.exe, which seems to run
OK from minLogon.
In my case a call to netsh.exe from the "run" registry entry didn't appear
to work.

I tried a custom shell (which works fine), however would prefer the registry
"run" method.

Bernie

KM said:
Bernie,

FBA handles the Run key within a Minlogon image (instead of Explorer). That should work for you.
I have a Minlogon image that launches some apps within Run key.

Does your app require any resources beside Win32 API?
Try to set a simple app to be launched from Run key. Test it, if it works then switch to your app.

--
Regards,
KM, BSquare Corp.

Hi KM,

Thanks for your reply.
I need my .exe application to run each time the system boots.

I tried :-

- Use [HKLM\Software\Microsoft\Windows\CurrentVersion\Run] registry
directly

but this not cause my application to run(?)

Is there anything you can think of that I may have done wrong?

Bernie

Bernie,

Take a look into the XPe docs for these possible options:
- FBA Generic Command resource (at least once you will be able to run
your command)
- FBA Runonce resource (check Run type)
- Use [HKLM\Software\Microsoft\Windows\CurrentVersion\Run] registry
directly
- Consider [HKLM\Software\Microsoft\Windows
NT\CurrentVersion\Winlogon]
"Shell" or "Userinit" registry entries
- If you have a custom shell, process (run) Startup items from there
using CreateProcess API.

KM

How do I specify a .exe or .bat file that I want to run at Startup in a
Minlogon setup of XPe?

Bernie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top