File Sharing - how to set what folders are shared?

R

RussR

Slobodan

Yes the batch script works if I manually execute it. It also works if I set
it as Run instead of RunOnce. It seems to only execute in FBA that too way
before the network is installed, at least according to FBA.log.

I'm going to put a Pause statement to see if it executes anywhere else. I'm
unsure how FBA will respond to this Pause statement.

What I'm probably going to do is use the Run key instead and call my batch
script to do whatever I need to do and then add the end of the batch script,
delete the Run key from the registry. How does that sound? Either that or
I could try FBA generic command with phase 8499 as you suggested.

RussR

Slobodan Brcin said:
Your filter search should reveal "Misc. Command Line Tools".
If not then check your Visibility settings.


One probably stupid question, but I don't know what else could be the
problem:
Have you tried to run your bat file on your XPe image manually from command
line?
Does it work?

Also you can put "pause" in your bat file just to see if (and when) it is
called.


The fastest way (that I know) to deploy is to have direct 1000MBPS network
connection.

Development device with minimum of 1 GB RAM, so you wont need to close TD,
and whole DB should be cached in memory.
Target device:
1. Dual boot
2. One OS capable of sharing root of some partition.
The faster device the better.

TD output for build should be set directly on network share of target
device.

So build and deploy is very fast, and you don't need to close your
development machine.
You can continue to work, while FBA is in progress. Little human
multitasking ;)

Regards,
Slobodan

RussR said:
Call time of all three Run types is documented and it is not very
useful
for
your case.
If you look at the MSDN docs, it says:
[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). ]

Just for the record, I had already read the docs on the RunOnce resource and
had posted specifically because my RunOnce Request seems to be executing in
FBA (though before FBA does network setup), but didn't seem to be executing
after logon as the Run key as it says above it should. So basically even
though it fails to execute at the right time in FBA, it should run after
first logon and thus set the shares, this doesn't happen. Why?

Run might do the trick, but the cost is too great?
It's worth a shot to see if it works I guess

Use and learn to use Filter option in TD to search for components that
contain specific files.
Also you can copy manually reg.exe it has very low dependencies (almost
none).
Come on man, you think I got this far w/o knowing how to use the Filter
option? I did search through it as well as the NG here, but there only seem
to be components for REGEDIT/registry editor. That's a bit bigger than the
simple REG.EXE command which is why I asked if you knew of a component
speficically for REG.EXE. I will try adding the REG.EXE as an extra file.
BTW:
The best way is to have fast target computer for testing hardware unrelated
XPe configurations. This will allow you to build and deploy, and complete
FBA in less than 15 minutes.
So you can experiment with elementary settings and see how they behave.
It is much faster and more accurate to try it yourself, then to ask simple
questions.
I am not even using my target device yet, I'm using my development machine
and building and deploying images to an extra disk within my system and then
booting into that disk to load XPe. I wouldn't call this method fast, the
whole process of building the image, running fba and boot for the first time
is rather time consuming in general, but I don't think that there's a method
faster than this.

I really do appreciate your help Slobodan, but please don't assume that I'm
not searching the documentation and all to find answers even if seems that
way.

RussR




Slobodan Brcin said:
Come on read the manual,at least these things are documented.

Build order is irrelevant in most cases when some sort of installation or
PnP is involved that modifies registry.

Call time of all three Run types is documented and it is not very
useful
for
your case.

Run might do the trick, but the cost is too great?

Use and learn to use Filter option in TD to search for components that
contain specific files.
Also you can copy manually reg.exe it has very low dependencies (almost
none).

BTW:
The best way is to have fast target computer for testing hardware unrelated
XPe configurations. This will allow you to build and deploy, and complete
FBA in less than 15 minutes.
So you can experiment with elementary settings and see how they behave.
It is much faster and more accurate to try it yourself, then to ask simple
questions.

Regards,
Slobodan


Slobodan,

Does setting the build order on RunOnce have any effect on when it is
called
during FBA?

I was thinking if RunOnce doesn't do the trick, maybe Run will right?

Also, what components do I need to include to have the reg.exe command?

Thanks,
RussR

Russell,

You have very little (no) control over phase when RunOnce call
will
be
made.

FBA Generic Command in the other hand can be called at exact phase you
set.
You can make it to be called between before or after some other
components.

Is it the cleanest way?
Who knows, there always may be better way of doing some specific things.
If
you want to spend hours trying to figure it out.
You could event find the component that registers some dll that changes
this
registry value, and you could find some way to modify this
behavior,
but
in
this case that would be pure waste of time.

Regards,
Slobodan


Slobodan, the info about phase 8499 being last phase before
reboot
is
very
useful.
What is the advantage of doing it with FBA Generic Command as opposed
to
a
RunOnce request in the Extra Resources section?

Currently, I've created a bat file with all the things I need to get
done
(setting which folders get shared, etc) and I have put it in the
RunOnce
request under extra resources, however looking at fbalog.txt, it seems
to
get executed before the network is setup so my shares never get set.
I
thought of setting it as Run instead of RunOnce, but that is ugly.

Would setting it with FBA Generic Command with phase 8499, be the
cleanest
way of doing it?

Thanks,
Russr


Open Resources category:
And create FBA generic command that will call reg.exe with
appropriate
parameters at phase 8499 (last phase before first reboot).

You don't need to change build order since it has less significance
than
phase number.

Regards,
Slobodan

Slobodan, thanks for the responses!!! I put those registry keys
in
Extra
Settings like John suggested and as I said in my last post, it
seems
like
they get overwritten by something else in FBA. Build order
doesn't
seem
to
make a difference.

You suggested:
You can always call reg.exe at some higher FBA phase to change
registry
entries, not peaty but it is working.
How do I call reg.exe at some higher phase ensuring that other
stuff
doesn't
overwrite the keys I'm setting? The key question being
calling
it
at
the
higher phase.

Thanks

Build order won't help you if something during FBA changes value
in
registry
during the some higher phase.
I don't have these registry keys in my XPe build so I
can't
find
component
that is overwriting your settings.

You can always call reg.exe at some higher FBA phase to change
registry
entries, not peaty but it is working.

Regards,
Slobodan


I ended up putting this registry hack in the Extra Registry
Settings
section
and I put a build order of 1001, but it didn't do that trick.
What
build
order do you think I need to get this to not get overwritten?

Thanks

RussR,

There is a policy restriction that you have to relieve in
order
for
this
to
work correctly. If you look on a XP Pro machine under
Computer
Configuration - Windows Settings - Security Settings - Local
Policies -
Security Options and look at the properties of the policy
for
"Accounts:
Limit local account use of blank passwords to console logon
only"
that
you
can see the by default this policy is enabled.

The reg hack for this is at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
-> limitblankpassworduse="0" to disable it.

If you disable this, I'm pretty sure that you can get access
to
the
box
without going through the password ordeal.

I'm not in front of TD right now so I can't be certain where
this
is
in
the
existing components, but if you can't find it you may be
able
to
hard
code
it in to Extra Registry Settings and turn up the build order
pretty
late
so
that it overwrites the default setting.

John Vorchak [eMVP]

thanks what you said to do worked as when my target device
was
finally
up
and running with XPE, I was able to see it on the network.
When
I
logged
onto the target device it self it shows that the
folders
I
set
to
share
with
my batch script, did indeed get shared.

There's just one problem though: when I go to access my
XPE
machine
through
"My Network Places" from another machine on the network,
it
won't
let
me
access the files and other shared stuff that resides on
the
XPE
machine.
It
says because of a user restriction. I think this is
because
there
is
only
the default Adminstrator account and no password is set.
I
do
not
want
to
set a password as the target device is headless. Is there
any
way
to
get
past this so that my files are visible to others on the
network
w/o
entering
password and all this junk?

Thanks



message
RussR,

Probably the easiest way is to add the script in the
Extra
Files
in
TD,
then
add a new RunOnce Request (under Extra Resources)
pointing
to
the
script.

The command will execute twice during FBA - which may
fail
but
should
be
able to be ignored with no problem, and then one last
time
after
FBA
has
completed and the image is booted for the first
time
and
that
should
work
with no problem.

You will need the Net.exe Utility component in your
build.

John Vorchak [eMVP]

I do know how to use the net share command from the
command
prompt
and
putting it into a .bat file would be trivial.
However,
I
do
not
know
how
to
set this to run as a post FBA script especially
ensuring
that
it
runs
after
the network and workgroup and all of that is taken
care
of.

If you could enlighten me, I would appreciate it.

RussR


"John A. Vorchak [eMVP]" <[email protected]>
wrote
in
message
RussR,

Probably the easiest way to do it might be to
run
a
post-FBA
script
that
utilizes the net share command in a batch script.

John Vorchak [eMVP]

On my XPe image, I have installed all the
components
to
enable
File
and
Printer Sharing and Client for Microsoft Networks.
However
to
share
a
folder or drive or other resources, I have to
manually
set
the
sharing
preferences for them after FBA runs and my image
is
usable.

The problem with this is that eventually my target
device
will
be
headless
so I want to be able to pre-set what folders and
files
will
get
shared
upon
first boot thus requring no user
intervention.
It
would
also
be
nice
when
deploying images to pre-set the shared resources
either
in
TD
or
some
automated script during first boot.

I have searched through the newsgroups, but have
not
found
any
help
on
this
matter. The same goes with the MSDN stuff.

Is there a way to do this?

Thanks,
RussR
 
K

KM

RussR,

Not really sure how you implemented the filter but reg.exe belongs to [Misc.
Command Line Tools] component (under Software : System : System Services :
Base). The component visibility is 1000.

Also, why do you think your RunOnce request does not get executed at the
right time in FBA? It might happen that some components in your image that
overwrite your setting you set from the batch file are getting installed
during latter FBA phase than runonce processing. As Slobodan pointed
properly, you have very little control over RunOnce request execution phase.
That is why you better use "FBA Generic Command" to run your batch file.

KM
Call time of all three Run types is documented and it is not very useful for
your case.
If you look at the MSDN docs, it says:
[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). ]

Just for the record, I had already read the docs on the RunOnce resource and
had posted specifically because my RunOnce Request seems to be executing in
FBA (though before FBA does network setup), but didn't seem to be executing
after logon as the Run key as it says above it should. So basically even
though it fails to execute at the right time in FBA, it should run after
first logon and thus set the shares, this doesn't happen. Why?

Run might do the trick, but the cost is too great?
It's worth a shot to see if it works I guess

Use and learn to use Filter option in TD to search for components that
contain specific files.
Also you can copy manually reg.exe it has very low dependencies (almost
none).
Come on man, you think I got this far w/o knowing how to use the Filter
option? I did search through it as well as the NG here, but there only seem
to be components for REGEDIT/registry editor. That's a bit bigger than the
simple REG.EXE command which is why I asked if you knew of a component
speficically for REG.EXE. I will try adding the REG.EXE as an extra file.
BTW:
The best way is to have fast target computer for testing hardware unrelated
XPe configurations. This will allow you to build and deploy, and complete
FBA in less than 15 minutes.
So you can experiment with elementary settings and see how they behave.
It is much faster and more accurate to try it yourself, then to ask simple
questions.
I am not even using my target device yet, I'm using my development machine
and building and deploying images to an extra disk within my system and then
booting into that disk to load XPe. I wouldn't call this method fast, the
whole process of building the image, running fba and boot for the first time
is rather time consuming in general, but I don't think that there's a method
faster than this.

I really do appreciate your help Slobodan, but please don't assume that I'm
not searching the documentation and all to find answers even if seems that
way.

RussR




Slobodan Brcin said:
Come on read the manual,at least these things are documented.

Build order is irrelevant in most cases when some sort of installation or
PnP is involved that modifies registry.

Call time of all three Run types is documented and it is not very useful for
your case.

Run might do the trick, but the cost is too great?

Use and learn to use Filter option in TD to search for components that
contain specific files.
Also you can copy manually reg.exe it has very low dependencies (almost
none).

BTW:
The best way is to have fast target computer for testing hardware unrelated
XPe configurations. This will allow you to build and deploy, and complete
FBA in less than 15 minutes.
So you can experiment with elementary settings and see how they behave.
It is much faster and more accurate to try it yourself, then to ask simple
questions.

Regards,
Slobodan


opposed set.
I keys
in
calling
it
at
the
higher phase.

Thanks

Build order won't help you if something during FBA changes value
in
registry
during the some higher phase.
I don't have these registry keys in my XPe build so I can't find
component
that is overwriting your settings.

You can always call reg.exe at some higher FBA phase to change
registry
entries, not peaty but it is working.

Regards,
Slobodan


I ended up putting this registry hack in the Extra Registry
Settings
section
and I put a build order of 1001, but it didn't do that trick.
What
build
order do ou think I need to get this to not get overwritten?

Thanks

RussR,

There is a policy restriction that you have to relieve in
order
for
this
to
work correctly. If you look on a XP Pro machine under
Computer
Configuration - Windows Settings - Security Settings - Local
Policies -
Security Options and look at the properties of the
policy
for
"Accounts:
Limit local account use of blank passwords to console logon
only"
that
you
can see the by default this policy is enabled.

The reg hack for this is at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
-> limitblankpassworduse="0" to disable it.

If you disable this, I'm pretty sure that you can get access
to
the
box
without going through the password ordeal.

I'm not in front of TD right now so I can't be certain where
this
is
in
the
existing components, but if you can't find it you may be able
to
hard
code
it in to Extra Registry Settings and turn up the build order
pretty
late
so
that it overwrites the default setting.

John Vorchak [eMVP]

thanks what you said to do worked as when my target device
was
finally
up
and running with XPE, I was able to see it on the network.
When
I
logged
onto the target device it self it shows that the
folders
I
set
to
share
with
my batch script, did indeed get shared.

There's just one problem though: when I go to access
my
XPE
machine
through
"My Network Places" from another machine on the
network,
it
won't
let
me
access the files and other shared stuff that resides
on
the
XPE
machine.
It
says because of a user restriction. I think this is because
there
is
only
the default Adminstrator account and no password is
set.
I
do
not
want
to
set a password as the target device is headless. Is there
any
way
to
get
past this so that my files are visible to others on the
network
w/o
entering
password and all this junk?

Thanks



message
RussR,

Probably the easiest way is to add the script in the Extra
Files
in
TD,
then
add a new RunOnce Request (under Extra Resources) pointing
to
the
script.

The command will execute twice during FBA - which
may
fail
but
should
be
able to be ignored with no problem, and then one
last
time
after
FBA
has
completed and the image is booted for the first time and
that
should
work
with no problem.

You will need the Net.exe Utility component in your build.

John Vorchak [eMVP]

I do know how to use the net share command from the
command
prompt
and
putting it into a .bat file would be trivial. However,
I
do
not
know
how
to
set this to run as a post FBA script especially ensuring
that
it
runs
after
the network and workgroup and all of that is taken care
of.

If you could enlighten me, I would appreciate it.

RussR


message
RussR,

Probably the easiest way to do it might be to
run
a
post-FBA
script
that
utilizes the net share command in a batch script.

John Vorchak [eMVP]

On my XPe image, I have installed all the components
to
enable
File
and
Printer Sharing and Client for Microsoft Networks.
However
to
share
a
folder or drive or other resources, I have to
manually
set
the
sharing
preferences for them after FBA runs and my
image
is
usable.

The problem with this is that eventually my target
device
will
be
headless
so I want to be able to pre-set what folders and
files
will
get
shared
upon
first boot thus requring no user intervention. It
would
also
be
nice
when
deploying images to pre-set the shared resources
either
in
TD
or
some
automated script during first boot.

I have searched through the newsgroups, but
have
not
found
any
help
on
this
matter. The same goes with the MSDN stuff.

Is there a way to do this?

Thanks,
RussR
 
R

RussR

Slobodan,

I put in the pause statement in my batch script so as to
watch and see when my RunOnce batch script gets
executed. Results are interesting...

Batch script only executes in FBA near the end of PnP
device detection. The screen came asking me to press any
key and I could see why my shares never get set, because
at that point, the net share is not a valid service it says.

Here's a few lines from FBA.log
FBALaunch] rundll32.exe streamci,StreamingDeviceSetup
{96E080C7-143C-11D1-B40F-00A0C9223196},{3C0D501A-
140B-11D1-B40F-00A0C9223196},{3C0D501A-140B-11D1-
B40F-00A0C9223196} (ExitCode: 0x0)
16:00:05 PM - [FBALaunch] rundll32.exe
hid.dll,HidservInstaller /install (ExitCode: 0x0)
16:01:38 PM - [FBALaunch] "D:\windows\setshares.bat"
(ExitCode: 0x0)
16:01:38 PM - [FBALaunch] RUNDLL32.EXE
D:\WINDOWS\System32
\NVMCTRAY.DLL,NvMCRegisterApp
D:\WINDOWS\System32\NvCpl.dll (ExitCode: 0x0)
16:01:42 PM - [FBAAddDevInstanceId] SW\{EEC12DB6-
AD9C-4168-8658-B03DAEF417FE}\{ABD61E00-9350-47E2-
A632-4438B90C6641}

You would think that RunOnce items would be processed
right before FBA reboots, but it is way before that. Also, the
script was never called again, so the documentation is
incorrect when it says it is also processed as a RUN key
before first logon.

I'm going to try FBA generic command with phase 8499 now.

-----Original Message-----
Your filter search should reveal "Misc. Command Line Tools".
If not then check your Visibility settings.


One probably stupid question, but I don't know what else could be the
problem:
Have you tried to run your bat file on your XPe image manually from command
line?
Does it work?

Also you can put "pause" in your bat file just to see if (and when) it is
called.


The fastest way (that I know) to deploy is to have direct 1000MBPS network
connection.

Development device with minimum of 1 GB RAM, so you wont need to close TD,
and whole DB should be cached in memory.
Target device:
1. Dual boot
2. One OS capable of sharing root of some partition.
The faster device the better.

TD output for build should be set directly on network share of target
device.

So build and deploy is very fast, and you don't need to close your
development machine.
You can continue to work, while FBA is in progress. Little human
multitasking ;)

Regards,
Slobodan

RussR said:
Call time of all three Run types is documented and it
is not very useful
for
your case.
If you look at the MSDN docs, it says:
[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). ]

Just for the record, I had already read the docs on the
RunOnce resource
and
had posted specifically because my RunOnce Request
seems to be executing
in
FBA (though before FBA does network setup), but didn't
seem to be
executing
after logon as the Run key as it says above it should. So basically even
though it fails to execute at the right time in FBA, it should run after
first logon and thus set the shares, this doesn't happen. Why?


It's worth a shot to see if it works I guess


Come on man, you think I got this far w/o knowing how to use the Filter
option? I did search through it as well as the NG here,
but there only
seem
to be components for REGEDIT/registry editor. That's a bit bigger than the
simple REG.EXE command which is why I asked if you knew of a component
speficically for REG.EXE. I will try adding the REG.EXE as an extra file.
testing hardware
unrelated
deploy, and
complete then to ask
simple
I am not even using my target device yet, I'm using my development machine
and building and deploying images to an extra disk
within my system and
then
booting into that disk to load XPe. I wouldn't call this method fast, the
whole process of building the image, running fba and
boot for the first
time
is rather time consuming in general, but I don't think that
there's a
method
faster than this.

I really do appreciate your help Slobodan, but please
don't assume that
I'm
not searching the documentation and all to find answers even if seems that
way.

RussR
of installation
or
is not very useful
for testing hardware
unrelated
deploy, and
complete then to ask
simple the reg.exe
command? RunOnce call will
be called at exact phase
you
doing some specific
things. some dll that
changes modify this behavior,
but phase before reboot
is Generic Command as
opposed
things I need to
get
at fbalog.txt, it
seems
shares never get
set.
has less
significance
those registry
keys higher FBA phase to
change question being
calling
it during FBA changes
value build so I can't
find
higher FBA phase to
change the Extra
Registry
Settings
section
and I put a build order of 1001, but it
didn't do that
trick.
What
build
order do you think I need to get this to
not get
overwritten?
Thanks

"John A. Vorchak [eMVP]"
have to relieve
in
Security Settings -
Local
properties of the
policy
passwords to console
logon
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contr
ol\Lsa
-> limitblankpassworduse="0" to disable it.

If you disable this, I'm pretty sure that
you can get
access
to
the
box
without going through the password ordeal.

I'm not in front of TD right now so I
can't be certain
where
this
is
in
the
existing components, but if you can't find it you may be
able
to
hard
code
it in to Extra Registry Settings and
turn up the build
order
pretty
late
so
that it overwrites the default setting.

John Vorchak [eMVP]

thanks what you said to do worked
as when my target
device
was
finally
up
and running with XPE, I was able to
see it on the
network.
When
I
logged
onto the target device it self it
shows that the
folders
when I go to access
my machine on the
network, stuff that resides
on and no password is
set.
is headless. Is
there
to others on
the
network
w/o
entering
password and all this junk?

Thanks



"John A. Vorchak [eMVP]"
message
news:% (e-mail address removed)...
RussR,

Probably the easiest way is to add the script in the
Extra
Files
in
TD,
then
add a new RunOnce Request (under Extra Resources)
pointing
to
the
script.

The command will execute twice
during FBA - which
may problem, and then one
last
time
after
FBA
has
completed and the image is
booted for the first time
and
that
should
work
with no problem.

You will need the Net.exe Utility component in your
build.

John Vorchak [eMVP]

"RussR"
I do know how to use the net
share command from
the
command
prompt
and
putting it into a .bat file would be trivial.
However,
I
do
not
know
how
to
set this to run as a post FBA script especially
ensuring
that
it
runs
after
the network and workgroup and all of that is taken
care
of.

If you could enlighten me, I would appreciate it.

RussR


"John A. Vorchak [eMVP]"
do it might be to
run
command in a batch
script.
John Vorchak [eMVP]

"RussR"
On my XPe image, I have installed all the
components
to
enable
File
and
Printer Sharing and Client
for Microsoft
Networks.
However
to
share
a
folder or drive or other resources, I have to
manually
set
the
sharing
preferences for them after
FBA runs and my
image
that eventually my
target
set what folders
and
user intervention.
It
the shared
resources newsgroups, but
have

.
 
R

RussR

KM, thanks for the tip about Misc Command Line Tools, Slobodan told me that
REG.EXE is in it.

Anyway, if you read some of my more recent posts in response to Slobodan,
I've basically created a very simple program to run in RunOnce. It
basically is the Pause command that displays "Press any key to continue" on
the console. This way I can keep track of when it is running. I've found
that it runs near the end of PnP detection and it never runs again, not even
when explorer intializes the desktop like it says in documentation about
RunOnce.

Since the only time it gets called is during PnP detection in FBA, I am
unable to set my shared network folders because FBA has not set up the
network service yet.

I would think that RunOnce would be processed at the end of FBA right before
it reboots and also when Explorer shell runs for the first time. This is
not the case. Is it a bug?

I took Slobodan's advice and used the FBA Generic Command with phase of
8499.

RussR


KM said:
RussR,

Not really sure how you implemented the filter but reg.exe belongs to [Misc.
Command Line Tools] component (under Software : System : System Services :
Base). The component visibility is 1000.

Also, why do you think your RunOnce request does not get executed at the
right time in FBA? It might happen that some components in your image that
overwrite your setting you set from the batch file are getting installed
during latter FBA phase than runonce processing. As Slobodan pointed
properly, you have very little control over RunOnce request execution phase.
That is why you better use "FBA Generic Command" to run your batch file.

KM
Call time of all three Run types is documented and it is not very
useful
for
your case.
If you look at the MSDN docs, it says:
[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). ]

Just for the record, I had already read the docs on the RunOnce resource and
had posted specifically because my RunOnce Request seems to be executing in
FBA (though before FBA does network setup), but didn't seem to be executing
after logon as the Run key as it says above it should. So basically even
though it fails to execute at the right time in FBA, it should run after
first logon and thus set the shares, this doesn't happen. Why?

Run might do the trick, but the cost is too great?
It's worth a shot to see if it works I guess

Use and learn to use Filter option in TD to search for components that
contain specific files.
Also you can copy manually reg.exe it has very low dependencies (almost
none).
Come on man, you think I got this far w/o knowing how to use the Filter
option? I did search through it as well as the NG here, but there only seem
to be components for REGEDIT/registry editor. That's a bit bigger than the
simple REG.EXE command which is why I asked if you knew of a component
speficically for REG.EXE. I will try adding the REG.EXE as an extra file.
BTW:
The best way is to have fast target computer for testing hardware unrelated
XPe configurations. This will allow you to build and deploy, and complete
FBA in less than 15 minutes.
So you can experiment with elementary settings and see how they behave.
It is much faster and more accurate to try it yourself, then to ask simple
questions.
I am not even using my target device yet, I'm using my development machine
and building and deploying images to an extra disk within my system and then
booting into that disk to load XPe. I wouldn't call this method fast, the
whole process of building the image, running fba and boot for the first time
is rather time consuming in general, but I don't think that there's a method
faster than this.

I really do appreciate your help Slobodan, but please don't assume that I'm
not searching the documentation and all to find answers even if seems that
way.

RussR




Slobodan Brcin said:
Come on read the manual,at least these things are documented.

Build order is irrelevant in most cases when some sort of installation or
PnP is involved that modifies registry.

Call time of all three Run types is documented and it is not very
useful
for
your case.

Run might do the trick, but the cost is too great?

Use and learn to use Filter option in TD to search for components that
contain specific files.
Also you can copy manually reg.exe it has very low dependencies (almost
none).

BTW:
The best way is to have fast target computer for testing hardware unrelated
XPe configurations. This will allow you to build and deploy, and complete
FBA in less than 15 minutes.
So you can experiment with elementary settings and see how they behave.
It is much faster and more accurate to try it yourself, then to ask simple
questions.

Regards,
Slobodan


Slobodan,

Does setting the build order on RunOnce have any effect on when it is
called
during FBA?

I was thinking if RunOnce doesn't do the trick, maybe Run will right?

Also, what components do I need to include to have the reg.exe command?

Thanks,
RussR

Russell,

You have very little (no) control over phase when RunOnce call
will
be
made.

FBA Generic Command in the other hand can be called at exact phase you
set.
You can make it to be called between before or after some other
components.

Is it the cleanest way?
Who knows, there always may be better way of doing some specific things.
If
you want to spend hours trying to figure it out.
You could event find the component that registers some dll that changes
this
registry value, and you could find some way to modify this
behavior,
but
in
this case that would be pure waste of time.

Regards,
Slobodan


Slobodan, the info about phase 8499 being last phase before
reboot
is
very
useful.
What is the advantage of doing it with FBA Generic Command as opposed
to
a
RunOnce request in the Extra Resources section?

Currently, I've created a bat file with all the things I need to get
done
(setting which folders get shared, etc) and I have put it in the
RunOnce
request under extra resources, however looking at fbalog.txt, it seems
to
get executed before the network is setup so my shares never get set.
I
thought of setting it as Run instead of RunOnce, but that is ugly.

Would setting it with FBA Generic Command with phase 8499, be the
cleanest
way of doing it?

Thanks,
Russr


Open Resources category:
And create FBA generic command that will call reg.exe with
appropriate
parameters at phase 8499 (last phase before first reboot).

You don't need to change build order since it has less significance
than
phase number.

Regards,
Slobodan

Slobodan, thanks for the responses!!! I put those registry keys
in
Extra
Settings like John suggested and as I said in my last post, it
seems
like
they get overwritten by something else in FBA. Build order
doesn't
seem
to
make a difference.

You suggested:
You can always call reg.exe at some higher FBA phase to change
registry
entries, not peaty but it is working.
How do I call reg.exe at some higher phase ensuring that other
stuff
doesn't
overwrite the keys I'm setting? The key question being
calling
it
at
the
higher phase.

Thanks

Build order won't help you if something during FBA changes value
in
registry
during the some higher phase.
I don't have these registry keys in my XPe build so I
can't
find
component
that is overwriting your settings.

You can always call reg.exe at some higher FBA phase to change
registry
entries, not peaty but it is working.

Regards,
Slobodan


I ended up putting this registry hack in the Extra Registry
Settings
section
and I put a build order of 1001, but it didn't do that trick.
What
build
order do you think I need to get this to not get overwritten?

Thanks

RussR,

There is a policy restriction that you have to relieve in
order
for
this
to
work correctly. If you look on a XP Pro machine under
Computer
Configuration - Windows Settings - Security Settings - Local
Policies -
Security Options and look at the properties of the policy
for
"Accounts:
Limit local account use of blank passwords to console logon
only"
that
you
can see the by default this policy is enabled.

The reg hack for this is at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
-> limitblankpassworduse="0" to disable it.

If you disable this, I'm pretty sure that you can get access
to
the
box
without going through the password ordeal.

I'm not in front of TD right now so I can't be certain where
this
is
in
the
existing components, but if you can't find it you may be
able
to
hard
code
it in to Extra Registry Settings and turn up the build order
pretty
late
so
that it overwrites the default setting.

John Vorchak [eMVP]

thanks what you said to do worked as when my target device
was
finally
up
and running with XPE, I was able to see it on the network.
When
I
logged
onto the target device it self it shows that the
folders
I
set
to
share
with
my batch script, did indeed get shared.

There's just one problem though: when I go to access my
XPE
machine
through
"My Network Places" from another machine on the network,
it
won't
let
me
access the files and other shared stuff that resides on
the
XPE
machine.
It
says because of a user restriction. I think this is
because
there
is
only
the default Adminstrator account and no password is set.
I
do
not
want
to
set a password as the target device is headless. Is there
any
way
to
get
past this so that my files are visible to others on the
network
w/o
entering
password and all this junk?

Thanks



message
RussR,

Probably the easiest way is to add the script in the
Extra
Files
in
TD,
then
add a new RunOnce Request (under Extra Resources)
pointing
to
the
script.

The command will execute twice during FBA - which may
fail
but
should
be
able to be ignored with no problem, and then one last
time
after
FBA
has
completed and the image is booted for the first
time
and
that
should
work
with no problem.

You will need the Net.exe Utility component in your
build.

John Vorchak [eMVP]

I do know how to use the net share command from the
command
prompt
and
putting it into a .bat file would be trivial.
However,
I
do
not
know
how
to
set this to run as a post FBA script especially
ensuring
that
it
runs
after
the network and workgroup and all of that is taken
care
of.

If you could enlighten me, I would appreciate it.

RussR


"John A. Vorchak [eMVP]" <[email protected]>
wrote
in
message
RussR,

Probably the easiest way to do it might be to
run
a
post-FBA
script
that
utilizes the net share command in a batch script.

John Vorchak [eMVP]

On my XPe image, I have installed all the
components
to
enable
File
and
Printer Sharing and Client for Microsoft Networks.
However
to
share
a
folder or drive or other resources, I have to
manually
set
the
sharing
preferences for them after FBA runs and my image
is
usable.

The problem with this is that eventually my target
device
will
be
headless
so I want to be able to pre-set what folders and
files
will
get
shared
upon
first boot thus requring no user
intervention.
It
would
also
be
nice
when
deploying images to pre-set the shared resources
either
in
TD
or
some
automated script during first boot.

I have searched through the newsgroups, but have
not
found
any
help
on
this
matter. The same goes with the MSDN stuff.

Is there a way to do this?

Thanks,
RussR
 
R

RussR

Slobodan,

I also put in the FBA Generic Command with phase 8499 to run a batch
script. It did very well to execute right before reboot, but here's what it
said in FBALOG.txt

17:07:39 PM - [FBACallEntryPoint] LoadLibrary(D:\WINDOWS\setshares2.bat)
(Error: 0xc1)

Are you allowed to just put filepath as %10%\setshares.bat or should I put
%11%\cmd.exe and /c d:\windows\setshares2.bat as command?

Thanks

Slobodan Brcin said:
Your filter search should reveal "Misc. Command Line Tools".
If not then check your Visibility settings.


One probably stupid question, but I don't know what else could be the
problem:
Have you tried to run your bat file on your XPe image manually from command
line?
Does it work?

Also you can put "pause" in your bat file just to see if (and when) it is
called.


The fastest way (that I know) to deploy is to have direct 1000MBPS network
connection.

Development device with minimum of 1 GB RAM, so you wont need to close TD,
and whole DB should be cached in memory.
Target device:
1. Dual boot
2. One OS capable of sharing root of some partition.
The faster device the better.

TD output for build should be set directly on network share of target
device.

So build and deploy is very fast, and you don't need to close your
development machine.
You can continue to work, while FBA is in progress. Little human
multitasking ;)

Regards,
Slobodan

RussR said:
Call time of all three Run types is documented and it is not very
useful
for
your case.
If you look at the MSDN docs, it says:
[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). ]

Just for the record, I had already read the docs on the RunOnce resource and
had posted specifically because my RunOnce Request seems to be executing in
FBA (though before FBA does network setup), but didn't seem to be executing
after logon as the Run key as it says above it should. So basically even
though it fails to execute at the right time in FBA, it should run after
first logon and thus set the shares, this doesn't happen. Why?

Run might do the trick, but the cost is too great?
It's worth a shot to see if it works I guess

Use and learn to use Filter option in TD to search for components that
contain specific files.
Also you can copy manually reg.exe it has very low dependencies (almost
none).
Come on man, you think I got this far w/o knowing how to use the Filter
option? I did search through it as well as the NG here, but there only seem
to be components for REGEDIT/registry editor. That's a bit bigger than the
simple REG.EXE command which is why I asked if you knew of a component
speficically for REG.EXE. I will try adding the REG.EXE as an extra file.
BTW:
The best way is to have fast target computer for testing hardware unrelated
XPe configurations. This will allow you to build and deploy, and complete
FBA in less than 15 minutes.
So you can experiment with elementary settings and see how they behave.
It is much faster and more accurate to try it yourself, then to ask simple
questions.
I am not even using my target device yet, I'm using my development machine
and building and deploying images to an extra disk within my system and then
booting into that disk to load XPe. I wouldn't call this method fast, the
whole process of building the image, running fba and boot for the first time
is rather time consuming in general, but I don't think that there's a method
faster than this.

I really do appreciate your help Slobodan, but please don't assume that I'm
not searching the documentation and all to find answers even if seems that
way.

RussR




Slobodan Brcin said:
Come on read the manual,at least these things are documented.

Build order is irrelevant in most cases when some sort of installation or
PnP is involved that modifies registry.

Call time of all three Run types is documented and it is not very
useful
for
your case.

Run might do the trick, but the cost is too great?

Use and learn to use Filter option in TD to search for components that
contain specific files.
Also you can copy manually reg.exe it has very low dependencies (almost
none).

BTW:
The best way is to have fast target computer for testing hardware unrelated
XPe configurations. This will allow you to build and deploy, and complete
FBA in less than 15 minutes.
So you can experiment with elementary settings and see how they behave.
It is much faster and more accurate to try it yourself, then to ask simple
questions.

Regards,
Slobodan


Slobodan,

Does setting the build order on RunOnce have any effect on when it is
called
during FBA?

I was thinking if RunOnce doesn't do the trick, maybe Run will right?

Also, what components do I need to include to have the reg.exe command?

Thanks,
RussR

Russell,

You have very little (no) control over phase when RunOnce call
will
be
made.

FBA Generic Command in the other hand can be called at exact phase you
set.
You can make it to be called between before or after some other
components.

Is it the cleanest way?
Who knows, there always may be better way of doing some specific things.
If
you want to spend hours trying to figure it out.
You could event find the component that registers some dll that changes
this
registry value, and you could find some way to modify this
behavior,
but
in
this case that would be pure waste of time.

Regards,
Slobodan


Slobodan, the info about phase 8499 being last phase before
reboot
is
very
useful.
What is the advantage of doing it with FBA Generic Command as opposed
to
a
RunOnce request in the Extra Resources section?

Currently, I've created a bat file with all the things I need to get
done
(setting which folders get shared, etc) and I have put it in the
RunOnce
request under extra resources, however looking at fbalog.txt, it seems
to
get executed before the network is setup so my shares never get set.
I
thought of setting it as Run instead of RunOnce, but that is ugly.

Would setting it with FBA Generic Command with phase 8499, be the
cleanest
way of doing it?

Thanks,
Russr


Open Resources category:
And create FBA generic command that will call reg.exe with
appropriate
parameters at phase 8499 (last phase before first reboot).

You don't need to change build order since it has less significance
than
phase number.

Regards,
Slobodan

Slobodan, thanks for the responses!!! I put those registry keys
in
Extra
Settings like John suggested and as I said in my last post, it
seems
like
they get overwritten by something else in FBA. Build order
doesn't
seem
to
make a difference.

You suggested:
You can always call reg.exe at some higher FBA phase to change
registry
entries, not peaty but it is working.
How do I call reg.exe at some higher phase ensuring that other
stuff
doesn't
overwrite the keys I'm setting? The key question being
calling
it
at
the
higher phase.

Thanks

Build order won't help you if something during FBA changes value
in
registry
during the some higher phase.
I don't have these registry keys in my XPe build so I
can't
find
component
that is overwriting your settings.

You can always call reg.exe at some higher FBA phase to change
registry
entries, not peaty but it is working.

Regards,
Slobodan


I ended up putting this registry hack in the Extra Registry
Settings
section
and I put a build order of 1001, but it didn't do that trick.
What
build
order do you think I need to get this to not get overwritten?

Thanks

RussR,

There is a policy restriction that you have to relieve in
order
for
this
to
work correctly. If you look on a XP Pro machine under
Computer
Configuration - Windows Settings - Security Settings - Local
Policies -
Security Options and look at the properties of the policy
for
"Accounts:
Limit local account use of blank passwords to console logon
only"
that
you
can see the by default this policy is enabled.

The reg hack for this is at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
-> limitblankpassworduse="0" to disable it.

If you disable this, I'm pretty sure that you can get access
to
the
box
without going through the password ordeal.

I'm not in front of TD right now so I can't be certain where
this
is
in
the
existing components, but if you can't find it you may be
able
to
hard
code
it in to Extra Registry Settings and turn up the build order
pretty
late
so
that it overwrites the default setting.

John Vorchak [eMVP]

thanks what you said to do worked as when my target device
was
finally
up
and running with XPE, I was able to see it on the network.
When
I
logged
onto the target device it self it shows that the
folders
I
set
to
share
with
my batch script, did indeed get shared.

There's just one problem though: when I go to access my
XPE
machine
through
"My Network Places" from another machine on the network,
it
won't
let
me
access the files and other shared stuff that resides on
the
XPE
machine.
It
says because of a user restriction. I think this is
because
there
is
only
the default Adminstrator account and no password is set.
I
do
not
want
to
set a password as the target device is headless. Is there
any
way
to
get
past this so that my files are visible to others on the
network
w/o
entering
password and all this junk?

Thanks



message
RussR,

Probably the easiest way is to add the script in the
Extra
Files
in
TD,
then
add a new RunOnce Request (under Extra Resources)
pointing
to
the
script.

The command will execute twice during FBA - which may
fail
but
should
be
able to be ignored with no problem, and then one last
time
after
FBA
has
completed and the image is booted for the first
time
and
that
should
work
with no problem.

You will need the Net.exe Utility component in your
build.

John Vorchak [eMVP]

I do know how to use the net share command from the
command
prompt
and
putting it into a .bat file would be trivial.
However,
I
do
not
know
how
to
set this to run as a post FBA script especially
ensuring
that
it
runs
after
the network and workgroup and all of that is taken
care
of.

If you could enlighten me, I would appreciate it.

RussR


"John A. Vorchak [eMVP]" <[email protected]>
wrote
in
message
RussR,

Probably the easiest way to do it might be to
run
a
post-FBA
script
that
utilizes the net share command in a batch script.

John Vorchak [eMVP]

On my XPe image, I have installed all the
components
to
enable
File
and
Printer Sharing and Client for Microsoft Networks.
However
to
share
a
folder or drive or other resources, I have to
manually
set
the
sharing
preferences for them after FBA runs and my image
is
usable.

The problem with this is that eventually my target
device
will
be
headless
so I want to be able to pre-set what folders and
files
will
get
shared
upon
first boot thus requring no user
intervention.
It
would
also
be
nice
when
deploying images to pre-set the shared resources
either
in
TD
or
some
automated script during first boot.

I have searched through the newsgroups, but have
not
found
any
help
on
this
matter. The same goes with the MSDN stuff.

Is there a way to do this?

Thanks,
RussR
 
S

Slobodan Brcin

I don't know if you can use bat directly.

But like you said you can use cmd.exe and in arguments you can put /c
fullfilename

Also try avoiding paths like D:\Windows, etc. This will give you headache at
some point in the future if you decide to switch to C:.

Regards,
Slobodan


RussR said:
Slobodan,

I also put in the FBA Generic Command with phase 8499 to run a batch
script. It did very well to execute right before reboot, but here's what it
said in FBALOG.txt

17:07:39 PM - [FBACallEntryPoint] LoadLibrary(D:\WINDOWS\setshares2.bat)
(Error: 0xc1)

Are you allowed to just put filepath as %10%\setshares.bat or should I put
%11%\cmd.exe and /c d:\windows\setshares2.bat as command?

Thanks

Slobodan Brcin said:
Your filter search should reveal "Misc. Command Line Tools".
If not then check your Visibility settings.


One probably stupid question, but I don't know what else could be the
problem:
Have you tried to run your bat file on your XPe image manually from command
line?
Does it work?

Also you can put "pause" in your bat file just to see if (and when) it is
called.


The fastest way (that I know) to deploy is to have direct 1000MBPS network
connection.

Development device with minimum of 1 GB RAM, so you wont need to close TD,
and whole DB should be cached in memory.
Target device:
1. Dual boot
2. One OS capable of sharing root of some partition.
The faster device the better.

TD output for build should be set directly on network share of target
device.

So build and deploy is very fast, and you don't need to close your
development machine.
You can continue to work, while FBA is in progress. Little human
multitasking ;)

Regards,
Slobodan

RussR said:
Call time of all three Run types is documented and it is not very useful
for
your case.
If you look at the MSDN docs, it says:
[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). ]

Just for the record, I had already read the docs on the RunOnce
resource
and
had posted specifically because my RunOnce Request seems to be
executing
in
FBA (though before FBA does network setup), but didn't seem to be executing
after logon as the Run key as it says above it should. So basically even
though it fails to execute at the right time in FBA, it should run after
first logon and thus set the shares, this doesn't happen. Why?


Run might do the trick, but the cost is too great?
It's worth a shot to see if it works I guess


Use and learn to use Filter option in TD to search for components that
contain specific files.
Also you can copy manually reg.exe it has very low dependencies (almost
none).
Come on man, you think I got this far w/o knowing how to use the Filter
option? I did search through it as well as the NG here, but there only seem
to be components for REGEDIT/registry editor. That's a bit bigger than the
simple REG.EXE command which is why I asked if you knew of a component
speficically for REG.EXE. I will try adding the REG.EXE as an extra file.

BTW:
The best way is to have fast target computer for testing hardware
unrelated
XPe configurations. This will allow you to build and deploy, and complete
FBA in less than 15 minutes.
So you can experiment with elementary settings and see how they behave.
It is much faster and more accurate to try it yourself, then to ask simple
questions.
I am not even using my target device yet, I'm using my development machine
and building and deploying images to an extra disk within my system
and
then
booting into that disk to load XPe. I wouldn't call this method fast, the
whole process of building the image, running fba and boot for the
first
time
is rather time consuming in general, but I don't think that there's a method
faster than this.

I really do appreciate your help Slobodan, but please don't assume
that
I'm
not searching the documentation and all to find answers even if seems that
way.

RussR




Come on read the manual,at least these things are documented.

Build order is irrelevant in most cases when some sort of
installation
or
PnP is involved that modifies registry.

Call time of all three Run types is documented and it is not very useful
for
your case.

Run might do the trick, but the cost is too great?

Use and learn to use Filter option in TD to search for components that
contain specific files.
Also you can copy manually reg.exe it has very low dependencies (almost
none).

BTW:
The best way is to have fast target computer for testing hardware
unrelated
XPe configurations. This will allow you to build and deploy, and complete
FBA in less than 15 minutes.
So you can experiment with elementary settings and see how they behave.
It is much faster and more accurate to try it yourself, then to ask simple
questions.

Regards,
Slobodan


Slobodan,

Does setting the build order on RunOnce have any effect on when it is
called
during FBA?

I was thinking if RunOnce doesn't do the trick, maybe Run will right?

Also, what components do I need to include to have the reg.exe command?

Thanks,
RussR

Russell,

You have very little (no) control over phase when RunOnce call
will
be
made.

FBA Generic Command in the other hand can be called at exact
phase
you
set.
You can make it to be called between before or after some other
components.

Is it the cleanest way?
Who knows, there always may be better way of doing some specific
things.
If
you want to spend hours trying to figure it out.
You could event find the component that registers some dll that
changes
this
registry value, and you could find some way to modify this behavior,
but
in
this case that would be pure waste of time.

Regards,
Slobodan


Slobodan, the info about phase 8499 being last phase before reboot
is
very
useful.
What is the advantage of doing it with FBA Generic Command as
opposed
to
a
RunOnce request in the Extra Resources section?

Currently, I've created a bat file with all the things I need
to
get
done
(setting which folders get shared, etc) and I have put it in the
RunOnce
request under extra resources, however looking at fbalog.txt, it
seems
to
get executed before the network is setup so my shares never
get
set.
I
thought of setting it as Run instead of RunOnce, but that is ugly.

Would setting it with FBA Generic Command with phase 8499, be the
cleanest
way of doing it?

Thanks,
Russr


Open Resources category:
And create FBA generic command that will call reg.exe with
appropriate
parameters at phase 8499 (last phase before first reboot).

You don't need to change build order since it has less
significance
than
phase number.

Regards,
Slobodan

Slobodan, thanks for the responses!!! I put those
registry
keys
in
Extra
Settings like John suggested and as I said in my last
post,
it relieve
in
may
be
able
to
hard
code
it in to Extra Registry Settings and turn up the build
order
pretty
late
so
that it overwrites the default setting.

John Vorchak [eMVP]

thanks what you said to do worked as when my target
device
was
finally
up
and running with XPE, I was able to see it on the
network.
When
I
logged
onto the target device it self it shows that the folders
I
set
to
share
with
my batch script, did indeed get shared.

There's just one problem though: when I go to
access
my
XPE
machine
through
"My Network Places" from another machine on the network,
it
won't
let
me
access the files and other shared stuff that
resides
on
the
XPE
machine.
It
says because of a user restriction. I think this is
because
there
is
only
the default Adminstrator account and no password
is
set.
I
do
not
want
to
set a password as the target device is headless. Is
there
any
way
to
get
past this so that my files are visible to others
on
the
network
w/o
entering
password and all this junk?

Thanks



message
RussR,

Probably the easiest way is to add the script in the
Extra
Files
in
TD,
then
add a new RunOnce Request (under Extra Resources)
pointing
to
the
script.

The command will execute twice during FBA -
which
may
fail
but
should
be
able to be ignored with no problem, and then one last
time
after
FBA
has
completed and the image is booted for the first time
and
that
should
work
with no problem.

You will need the Net.exe Utility component in your
build.

John Vorchak [eMVP]

I do know how to use the net share command
from
the
command
prompt
and
putting it into a .bat file would be trivial.
However,
I
do
not
know
how
to
set this to run as a post FBA script especially
ensuring
that
it
runs
after
the network and workgroup and all of that is taken
care
of.

If you could enlighten me, I would appreciate it.

RussR


in
message
RussR,

Probably the easiest way to do it might be
to
run
a
post-FBA
script
that
utilizes the net share command in a batch script.

John Vorchak [eMVP]

On my XPe image, I have installed all the
components
to
enable
File
and
Printer Sharing and Client for Microsoft
Networks.
However
to
share
a
folder or drive or other resources, I have to
manually
set
the
sharing
preferences for them after FBA runs and my image
is
usable.

The problem with this is that eventually my
target
device
will
be
headless
so I want to be able to pre-set what
folders
and
files
will
get
shared
upon
first boot thus requring no user intervention.
It
would
also
be
nice
when
deploying images to pre-set the shared resources
either
in
TD
or
some
automated script during first boot.

I have searched through the newsgroups,
but
have
not
found
any
help
on
this
matter. The same goes with the MSDN stuff.

Is there a way to do this?

Thanks,
RussR
 
K

KM

RussR,

You will neeed Command Prompt to launch your batch script.

Regarding RunOnce problems... I can't be sure and MS guys should jump in
here but I recall having similar problems with RunOnce requests. They are
pretty much uncontrollable (by an XPe dev) commands and that is why I don't
like to use them.

Thanks,
KM
Slobodan,

I also put in the FBA Generic Command with phase 8499 to run a batch
script. It did very well to execute right before reboot, but here's what it
said in FBALOG.txt

17:07:39 PM - [FBACallEntryPoint] LoadLibrary(D:\WINDOWS\setshares2.bat)
(Error: 0xc1)

Are you allowed to just put filepath as %10%\setshares.bat or should I put
%11%\cmd.exe and /c d:\windows\setshares2.bat as command?

Thanks

Slobodan Brcin said:
Your filter search should reveal "Misc. Command Line Tools".
If not then check your Visibility settings.


One probably stupid question, but I don't know what else could be the
problem:
Have you tried to run your bat file on your XPe image manually from command
line?
Does it work?

Also you can put "pause" in your bat file just to see if (and when) it is
called.


The fastest way (that I know) to deploy is to have direct 1000MBPS network
connection.

Development device with minimum of 1 GB RAM, so you wont need to close TD,
and whole DB should be cached in memory.
Target device:
1. Dual boot
2. One OS capable of sharing root of some partition.
The faster device the better.

TD output for build should be set directly on network share of target
device.

So build and deploy is very fast, and you don't need to close your
development machine.
You can continue to work, while FBA is in progress. Little human
multitasking ;)

Regards,
Slobodan

RussR said:
Call time of all three Run types is documented and it is not very useful
for
your case.
If you look at the MSDN docs, it says:
[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). ]

Just for the record, I had already read the docs on the RunOnce
resource
and
had posted specifically because my RunOnce Request seems to be
executing
in
FBA (though before FBA does network setup), but didn't seem to be executing
after logon as the Run key as it says above it should. So basically even
though it fails to execute at the right time in FBA, it should run after
first logon and thus set the shares, this doesn't happen. Why?


Run might do the trick, but the cost is too great?
It's worth a shot to see if it works I guess


Use and learn to use Filter option in TD to search for components that
contain specific files.
Also you can copy manually reg.exe it has very low dependencies (almost
none).
Come on man, you think I got this far w/o knowing how to use the Filter
option? I did search through it as well as the NG here, but there only seem
to be components for REGEDIT/registry editor. That's a bit bigger than the
simple REG.EXE command which is why I asked if you knew of a component
speficically for REG.EXE. I will try adding the REG.EXE as an extra file.

BTW:
The best way is to have fast target computer for testing hardware
unrelated
XPe configurations. This will allow you to build and deploy, and complete
FBA in less than 15 minutes.
So you can experiment with elementary settings and see how they behave.
It is much faster and more accurate to try it yourself, then to ask simple
questions.
I am not even using my target device yet, I'm using my development machine
and building and deploying images to an extra disk within my system
and
then
booting into that disk to load XPe. I wouldn't call this method fast, the
whole process of building the image, running fba and boot for the
first
time
is rather time consuming in general, but I don't think that there's a method
faster than this.

I really do appreciate your help Slobodan, but please don't assume
that
I'm
not searching the documentation and all to find answers even if seems that
way.

RussR




Come on read the manual,at least these things are documented.

Build order is irrelevant in most cases when some sort of
installation
or
PnP is involved that modifies registry.

Call time of all three Run types is documented and it is not very useful
for
your case.

Run might do the trick, but the cost is too great?

Use and learn to use Filter option in TD to search for components that
contain specific files.
Also you can copy manually reg.exe it has very low dependencies (almost
none).

BTW:
The best way is to have fast target computer for testing hardware
unrelated
XPe configurations. This will allow you to build and deploy, and complete
FBA in less than 15 minutes.
So you can experiment with elementary settings and see how they behave.
It is much faster and more accurate to try it yourself, then to ask simple
questions.

Regards,
Slobodan


Slobodan,

Does setting the build order on RunOnce have any effect on when it is
called
during FBA?

I was thinking if RunOnce doesn't do the trick, maybe Run will right?

Also, what components do I need to include to have the reg.exe command?

Thanks,
RussR

Russell,

You have very little (no) control over phase when RunOnce call
will
be
made.

FBA Generic Command in the other hand can be called at exact
phase
you
set.
You can make it to be called between before or after some other
components.

Is it the cleanest way?
Who knows, there always may be better way of doing some specific
things.
If
you want to spend hours trying to figure it out.
You could event find the component that registers some dll that
changes
this
registry value, and you could find some way to modify this behavior,
but
in
this case that would be pure waste of time.

Regards,
Slobodan


Slobodan, the info about phase 8499 being last phase before reboot
is
very
useful.
What is the advantage of doing it with FBA Generic Command as
opposed
to
a
RunOnce request in the Extra Resources section?

Currently, I've created a bat file with all the things I need
to
get
done
(setting which folders get shared, etc) and I have put it in the
RunOnce
request under extra resources, however looking at fbalog.txt, it
seems
to
get executed before the network is setup so my shares never
get
set.
I
thought of setting it as Run instead of RunOnce, but that is ugly.

Would setting it with FBA Generic Command with phase 8499, be the
cleanest
way of doing it?

Thanks,
Russr


Open Resources category:
And create FBA generic command that will call reg.exe with
appropriate
parameters at phase 8499 (last phase before first reboot).

You don't need to change build order since it has less
significance
than
phase number.

Regards,
Slobodan

Slobodan, thanks for the responses!!! I put those
registry
keys
in
Extra
Settings like John suggested and as I said in my last
post,
it relieve
in
may
be
able
to
hard
code
it in to Extra Registry Settings and turn up the build
order
pretty
late
so
that it overwrites the default setting.

John Vorchak [eMVP]

thanks what you said to do worked as when my target
device
was
finally
up
and running with XPE, I was able to see it on the
network.
When
I
logged
onto the target device it self it shows that the folders
I
set
to
share
with
my batch script, did indeed get shared.

There's just one problem though: when I go to
access
my
XPE
machine
through
"My Network Places" from another machine on the network,
it
won't
let
me
access the files and other shared stuff that
resides
on
the
XPE
machine.
It
says because of a user restriction. I think this is
because
there
is
only
the default Adminstrator account and no password
is
set.
I
do
not
want
to
set a password as the target device is headless. Is
there
any
way
to
get
past this so that my files are visible to others
on
the
network
w/o
entering
password and all this junk?

Thanks



message
RussR,

Probably the easiest way is to add the script in the
Extra
Files
in
TD,
then
add a new RunOnce Request (under Extra Resources)
pointing
to
the
script.

The command will execute twice during FBA -
which
may
fail
but
should
be
able to be ignored with no problem, and then one last
time
after
FBA
has
completed and the image is booted for the first time
and
that
should
work
with no problem.

You will need the Net.exe Utility component in your
build.

John Vorchak [eMVP]

I do know how to use the net share command
from
the
command
prompt
and
putting it into a .bat file would be trivial.
However,
I
do
not
know
how
to
set this to run as a post FBA script especially
ensuring
that
it
runs
after
the network and workgroup and all of that is taken
care
of.

If you could enlighten me, I would appreciate it.

RussR


in
message
RussR,

Probably the easiest way to do it might be
to
run
a
post-FBA
script
that
utilizes the net share command in a batch script.

John Vorchak [eMVP]

On my XPe image, I have installed all the
components
to
enable
File
and
Printer Sharing and Client for Microsoft
Networks.
However
to
share
a
folder or drive or other resources, I have to
manually
set
the
sharing
preferences for them after FBA runs and my image
is
usable.

The problem with this is that eventually my
target
device
will
be
headless
so I want to be able to pre-set what
folders
and
files
will
get
shared
upon
first boot thus requring no user intervention.
It
would
also
be
nice
when
deploying images to pre-set the shared resources
either
in
TD
or
some
automated script during first boot.

I have searched through the newsgroups,
but
have
not
found
any
help
on
this
matter. The same goes with the MSDN stuff.

Is there a way to do this?

Thanks,
RussR
 
R

RussR

Just for the record, I mentioned before that RunOnce was running during FBA
at the end of PnP detection and didn't seem to run after that. I think it
does indeed run the first time Explorer initializes the desktop, but it
executes before many of the services such as the Server service are started
thus fails to work properly.

I am most likely going to use either a Run Key or use the FBA Generic
Command. I will try the FBA with cmd.exe instead of directly running the
..bat script.

Thanks guys,
RussR


KM said:
RussR,

You will neeed Command Prompt to launch your batch script.

Regarding RunOnce problems... I can't be sure and MS guys should jump in
here but I recall having similar problems with RunOnce requests. They are
pretty much uncontrollable (by an XPe dev) commands and that is why I don't
like to use them.

Thanks,
KM
Slobodan,

I also put in the FBA Generic Command with phase 8499 to run a batch
script. It did very well to execute right before reboot, but here's
what
it
said in FBALOG.txt

17:07:39 PM - [FBACallEntryPoint] LoadLibrary(D:\WINDOWS\setshares2.bat)
(Error: 0xc1)

Are you allowed to just put filepath as %10%\setshares.bat or should I put
%11%\cmd.exe and /c d:\windows\setshares2.bat as command?

Thanks

Slobodan Brcin said:
Your filter search should reveal "Misc. Command Line Tools".
If not then check your Visibility settings.


One probably stupid question, but I don't know what else could be the
problem:
Have you tried to run your bat file on your XPe image manually from command
line?
Does it work?

Also you can put "pause" in your bat file just to see if (and when) it is
called.


The fastest way (that I know) to deploy is to have direct 1000MBPS network
connection.

Development device with minimum of 1 GB RAM, so you wont need to close TD,
and whole DB should be cached in memory.
Target device:
1. Dual boot
2. One OS capable of sharing root of some partition.
The faster device the better.

TD output for build should be set directly on network share of target
device.

So build and deploy is very fast, and you don't need to close your
development machine.
You can continue to work, while FBA is in progress. Little human
multitasking ;)

Regards,
Slobodan

Call time of all three Run types is documented and it is not very useful
for
your case.
If you look at the MSDN docs, it says:
[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). ]

Just for the record, I had already read the docs on the RunOnce resource
and
had posted specifically because my RunOnce Request seems to be executing
in
FBA (though before FBA does network setup), but didn't seem to be
executing
after logon as the Run key as it says above it should. So basically even
though it fails to execute at the right time in FBA, it should run after
first logon and thus set the shares, this doesn't happen. Why?


Run might do the trick, but the cost is too great?
It's worth a shot to see if it works I guess


Use and learn to use Filter option in TD to search for components that
contain specific files.
Also you can copy manually reg.exe it has very low dependencies (almost
none).
Come on man, you think I got this far w/o knowing how to use the Filter
option? I did search through it as well as the NG here, but there only
seem
to be components for REGEDIT/registry editor. That's a bit bigger
than
the
simple REG.EXE command which is why I asked if you knew of a component
speficically for REG.EXE. I will try adding the REG.EXE as an extra file.

BTW:
The best way is to have fast target computer for testing hardware
unrelated
XPe configurations. This will allow you to build and deploy, and
complete
FBA in less than 15 minutes.
So you can experiment with elementary settings and see how they behave.
It is much faster and more accurate to try it yourself, then to ask
simple
questions.
I am not even using my target device yet, I'm using my development machine
and building and deploying images to an extra disk within my system and
then
booting into that disk to load XPe. I wouldn't call this method
fast,
the
whole process of building the image, running fba and boot for the first
time
is rather time consuming in general, but I don't think that there's a
method
faster than this.

I really do appreciate your help Slobodan, but please don't assume that
I'm
not searching the documentation and all to find answers even if
seems
that
way.

RussR




Come on read the manual,at least these things are documented.

Build order is irrelevant in most cases when some sort of installation
or
PnP is involved that modifies registry.

Call time of all three Run types is documented and it is not very useful
for
your case.

Run might do the trick, but the cost is too great?

Use and learn to use Filter option in TD to search for components that
contain specific files.
Also you can copy manually reg.exe it has very low dependencies (almost
none).

BTW:
The best way is to have fast target computer for testing hardware
unrelated
XPe configurations. This will allow you to build and deploy, and
complete
FBA in less than 15 minutes.
So you can experiment with elementary settings and see how they behave.
It is much faster and more accurate to try it yourself, then to ask
simple
questions.

Regards,
Slobodan


Slobodan,

Does setting the build order on RunOnce have any effect on when
it
is
called
during FBA?

I was thinking if RunOnce doesn't do the trick, maybe Run will right?

Also, what components do I need to include to have the reg.exe
command?

Thanks,
RussR

Russell,

You have very little (no) control over phase when RunOnce call will
be
made.

FBA Generic Command in the other hand can be called at exact phase
you
set.
You can make it to be called between before or after some other
components.

Is it the cleanest way?
Who knows, there always may be better way of doing some specific
things.
If
you want to spend hours trying to figure it out.
You could event find the component that registers some dll that
changes
this
registry value, and you could find some way to modify this behavior,
but
in
this case that would be pure waste of time.

Regards,
Slobodan


Slobodan, the info about phase 8499 being last phase before reboot
is
very
useful.
What is the advantage of doing it with FBA Generic Command as
opposed
to
a
RunOnce request in the Extra Resources section?

Currently, I've created a bat file with all the things I
need
fbalog.txt,
it
seems
to
get executed before the network is setup so my shares never get
set.
I
thought of setting it as Run instead of RunOnce, but that is ugly.

Would setting it with FBA Generic Command with phase 8499,
be
the
cleanest
way of doing it?

Thanks,
Russr


Open Resources category:
And create FBA generic command that will call reg.exe with
appropriate
parameters at phase 8499 (last phase before first reboot).

You don't need to change build order since it has less
significance
than
phase number.

Regards,
Slobodan

Slobodan, thanks for the responses!!! I put those registry
keys
in
Extra
Settings like John suggested and as I said in my last
post,
it
seems
like
they get overwritten by something else in FBA. Build order
doesn't
seem
to
make a difference.

You suggested:
You can always call reg.exe at some higher FBA phase to
change
registry
entries, not peaty but it is working.
How do I call reg.exe at some higher phase ensuring that other
stuff
doesn't
overwrite the keys I'm setting? The key question being
calling
it
at
the
higher phase.

Thanks

Build order won't help you if something during FBA changes
value
in
registry
during the some higher phase.
I don't have tese registry keys in my XPe build so I can't
find
component
that is overwriting your settings.

You can always call reg.exe at some higher FBA phase to
change
registry
entries, not peaty but it is working.

Regards,
Slobodan


I ended up putting this registry hack in the Extra
Registry
Settings
section
and I put a build order of 1001, but it didn't do that
trick.
What
build
order do you think I need to get this to not get
overwritten?

Thanks

message
RussR,

There is a policy restriction that you have to relieve
in
order
for
this
to
work correctly. If you look on a XP Pro machine under
Computer
Configuration - Windows Settings - Security Settings -
Local
Policies -
Security Options and look at the properties of the
policy
for
"Accounts:
Limit local account use of blank passwords to console
logon
only"
that
you
can see the by default this policy is enabled.

The reg hack for this is at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
-> limitblankpassworduse="0" to disable it.

If you disable this, I'm pretty sure that you can get
access
to
the
box
without going through the password ordeal.

I'm not in front of TD right now so I can't be certain
where
this
is
in
the
existing components, but if you can't find it you
may
be
able
to
hard
code
it in to Extra Registry Settings and turn up the build
order
pretty
late
so
that it overwrites the default setting.

John Vorchak [eMVP]

thanks what you said to do worked as when my target
device
was
finally
up
and running with XPE, I was able to see it on the
network.
When
I
logged
onto the target device it self it shows that the
folders
I
set
to
share
with
my batch script, did indeed get shared.

There's just one problem though: when I go to access
my
XPE
machine
through
"My Network Places" from another machine on the
network,
it
won't
let
me
access the files and other shared stuff that resides
on
the
XPE
machine.
It
says because of a user restriction. I think
this
is
because
there
is
only
the default Adminstrator account and no password is
set.
I
do
not
want
to
set a password as the target device is headless. Is
there
any
way
to
get
past this so that my files are visible to others on
the
network
w/o
entering
password and all this junk?

Thanks



"John A. Vorchak [eMVP]" <[email protected]>
wrote
in
message
RussR,

Probably the easiest way is to add the script
in
the
Extra
Files
in
TD,
then
add a new RunOnce Request (under Extra Resources)
pointing
to
the
script.

The command will execute twice during FBA - which
may
fail
but
should
be
able to be ignored with no problem, and then one
last
time
after
FBA
has
completed and the image is booted for the
first
time
and
that
should
work
with no problem.

You will need the Net.exe Utility component in your
build.

John Vorchak [eMVP]

I do know how to use the net share command from
the
command
prompt
and
putting it into a .bat file would be trivial.
However,
I
do
not
know
how
to
set this to run as a post FBA script especially
ensuring
that
it
runs
after
the network and workgroup and all of that is taken
care
of.

If you could enlighten me, I would
appreciate
it.
RussR


in
message
RussR,

Probably the easiest way to do it might be to
run
a
post-FBA
script
that
utilizes the net share command in a batch
script.

John Vorchak [eMVP]

On my XPe image, I have installed all the
components
to
enable
File
and
Printer Sharing and Client for Microsoft
Networks.
However
to
share
a
folder or drive or other resources, I
have
to
manually
set
the
sharing
preferences for them after FBA runs and my
image
is
usable.

The problem with this is that eventually my
target
device
will
be
headless
so I want to be able to pre-set what folders
and
files
will
get
shared
upon
first boot thus requring no user intervention.
It
would
also
be
nice
when
deploying images to pre-set the shared
resources
either
in
TD
or
some
automated script during first boot.

I have searched through the newsgroups, but
have
not
found
any
help
on
this
matter. The same goes with the MSDN stuff.

Is there a way to do this?

Thanks,
RussR
 

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