how to execute BAT file during FBA(after cloning)?

A

Ann

I wrote a BAT file, which could be run properly in XPE. I want to execute
the BAT file during FBA(after cloning phrase).Is it possible?and how?

Thanks and Best Regards,

Ann
 
K

KM

Ann,

Assuming you have not changed default cloning phase, in Component Designer
add a "FBA Generic Command" to your component resources and set it extended
property "Phase" to a value more than 12,000. Extended properties FilePath
and Arguments will help you to set up your batch file command (e.g.
FilePath="%11%\cmd.exe", Arguments="/C your_target_batch_file_path.bat").

You may want to search in XPe docs for the cloning phase info.

Hope this helps,
KM
 
R

RussR

KM,

I am also trying to do something similar. I want to run a .bat file that
sets what folders are shared over my network. This is done using a batch
file that executes the 'net share' command.

I was wondering if using the FBA Generic command is the best way to do this.
What should my Phase be set to?

Thanks
Russr
 
R

Roy Hodgkinson

Russ,

I took the approach that I would only do essentials
during FBA. For anything that can be done after FBA, I
include a RunOnce entry in my resealed "golden image". In
fact, to mimic W2K SYSPREP behavior, I have a RunOnce
that sets up the next RunOnce then reboots after FBA
finishes -- this ensures that the NIC driver is active
when my real build script starts.

Because I have a FAT16 DOS boot partition on E:, I just
drop the required files in with Ghost Explorer. Its also
simple enough to create a folder component with the files
you need.

Here's how I get my Wise Build script, Config.exe (that
issues "Net Use") to kick-off:

Add to the Golden Image:

HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce
BuildBoot=E:\\BuildBoot.cmd
(yes, you do need the double backslash)

BuildBoot.cmd:
===========================
@Echo off

rem Establish Runonce Key so that E:\Config.exe runs on
reboot.
regedit /S E:\Build.reg
rem Wait for the machine to fully initialize. %ComSpec%
is just the full path for CMD.EXE.

Title Boot to Build
%ComSpec% /c "Echo Waiting 45 seconds for XPE to complete
startup before issuing SHUTDOWN && E:\Utils\Sleep.exe 45"

rem Restart
E:\Utils\Shutdown.exe /C /L /R /T:2
Exit
===========================

Build.reg:
===========================
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVers
ion\RunOnce]
"Build"="E:\\Config.exe"
===========================

Hope this is helpful, Roy
 
R

RussR

In my case, it is easier to use the FBA Generic Command and execute my .bat
file, but set the advance property, "Phase" to 8499. This makes the .bat
file the very last thing that FBA executes. Thus only the reboot after FBA
finishes is required.

Another really easy way I've found is to just use the Run instead of RunOnce
because the only thing my .bat file does is set up what folders are shared
and changes some local security policies.

Your solution is interesting though and I have a couple of questions about
it:
After you add build.reg to the RunOnce key in the registry, how do you wait
for the machine to fully initialize? And since your original RunOnce key
is being executed during FBA, this means you have to wait for FBA to finish
before restart, but FBA is waiting for your script program (build.cmd) to
finish.

Your file had:
Title Boot to Build
%ComSpec% /c "Echo Waiting 45 seconds for XPE to complete
startup before issuing SHUTDOWN && E:\Utils\Sleep.exe 45"
So here you're just displaying that you're gonna wait 45 seconds, but how do
you know that's enough?
rem Restart
E:\Utils\Shutdown.exe /C /L /R /T:2
Exit
Shutdown will restart, but I don't see anything in here that waits 45
seconds or until FBA is done, where does that happen and how?

Roy Hodgkinson said:
Russ,

I took the approach that I would only do essentials
during FBA. For anything that can be done after FBA, I
include a RunOnce entry in my resealed "golden image". In
fact, to mimic W2K SYSPREP behavior, I have a RunOnce
that sets up the next RunOnce then reboots after FBA
finishes -- this ensures that the NIC driver is active
when my real build script starts.

Because I have a FAT16 DOS boot partition on E:, I just
drop the required files in with Ghost Explorer. Its also
simple enough to create a folder component with the files
you need.

Here's how I get my Wise Build script, Config.exe (that
issues "Net Use") to kick-off:

Add to the Golden Image:

HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce
BuildBoot=E:\\BuildBoot.cmd
(yes, you do need the double backslash)

BuildBoot.cmd:
===========================
@Echo off

rem Establish Runonce Key so that E:\Config.exe runs on
reboot.
regedit /S E:\Build.reg
rem Wait for the machine to fully initialize. %ComSpec%
is just the full path for CMD.EXE.

Title Boot to Build
%ComSpec% /c "Echo Waiting 45 seconds for XPE to complete
startup before issuing SHUTDOWN && E:\Utils\Sleep.exe 45"

rem Restart
E:\Utils\Shutdown.exe /C /L /R /T:2
Exit
===========================

Build.reg:
===========================
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVers
ion\RunOnce]
"Build"="E:\\Config.exe"
===========================

Hope this is helpful, Roy
-----Original Message-----
KM,

I am also trying to do something similar. I want to run a .bat file that
sets what folders are shared over my network. This is done using a batch
file that executes the 'net share' command.

I was wondering if using the FBA Generic command is the best way to do this.
What should my Phase be set to?

Thanks
Russr

resources and set it
extended XPE. I want to
execute


.
 
G

Guest

Russ,

The RunOnce key is executed when the Explorer shell runs
to initialize the desktop -- by my experience that's after
FBA finishes and thus BuildBoot.cmd runs after FBA.

%ComSpec% /c Echo Waiting 45 seconds for XPE to complete
startup before issuing SHUTDOWN && E:\Utils\Sleep.exe 45
is two commands stacked using the double ampersand
operator. The Echo puts text in the Command window with
Title "Boot to Build" then Sleep.exe waits 45 seconds.
When the Sleep.exe returns control, Shutdown.exe is run. I
determined the 45 seconds by trial and error after
shutdown.exe failed to work and I guessed from other
experience that it depended on something that was not yet
initialized.

I have used this technique successfully for hundreds of
image builds with no timing issues surfacing. This
technique gives me the flexibility to tweak the XP
Embedded image in the Config.exe script without having to
rebuild the image in Target Designer and go through all
kinds of regeression testing.

Cheers, Roy
-----Original Message-----
In my case, it is easier to use the FBA Generic Command and execute my .bat
file, but set the advance property, "Phase" to 8499. This makes the .bat
file the very last thing that FBA executes. Thus only the reboot after FBA
finishes is required.

Another really easy way I've found is to just use the Run instead of RunOnce
because the only thing my .bat file does is set up what folders are shared
and changes some local security policies.

Your solution is interesting though and I have a couple of questions about
it:
After you add build.reg to the RunOnce key in the registry, how do you wait
for the machine to fully initialize? And since your original RunOnce key
is being executed during FBA, this means you have to wait for FBA to finish
before restart, but FBA is waiting for your script program (build.cmd) to
finish.

Your file had:
Title Boot to Build
%ComSpec% /c "Echo Waiting 45 seconds for XPE to complete
startup before issuing SHUTDOWN && E:\Utils\Sleep.exe 45"
So here you're just displaying that you're gonna wait 45 seconds, but how do
you know that's enough?
rem Restart
E:\Utils\Shutdown.exe /C /L /R /T:2
Exit
Shutdown will restart, but I don't see anything in here that waits 45
seconds or until FBA is done, where does that happen and how?

Russ,

I took the approach that I would only do essentials
during FBA. For anything that can be done after FBA, I
include a RunOnce entry in my resealed "golden image". In
fact, to mimic W2K SYSPREP behavior, I have a RunOnce
that sets up the next RunOnce then reboots after FBA
finishes -- this ensures that the NIC driver is active
when my real build script starts.

Because I have a FAT16 DOS boot partition on E:, I just
drop the required files in with Ghost Explorer. Its also
simple enough to create a folder component with the files
you need.

Here's how I get my Wise Build script, Config.exe (that
issues "Net Use") to kick-off:

Add to the Golden Image:

HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce
BuildBoot=E:\\BuildBoot.cmd
(yes, you do need the double backslash)

BuildBoot.cmd:
===========================
@Echo off

rem Establish Runonce Key so that E:\Config.exe runs on
reboot.
regedit /S E:\Build.reg
rem Wait for the machine to fully initialize. %ComSpec%
is just the full path for CMD.EXE.

Title Boot to Build
%ComSpec% /c "Echo Waiting 45 seconds for XPE to complete
startup before issuing SHUTDOWN && E:\Utils\Sleep.exe 45"

rem Restart
E:\Utils\Shutdown.exe /C /L /R /T:2
Exit
===========================

Build.reg:
===========================
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVers
ion\RunOnce]
"Build"="E:\\Config.exe"
===========================

Hope this is helpful, Roy
-----Original Message-----
KM,

I am also trying to do something similar. I want to
run
a .bat file that
sets what folders are shared over my network. This is done using a batch
file that executes the 'net share' command.

I was wondering if using the FBA Generic command is the best way to do this.
What should my Phase be set to?

Thanks
Russr

Ann,

Assuming you have not changed default cloning phase, in Component Designer
add a "FBA Generic Command" to your component resources and set it
extended
property "Phase" to a value more than 12,000.
Extended
properties FilePath
and Arguments will help you to set up your batch file command (e.g.
FilePath="%11%\cmd.exe", Arguments="/C your_target_batch_file_path.bat").

You may want to search in XPe docs for the cloning phase info.

Hope this helps,
KM

I wrote a BAT file, which could be run properly in XPE. I want to
execute
the BAT file during FBA(after cloning phrase).Is it possible?and how?

Thanks and Best Regards,

Ann




.


.
 
K

KM

RussR,

You set 8499 phase if you don't need to execute the command after cloning
phase.

Personally, I never liked to use RunOnce requests (Run, RunOnce, RunOnceEx)
for anything non-FBA specific.
If I need to set up anything in my image user or UI specific, I prefer
either FBA Generic commands or StartUp items. It just makes things easier
and more controllable (I execute an item once!). Sometimes it may be good to
use ""Shell" and "UserInit" registry keys.

Also, check FLAGS and TIMEOUT options of FBA Generic Command. They may help
you to execute yuour process and wait for it.

KM

In my case, it is easier to use the FBA Generic Command and execute my ..bat
file, but set the advance property, "Phase" to 8499. This makes the .bat
file the very last thing that FBA executes. Thus only the reboot after FBA
finishes is required.

Another really easy way I've found is to just use the Run instead of RunOnce
because the only thing my .bat file does is set up what folders are shared
and changes some local security policies.

Your solution is interesting though and I have a couple of questions about
it:
After you add build.reg to the RunOnce key in the registry, how do you wait
for the machine to fully initialize? And since your original RunOnce key
is being executed during FBA, this means you have to wait for FBA to finish
before restart, but FBA is waiting for your script program (build.cmd) to
finish.

Your file had:
Title Boot to Build
%ComSpec% /c "Echo Waiting 45 seconds for XPE to complete
startup before issuing SHUTDOWN && E:\Utils\Sleep.exe 45"
So here you're just displaying that you're gonna wait 45 seconds, but how do
you know that's enough?
rem Restart
E:\Utils\Shutdown.exe /C /L /R /T:2
Exit
Shutdown will restart, but I don't see anything in here that waits 45
seconds or until FBA is done, where does that happen and how?

Roy Hodgkinson said:
Russ,

I took the approach that I would only do essentials
during FBA. For anything that can be done after FBA, I
include a RunOnce entry in my resealed "golden image". In
fact, to mimic W2K SYSPREP behavior, I have a RunOnce
that sets up the next RunOnce then reboots after FBA
finishes -- this ensures that the NIC driver is active
when my real build script starts.

Because I have a FAT16 DOS boot partition on E:, I just
drop the required files in with Ghost Explorer. Its also
simple enough to create a folder component with the files
you need.

Here's how I get my Wise Build script, Config.exe (that
issues "Net Use") to kick-off:

Add to the Golden Image:

HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce
BuildBoot=E:\\BuildBoot.cmd
(yes, you do need the double backslash)

BuildBoot.cmd:
===========================
@Echo off

rem Establish Runonce Key so that E:\Config.exe runs on
reboot.
regedit /S E:\Build.reg
rem Wait for the machine to fully initialize. %ComSpec%
is just the full path for CMD.EXE.

Title Boot to Build
%ComSpec% /c "Echo Waiting 45 seconds for XPE to complete
startup before issuing SHUTDOWN && E:\Utils\Sleep.exe 45"

rem Restart
E:\Utils\Shutdown.exe /C /L /R /T:2
Exit
===========================

Build.reg:
===========================
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVers
ion\RunOnce]
"Build"="E:\\Config.exe"
===========================

Hope this is helpful, Roy
-----Original Message-----
KM,

I am also trying to do something similar. I want to run a .bat file that
sets what folders are shared over my network. This is done using a batch
file that executes the 'net share' command.

I was wondering if using the FBA Generic command is the best way to do this.
What should my Phase be set to?

Thanks
Russr

Ann,

Assuming you have not changed default cloning phase, in Component Designer
add a "FBA Generic Command" to your component resources and set it
extended
property "Phase" to a value more than 12,000. Extended properties FilePath
and Arguments will help you to set up your batch file command (e.g.
FilePath="%11%\cmd.exe", Arguments="/C your_target_batch_file_path.bat").

You may want to search in XPe docs for the cloning phase info.

Hope this helps,
KM

I wrote a BAT file, which could be run properly in XPE. I want to
execute
the BAT file during FBA(after cloning phrase).Is it possible?and how?

Thanks and Best Regards,

Ann




.
 
R

RussR

Roy,

First of all, I can never personally get RunOnce to execute after FBA when
Explorer initiliazes the desktop. I've created a simple RunOnce key that
basically just runs a batch script with simply the pause command. I found
that the screen that comes up saying "Press any key to continue" comes up
once and only once and that is towards the end of PnP detection of FBA. It
does not come up when explorer first runs or anything like that. I urge you
to try this if you haven't already.
This technique gives me the flexibility to tweak the XP
Embedded image in the Config.exe script without having to
rebuild the image in Target Designer and go through all
kinds of regeression testing.
Explain to me how you do this because in my experience, if I add something
to the RunOnce registry key (let's say a program that change ssomething so I
would know if it ran or not) and then reboot, it never gets executed. So
I'm curious as to how you are able to do everything w/o rebuilding the image
in TD.


Russ,

The RunOnce key is executed when the Explorer shell runs
to initialize the desktop -- by my experience that's after
FBA finishes and thus BuildBoot.cmd runs after FBA.

%ComSpec% /c Echo Waiting 45 seconds for XPE to complete
startup before issuing SHUTDOWN && E:\Utils\Sleep.exe 45
is two commands stacked using the double ampersand
operator. The Echo puts text in the Command window with
Title "Boot to Build" then Sleep.exe waits 45 seconds.
When the Sleep.exe returns control, Shutdown.exe is run. I
determined the 45 seconds by trial and error after
shutdown.exe failed to work and I guessed from other
experience that it depended on something that was not yet
initialized.

I have used this technique successfully for hundreds of
image builds with no timing issues surfacing. This
technique gives me the flexibility to tweak the XP
Embedded image in the Config.exe script without having to
rebuild the image in Target Designer and go through all
kinds of regeression testing.

Cheers, Roy
-----Original Message-----
In my case, it is easier to use the FBA Generic Command and execute my .bat
file, but set the advance property, "Phase" to 8499. This makes the .bat
file the very last thing that FBA executes. Thus only the reboot after FBA
finishes is required.

Another really easy way I've found is to just use the Run instead of RunOnce
because the only thing my .bat file does is set up what folders are shared
and changes some local security policies.

Your solution is interesting though and I have a couple of questions about
it:
After you add build.reg to the RunOnce key in the registry, how do you wait
for the machine to fully initialize? And since your original RunOnce key
is being executed during FBA, this means you have to wait for FBA to finish
before restart, but FBA is waiting for your script program (build.cmd) to
finish.

Your file had:
Title Boot to Build
%ComSpec% /c "Echo Waiting 45 seconds for XPE to complete
startup before issuing SHUTDOWN && E:\Utils\Sleep.exe 45"
So here you're just displaying that you're gonna wait 45 seconds, but how do
you know that's enough?
rem Restart
E:\Utils\Shutdown.exe /C /L /R /T:2
Exit
Shutdown will restart, but I don't see anything in here that waits 45
seconds or until FBA is done, where does that happen and how?

Russ,

I took the approach that I would only do essentials
during FBA. For anything that can be done after FBA, I
include a RunOnce entry in my resealed "golden image". In
fact, to mimic W2K SYSPREP behavior, I have a RunOnce
that sets up the next RunOnce then reboots after FBA
finishes -- this ensures that the NIC driver is active
when my real build script starts.

Because I have a FAT16 DOS boot partition on E:, I just
drop the required files in with Ghost Explorer. Its also
simple enough to create a folder component with the files
you need.

Here's how I get my Wise Build script, Config.exe (that
issues "Net Use") to kick-off:

Add to the Golden Image:

HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce
BuildBoot=E:\\BuildBoot.cmd
(yes, you do need the double backslash)

BuildBoot.cmd:
===========================
@Echo off

rem Establish Runonce Key so that E:\Config.exe runs on
reboot.
regedit /S E:\Build.reg
rem Wait for the machine to fully initialize. %ComSpec%
is just the full path for CMD.EXE.

Title Boot to Build
%ComSpec% /c "Echo Waiting 45 seconds for XPE to complete
startup before issuing SHUTDOWN && E:\Utils\Sleep.exe 45"

rem Restart
E:\Utils\Shutdown.exe /C /L /R /T:2
Exit
===========================

Build.reg:
===========================
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVers
ion\RunOnce]
"Build"="E:\\Config.exe"
===========================

Hope this is helpful, Roy

-----Original Message-----
KM,

I am also trying to do something similar. I want to run
a .bat file that
sets what folders are shared over my network. This is
done using a batch
file that executes the 'net share' command.

I was wondering if using the FBA Generic command is the
best way to do this.
What should my Phase be set to?

Thanks
Russr

Ann,

Assuming you have not changed default cloning phase,
in Component Designer
add a "FBA Generic Command" to your component
resources and set it
extended
property "Phase" to a value more than 12,000. Extended
properties FilePath
and Arguments will help you to set up your batch file
command (e.g.
FilePath="%11%\cmd.exe", Arguments="/C
your_target_batch_file_path.bat").

You may want to search in XPe docs for the cloning
phase info.

Hope this helps,
KM

I wrote a BAT file, which could be run properly in
XPE. I want to
execute
the BAT file during FBA(after cloning phrase).Is it
possible?and how?

Thanks and Best Regards,

Ann




.


.
 
A

Alexander Suhovey

RussR,
If you add something in Run/SunOnce registry keys directly (e.g. 'Extra
Registry Data' > Add...), it will be executed by FBA. If you want something
to be executed from RunOnce key after FBA, you can use 'RunOnce request' FBA
directive (e.g. 'Extra Resources' > Add > 'RunOnce Request')

Hope this helps.
Al

RussR said:
Roy,

First of all, I can never personally get RunOnce to execute after FBA when
Explorer initiliazes the desktop. I've created a simple RunOnce key that
basically just runs a batch script with simply the pause command. I found
that the screen that comes up saying "Press any key to continue" comes up
once and only once and that is towards the end of PnP detection of FBA. It
does not come up when explorer first runs or anything like that. I urge you
to try this if you haven't already.
This technique gives me the flexibility to tweak the XP
Embedded image in the Config.exe script without having to
rebuild the image in Target Designer and go through all
kinds of regeression testing.
Explain to me how you do this because in my experience, if I add something
to the RunOnce registry key (let's say a program that change ssomething so I
would know if it ran or not) and then reboot, it never gets executed. So
I'm curious as to how you are able to do everything w/o rebuilding the image
in TD.


Russ,

The RunOnce key is executed when the Explorer shell runs
to initialize the desktop -- by my experience that's after
FBA finishes and thus BuildBoot.cmd runs after FBA.

%ComSpec% /c Echo Waiting 45 seconds for XPE to complete
startup before issuing SHUTDOWN && E:\Utils\Sleep.exe 45
is two commands stacked using the double ampersand
operator. The Echo puts text in the Command window with
Title "Boot to Build" then Sleep.exe waits 45 seconds.
When the Sleep.exe returns control, Shutdown.exe is run. I
determined the 45 seconds by trial and error after
shutdown.exe failed to work and I guessed from other
experience that it depended on something that was not yet
initialized.

I have used this technique successfully for hundreds of
image builds with no timing issues surfacing. This
technique gives me the flexibility to tweak the XP
Embedded image in the Config.exe script without having to
rebuild the image in Target Designer and go through all
kinds of regeression testing.

Cheers, Roy
-----Original Message-----
In my case, it is easier to use the FBA Generic Command and execute my .bat
file, but set the advance property, "Phase" to 8499. This makes the .bat
file the very last thing that FBA executes. Thus only the reboot after FBA
finishes is required.

Another really easy way I've found is to just use the Run instead of RunOnce
because the only thing my .bat file does is set up what folders are shared
and changes some local security policies.

Your solution is interesting though and I have a couple of questions about
it:
After you add build.reg to the RunOnce key in the registry, how do you wait
for the machine to fully initialize? And since your original RunOnce key
is being executed during FBA, this means you have to wait for FBA to finish
before restart, but FBA is waiting for your script program (build.cmd) to
finish.

Your file had:
Title Boot to Build
%ComSpec% /c "Echo Waiting 45 seconds for XPE to complete
startup before issuing SHUTDOWN && E:\Utils\Sleep.exe 45"
So here you're just displaying that you're gonna wait 45 seconds, but how do
you know that's enough?

rem Restart
E:\Utils\Shutdown.exe /C /L /R /T:2
Exit
Shutdown will restart, but I don't see anything in here that waits 45
seconds or until FBA is done, where does that happen and how?

Russ,

I took the approach that I would only do essentials
during FBA. For anything that can be done after FBA, I
include a RunOnce entry in my resealed "golden image". In
fact, to mimic W2K SYSPREP behavior, I have a RunOnce
that sets up the next RunOnce then reboots after FBA
finishes -- this ensures that the NIC driver is active
when my real build script starts.

Because I have a FAT16 DOS boot partition on E:, I just
drop the required files in with Ghost Explorer. Its also
simple enough to create a folder component with the files
you need.

Here's how I get my Wise Build script, Config.exe (that
issues "Net Use") to kick-off:

Add to the Golden Image:

HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce
BuildBoot=E:\\BuildBoot.cmd
(yes, you do need the double backslash)

BuildBoot.cmd:
===========================
@Echo off

rem Establish Runonce Key so that E:\Config.exe runs on
reboot.
regedit /S E:\Build.reg
rem Wait for the machine to fully initialize. %ComSpec%
is just the full path for CMD.EXE.

Title Boot to Build
%ComSpec% /c "Echo Waiting 45 seconds for XPE to complete
startup before issuing SHUTDOWN && E:\Utils\Sleep.exe 45"

rem Restart
E:\Utils\Shutdown.exe /C /L /R /T:2
Exit
===========================

Build.reg:
===========================
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVers
ion\RunOnce]
"Build"="E:\\Config.exe"
===========================

Hope this is helpful, Roy

-----Original Message-----
KM,

I am also trying to do something similar. I want to run
a .bat file that
sets what folders are shared over my network. This is
done using a batch
file that executes the 'net share' command.

I was wondering if using the FBA Generic command is the
best way to do this.
What should my Phase be set to?

Thanks
Russr

Ann,

Assuming you have not changed default cloning phase,
in Component Designer
add a "FBA Generic Command" to your component
resources and set it
extended
property "Phase" to a value more than 12,000. Extended
properties FilePath
and Arguments will help you to set up your batch file
command (e.g.
FilePath="%11%\cmd.exe", Arguments="/C
your_target_batch_file_path.bat").

You may want to search in XPe docs for the cloning
phase info.

Hope this helps,
KM

I wrote a BAT file, which could be run properly in
XPE. I want to
execute
the BAT file during FBA(after cloning phrase).Is it
possible?and how?

Thanks and Best Regards,

Ann




.



.
 
R

RussR

If you add something in Run/SunOnce registry keys directly (e.g. 'Extra
Registry Data' > Add...), it will be executed by FBA. If you want something
to be executed from RunOnce key after FBA, you can use 'RunOnce request' FBA
directive (e.g. 'Extra Resources' > Add > 'RunOnce Request')

If you add something directly into RunOnce/Run using "Extra Registry
Settings", it is no different from adding a "RunOnce Request". Assuming
they are both RunOnce, they will be executed in FBA towards the end of PnP
detection and also before the first time Explorer initialzes desktop. No
difference between the two.

I've spent a lot of time trying it out and the above were my results.

RussR
 
R

RussR

I'm not disagreeing with the docs, I am disagreeing with your statement
saying that there's a difference between using the RunOnceRequest resource
versus directly using the Extra Registry setting to hardcode the keys.

the docs[2] say that:
"The RunOnce key is processed by FBA after Plug and Play device enumeration,
and again after DLL registration processing. It is then processed after
logon as the Run key. Typically, this flag is used when a reboot is required
(such as a DLL or OCX registration). "

They also say:
"These values are stored in the registry keys Run, RunOnce, or RunOnceEx in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\."

So essentially the two are the same.

Alexander Suhovey said:
Well, it appears to be true. At least for Flags=1. I just echoed docs [1,2],
should try it myself first.
Did you try other 'Flags' values?

[1]
http://msdn.microsoft.com/library/en-us/dnembedded/html/embedded05212002.asp
http://msdn.microsoft.com/library/en-us/xpehelp/html/xeconrunoncerequest.asp
Al.

request'
FBA

If you add something directly into RunOnce/Run using "Extra Registry
Settings", it is no different from adding a "RunOnce Request". Assuming
they are both RunOnce, they will be executed in FBA towards the end of PnP
detection and also before the first time Explorer initialzes desktop. No
difference between the two.

I've spent a lot of time trying it out and the above were my results.

RussR
 
A

Alexander Suhovey

Ok, but this is not *my* statement :) Maybe i'm just misunderstanding the
docs.
from [1]:
-----
Since FBA runs before the device is shipped, anything placed directly in the
Run or RunOnce keys will run during the FBA processing, which isn't usually
what is expected. The RunOnce request FBA directive lets you set a Run,
RunOnce, or RunOnceEx command that will run after FBA finishes.
-----

Al.

RussR said:
I'm not disagreeing with the docs, I am disagreeing with your statement
saying that there's a difference between using the RunOnceRequest resource
versus directly using the Extra Registry setting to hardcode the keys.

the docs[2] say that:
"The RunOnce key is processed by FBA after Plug and Play device enumeration,
and again after DLL registration processing. It is then processed after
logon as the Run key. Typically, this flag is used when a reboot is required
(such as a DLL or OCX registration). "

They also say:
"These values are stored in the registry keys Run, RunOnce, or RunOnceEx in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\."

So essentially the two are the same.

Alexander Suhovey said:
Well, it appears to be true. At least for Flags=1. I just echoed docs [1,2],
should try it myself first.
Did you try other 'Flags' values?

[1]
http://msdn.microsoft.com/library/en-us/dnembedded/html/embedded05212002.asp
http://msdn.microsoft.com/library/en-us/xpehelp/html/xeconrunoncerequest.asp
 

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