FBA Generic Command weirdness

T

Travis

Some time ago I started with a MinLogon based image and created several
components that included FBA Generic Commands to perform installations.
Everything worked fine. Recently it became necessary to migrate to a
Windows Logon based image and my FBA Generic Commands were now failing.
So I started adjusting phases and found that if my moved my commands
to the very end of FBA they started working... sometimes. Finally I
came to find that the commands only work if they are run after some
delay after the reboot following EWF configuration (note that EWF is not
protecting the Windows drive, so it should be unrelated). So now I have
an FBA Generic Command to run 'cmd.exe /C pause' at phase 65529 so that
all my FBA Generic Commands that I put at phase 65530 can run
successfully. If I take away the pause, then any commands scheduled at
phase 65530 fail if they run in the first few seconds after FBA starts
running again. See the FBALOG.TXT snipits below:

Without pause:
21:48:43 PM - [CallEntryPointThread] C:\WINDOWS\SYSTEM32\ewfdll.dll,
ConfigureEwf
21:48:43 PM - [FBASetProgressText] Resetting Setup Flag...
21:48:43 PM - [FBADoReboot] Sleeping...
21:48:53 PM - [FBADoReboot] Rebooting system...
21:49:25 PM - [FBASetProgressText] Installing Components...
21:49:26 PM - [FBALaunch] C:\WINDOWS\FBA\oem\wdreg.exe -inf
C:\WINDOWS\inf\windrvr6.inf install (ExitCode: 0x1)

With pause:
11:00:33 AM - [CallEntryPointThread] C:\WINDOWS\SYSTEM32\ewfdll.dll,
ConfigureEwf
11:00:33 AM - [FBASetProgressText] Resetting Setup Flag...
11:01:10 AM - [FBADoReboot] Sleeping...
11:01:20 AM - [FBADoReboot] Rebooting system...
11:01:52 AM - [FBASetProgressText] Installing Components...
11:01:58 AM - [FBALaunch] C:\WINDOWS\SYSTEM32\cmd.exe /C pause
(ExitCode: 0x0)
11:02:14 AM - [FBALaunch] C:\WINDOWS\FBA\oem\wdreg.exe -inf
...\..\INF\windrvr6.inf install (ExitCode: 0x0)

It's not just the wdreg.exe call that has a problem. I have FBA Generic
Commands to install printers by calling printui.dll,PrintUIEntry via
rundll32 and these pop-up a message saying "Invalid Arguments" unless I
add the pause. Anybody have any idea what's going on? Anybody else
seen behavior like this?

Thanks in advance,
Travis
 
K

KM

Travis,

What I see from the parts of the logs you posted is that your commands failed because some components were not yet installed or were
in the installation phase.

What you may want to try is the following:

- Instead of the Pause command, have am empty command (or just a launch of cmd.exe) with Reboot flag set to True.
Then your next command (wdreg install, for instance) will be launched after the reboot.
If it runs fine - your install definitely depends on some other component installations.

- Seems like the failed commands were hardware driver installations related, right? Therefore you can analyze why the installs
failed if you look in to \Windows\SetupApi.log file.

KM
Some time ago I started with a MinLogon based image and created several components that included FBA Generic Commands to perform
installations. Everything worked fine. Recently it became necessary to migrate to a Windows Logon based image and my FBA Generic
Commands were now failing. So I started adjusting phases and found that if my moved my commands to the very end of FBA they
started working... sometimes. Finally I came to find that the commands only work if they are run after some delay after the
reboot following EWF configuration (note that EWF is not protecting the Windows drive, so it should be unrelated). So now I have
an FBA Generic Command to run 'cmd.exe /C pause' at phase 65529 so that all my FBA Generic Commands that I put at phase 65530 can
run successfully. If I take away the pause, then any commands scheduled at phase 65530 fail if they run in the first few seconds
after FBA starts running again. See the FBALOG.TXT snipits below:

Without pause:
21:48:43 PM - [CallEntryPointThread] C:\WINDOWS\SYSTEM32\ewfdll.dll, ConfigureEwf
21:48:43 PM - [FBASetProgressText] Resetting Setup Flag...
21:48:43 PM - [FBADoReboot] Sleeping...
21:48:53 PM - [FBADoReboot] Rebooting system...
21:49:25 PM - [FBASetProgressText] Installing Components...
21:49:26 PM - [FBALaunch] C:\WINDOWS\FBA\oem\wdreg.exe -inf C:\WINDOWS\inf\windrvr6.inf install (ExitCode: 0x1)

With pause:
11:00:33 AM - [CallEntryPointThread] C:\WINDOWS\SYSTEM32\ewfdll.dll, ConfigureEwf
11:00:33 AM - [FBASetProgressText] Resetting Setup Flag...
11:01:10 AM - [FBADoReboot] Sleeping...
11:01:20 AM - [FBADoReboot] Rebooting system...
11:01:52 AM - [FBASetProgressText] Installing Components...
11:01:58 AM - [FBALaunch] C:\WINDOWS\SYSTEM32\cmd.exe /C pause (ExitCode: 0x0)
11:02:14 AM - [FBALaunch] C:\WINDOWS\FBA\oem\wdreg.exe -inf ..\..\INF\windrvr6.inf install (ExitCode: 0x0)

It's not just the wdreg.exe call that has a problem. I have FBA Generic Commands to install printers by calling
printui.dll,PrintUIEntry via rundll32 and these pop-up a message saying "Invalid Arguments" unless I add the pause. Anybody have
any idea what's going on? Anybody else seen behavior like this?

Thanks in advance,
Travis
 
T

Travis

Here's some more information after playing around with it a bit:

Forcing a reboot does NOT cause the commands to work. I added a reboot
at FBA phase 65529 and problem still exists for the first five or so
seconds after that reboot. It would appears that the problem is related
to something that doesn't happen until the first time Windows starts
(i.e., always after the last reboot). Does this make sense? The
problem occurs during FBA but it's also immediately before Windows runs
the shell for the first time.

The commands that fail never get far enough to show up in setupapi.log.

The problem does not exist with MinLogon, so it's related to Windows
Logon or one of it's dependencies.

Any more ideas?

- Travis
Travis,

What I see from the parts of the logs you posted is that your commands failed because some components were not yet installed or were
in the installation phase.

What you may want to try is the following:

- Instead of the Pause command, have am empty command (or just a launch of cmd.exe) with Reboot flag set to True.
Then your next command (wdreg install, for instance) will be launched after the reboot.
If it runs fine - your install definitely depends on some other component installations.

- Seems like the failed commands were hardware driver installations related, right? Therefore you can analyze why the installs
failed if you look in to \Windows\SetupApi.log file.

KM

Some time ago I started with a MinLogon based image and created several components that included FBA Generic Commands to perform
installations. Everything worked fine. Recently it became necessary to migrate to a Windows Logon based image and my FBA Generic
Commands were now failing. So I started adjusting phases and found that if my moved my commands to the very end of FBA they
started working... sometimes. Finally I came to find that the commands only work if they are run after some delay after the
reboot following EWF configuration (note that EWF is not protecting the Windows drive, so it should be unrelated). So now I have
an FBA Generic Command to run 'cmd.exe /C pause' at phase 65529 so that all my FBA Generic Commands that I put at phase 65530 can
run successfully. If I take away the pause, then any commands scheduled at phase 65530 fail if they run in the first few seconds
after FBA starts running again. See the FBALOG.TXT snipits below:

Without pause:
21:48:43 PM - [CallEntryPointThread] C:\WINDOWS\SYSTEM32\ewfdll.dll, ConfigureEwf
21:48:43 PM - [FBASetProgressText] Resetting Setup Flag...
21:48:43 PM - [FBADoReboot] Sleeping...
21:48:53 PM - [FBADoReboot] Rebooting system...
21:49:25 PM - [FBASetProgressText] Installing Components...
21:49:26 PM - [FBALaunch] C:\WINDOWS\FBA\oem\wdreg.exe -inf C:\WINDOWS\inf\windrvr6.inf install (ExitCode: 0x1)

With pause:
11:00:33 AM - [CallEntryPointThread] C:\WINDOWS\SYSTEM32\ewfdll.dll, ConfigureEwf
11:00:33 AM - [FBASetProgressText] Resetting Setup Flag...
11:01:10 AM - [FBADoReboot] Sleeping...
11:01:20 AM - [FBADoReboot] Rebooting system...
11:01:52 AM - [FBASetProgressText] Installing Components...
11:01:58 AM - [FBALaunch] C:\WINDOWS\SYSTEM32\cmd.exe /C pause (ExitCode: 0x0)
11:02:14 AM - [FBALaunch] C:\WINDOWS\FBA\oem\wdreg.exe -inf ..\..\INF\windrvr6.inf install (ExitCode: 0x0)

It's not just the wdreg.exe call that has a problem. I have FBA Generic Commands to install printers by calling
printui.dll,PrintUIEntry via rundll32 and these pop-up a message saying "Invalid Arguments" unless I add the pause. Anybody have
any idea what's going on? Anybody else seen behavior like this?

Thanks in advance,
Travis
 
K

KM

Travis,

It might happen that your component install depends on some other
drivers/services to be running (it is hard to say without seeing the
binaries).

Instead of waiting for a hardcoded value you can try to implement a wait
loop based on CMP_WaitNoPendingInstallEvents.
http://groups-beta.google.com/group...edded&q=CMP_WaitNoPendingInstallEvents&qt_g=1

In Minlogon, since there is probably much less components in your image,
things may happen quicker so you don't see the issue.

KM
Here's some more information after playing around with it a bit:

Forcing a reboot does NOT cause the commands to work. I added a reboot at
FBA phase 65529 and problem still exists for the first five or so seconds
after that reboot. It would appears that the problem is related to
something that doesn't happen until the first time Windows starts (i.e.,
always after the last reboot). Does this make sense? The problem occurs
during FBA but it's also immediately before Windows runs the shell for the
first time.

The commands that fail never get far enough to show up in setupapi.log.

The problem does not exist with MinLogon, so it's related to Windows Logon
or one of it's dependencies.

Any more ideas?

- Travis
Travis,

What I see from the parts of the logs you posted is that your commands
failed because some components were not yet installed or were in the
installation phase.

What you may want to try is the following:

- Instead of the Pause command, have am empty command (or just a
launch of cmd.exe) with Reboot flag set to True.
Then your next command (wdreg install, for instance) will be
launched after the reboot.
If it runs fine - your install definitely depends on some other
component installations.

- Seems like the failed commands were hardware driver installations
related, right? Therefore you can analyze why the installs failed if you
look in to \Windows\SetupApi.log file.

KM

Some time ago I started with a MinLogon based image and created several
components that included FBA Generic Commands to perform installations.
Everything worked fine. Recently it became necessary to migrate to a
Windows Logon based image and my FBA Generic Commands were now failing.
So I started adjusting phases and found that if my moved my commands to
the very end of FBA they started working... sometimes. Finally I came to
find that the commands only work if they are run after some delay after
the reboot following EWF configuration (note that EWF is not protecting
the Windows drive, so it should be unrelated). So now I have an FBA
Generic Command to run 'cmd.exe /C pause' at phase 65529 so that all my
FBA Generic Commands that I put at phase 65530 can run successfully. If
I take away the pause, then any commands scheduled at phase 65530 fail if
they run in the first few seconds after FBA starts running again. See
the FBALOG.TXT snipits below:

Without pause:
21:48:43 PM - [CallEntryPointThread] C:\WINDOWS\SYSTEM32\ewfdll.dll,
ConfigureEwf
21:48:43 PM - [FBASetProgressText] Resetting Setup Flag...
21:48:43 PM - [FBADoReboot] Sleeping...
21:48:53 PM - [FBADoReboot] Rebooting system...
21:49:25 PM - [FBASetProgressText] Installing Components...
21:49:26 PM - [FBALaunch] C:\WINDOWS\FBA\oem\wdreg.exe -inf
C:\WINDOWS\inf\windrvr6.inf install (ExitCode: 0x1)

With pause:
11:00:33 AM - [CallEntryPointThread] C:\WINDOWS\SYSTEM32\ewfdll.dll,
ConfigureEwf
11:00:33 AM - [FBASetProgressText] Resetting Setup Flag...
11:01:10 AM - [FBADoReboot] Sleeping...
11:01:20 AM - [FBADoReboot] Rebooting system...
11:01:52 AM - [FBASetProgressText] Installing Components...
11:01:58 AM - [FBALaunch] C:\WINDOWS\SYSTEM32\cmd.exe /C pause
(ExitCode: 0x0)
11:02:14 AM - [FBALaunch] C:\WINDOWS\FBA\oem\wdreg.exe -inf
..\..\INF\windrvr6.inf install (ExitCode: 0x0)

It's not just the wdreg.exe call that has a problem. I have FBA Generic
Commands to install printers by calling printui.dll,PrintUIEntry via
rundll32 and these pop-up a message saying "Invalid Arguments" unless I
add the pause. Anybody have any idea what's going on? Anybody else seen
behavior like this?

Thanks in advance,
Travis
 

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