Running when XPe Starts

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can someone give me a hint as to how I configure an application to be
automatically be started when XPe starts? For example, I have created
c:\utilities\test.bat and would like to know how to configure the OS image so
that when FBA finishes and the system reboots, by bat file will get kicked
off.

Thanx -

-Darren-
 
Darren,

There is a bunch of ways to get your batch file launched automatically but some of them depend on some components existence in your
image (like Explorer Shell, Winlogon/Minlogon, etc.).

You can use [HKLM\Software\Microsoft\Windows\CurrentVersion\Run] key to set up a value to run your batch file as a command line
parameter for cmd.exe.
Or, if Winlogon used, you can do that on HKCU branch. (the same key path)

If you are with Explorer Shell you can also have the batch file launched as Start Menu\StartUp item. And that's really easy to set
up in TD under All Users\Start Menu\StartUp folder.

If you are with CMD shell, you can also modify the CMD shell launch string to add more command line parameters to run your batch
file (e.g., cmd.exe /K <batch.bat>).

If you implemented a custom shell and you've got the code for the shell app, your best friends would be APIs like CreateProcess.
 
Hi Paul

Have a look into www.xpefiles.com.
I have posted a Software component
called "User Account Unlimited".

This component starts a batch file late
FBA phase 6005 (before second boot)

You can take this component and use your own batch
(or change the existing batch file in the Rep directory)

But this will be started only once.
(For configuration)

If you want to start it at every boot up, use the
solution from KM in the RUN keys.

--

Martin Grossen, eMVP

AVNET EMG Silica
Franchise Manager Microsoft Embedded Europe

Your competent partner for Microsoft Embedded licencing

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
OK... refining my thoughts a bit...

Is there a way – perhaps in the form of an already-created sample Component
– which will cause a command (such as a script) to be executed:
· Once
· After the FBA second boot (FBA phase 8501 – 12,000)
· Without requiring a user to log in

(Of course, after the 2nd boot, it's easy to get a script to execute only
once. The real trick seems to be how to get this done *before* the first
user login.)

In essence, I’d like to accomplish some system configuration work outside
the scope of XPe (another OS), and have that work done prior to any user
login. If this can be accomplished, my entire appliance build process (save
the reseal and ghosting for duplication) will be completely automated… and
that would be great goodness ;-)

Thanx -

-Darren-
 
Darren,

Why just not set up FBA Generic Command that will launch the batch file like : "cmd.exe / C <patch_path.bat>"?
You will have the control over the FBA phase for the command. It is going to be executed once. No user login relevance.
 
I'm somewhat new to XPe, and after searching this and other forums on the
Windows Embedded, I must admit that I haven't an understanding as to how to
tag a component so as to compel it to be executed, without user intervention,
immediately after the Second Boot but before anyone attempts a login.

(For a variety of reasons beyond the scope of this discussion, it is
important that the script I need execuited starts after the Second Boot. And
depending on user login to kick it off won't do, as the system being crafted
is intended for unattended operation.)

Is there a tutorial on the building of Components that act as Services when
XPe comes up? I think this would do the trick... but alas there didn't
appear to be a generic UserDefinedService .sld file I could use or extend.
Anyone care to post one?

Thanx -

-Darren-
 
Darren,
I'm somewhat new to XPe, and after searching this and other forums on the
Windows Embedded, I must admit that I haven't an understanding as to how to

Then you should read XPe docs about FBA and FBA phases.
tag a component so as to compel it to be executed, without user intervention,
immediately after the Second Boot but before anyone attempts a login.

Can you explain why the *Second* Boot? Where the number (2) is coming from?
If your script needs some components to be installed first, then you should build the right order for the script launch command (FBA
phase order)
(For a variety of reasons beyond the scope of this discussion, it is
important that the script I need execuited starts after the Second Boot. And
depending on user login to kick it off won't do, as the system being crafted
is intended for unattended operation.)

Btw.. if you really need the file to be launch unattended, launch it under LocalSystem account, or lock the workstation why the
script is being executed.
Is there a tutorial on the building of Components that act as Services when
XPe comes up? I think this would do the trick... but alas there didn't
appear to be a generic UserDefinedService .sld file I could use or extend.
Anyone care to post one?

Please search XPe docs for "FBA Service" resource.
But since you mentioned you wanted to launch the command just once, the FBA Generic Command would serve it better.
 
Back
Top