PC Review Forums Newsgroups Windows XP Windows XP Embedded Adding to file 'hosts' from TD

Reply

Adding to file 'hosts' from TD

 
Thread Tools Rate Thread
Old 26-04-2004, 11:17 PM   #1
Tony
Guest
 
Posts: n/a
Default Adding to file 'hosts' from TD


Hi. I need to add an entry to the "hosts" file of my XPe image. I
_could_ just modify "hosts" in the resulting pre-FBA image each time I
do a build, but I would prefer to do this through TD if possible. Any
ideas on how I could do this?

Thanks.
- Tony
  Reply With Quote
Old 26-04-2004, 11:33 PM   #2
KM
Guest
 
Posts: n/a
Default Re: Adding to file 'hosts' from TD

Tony,

Check out "Windows Sockets" component. You will find the "hosts" file in the components' Files section.
You can also create your own components to hold the "hosts" file and change the component any time (+ updating it in your
Configuration).

--
KM,
BSquare Corporation

> Hi. I need to add an entry to the "hosts" file of my XPe image. I
> _could_ just modify "hosts" in the resulting pre-FBA image each time I
> do a build, but I would prefer to do this through TD if possible. Any
> ideas on how I could do this?
>
> Thanks.
> - Tony



  Reply With Quote
Old 27-04-2004, 02:57 PM   #3
Tony
Guest
 
Posts: n/a
Default Re: Adding to file 'hosts' from TD

Thanks. I saw the "Hosts" file in the Windows Sockets component, but
I can't figure out how to _edit_ (or add to) that file. The "File
Resource Properties" box does not let me do it. Is there a way to do
this?

If I create another component that includes a different "Hosts" file,
how can I ensure that the one I created will replace the one from the
Windows Sockets component?

And while I'm on this topic, I have had trouble adding file resources
to a component. When I want to place a file in a specific directory
in the XPe image, do I _have_ to put that file in that same directory
on my machine? When I click on "Browse" to select a file, the
"Effective Path" changes to the directory the file came from on my PC
which is not the effective path that I want. When I change
"Destination" to the location I want the file to go, I get an error
saying that the file could not be found on my PC (because I have
effectively changed the directory). Am I doing something wrong?

Thanks for the help.
- Tony

"KM" <konstmor@nospam.yahoo.com> wrote in message news:<ewDmhY9KEHA.2556@TK2MSFTNGP11.phx.gbl>...
> Tony,
>
> Check out "Windows Sockets" component. You will find the "hosts" file in the components' Files section.
> You can also create your own components to hold the "hosts" file and change the component any time (+ updating it in your
> Configuration).
>
> --
> KM,
> BSquare Corporation
>
> > Hi. I need to add an entry to the "hosts" file of my XPe image. I
> > _could_ just modify "hosts" in the resulting pre-FBA image each time I
> > do a build, but I would prefer to do this through TD if possible. Any
> > ideas on how I could do this?
> >
> > Thanks.
> > - Tony

  Reply With Quote
Old 27-04-2004, 05:00 PM   #4
Slobodan Brcin \(eMVP\)
Guest
 
Posts: n/a
Default Re: Adding to file 'hosts' from TD

Tony,

> Thanks. I saw the "Hosts" file in the Windows Sockets component, but
> I can't figure out how to _edit_ (or add to) that file. The "File
> Resource Properties" box does not let me do it. Is there a way to do
> this?


No there is no way that you can do this from TD or CD. You must create your
custom host file in your repository that will be used instead.

> If I create another component that includes a different "Hosts" file,
> how can I ensure that the one I created will replace the one from the
> Windows Sockets component?


Create your component in CD that will copy the files you want from your
repositories.
You have always a choice to use build order options for each file, component
build order dependencies, etc.

> And while I'm on this topic, I have had trouble adding file resources
> to a component. When I want to place a file in a specific directory
> in the XPe image, do I _have_ to put that file in that same directory
> on my machine? When I click on "Browse" to select a file, the
> "Effective Path" changes to the directory the file came from on my PC
> which is not the effective path that I want. When I change
> "Destination" to the location I want the file to go, I get an error
> saying that the file could not be found on my PC (because I have
> effectively changed the directory). Am I doing something wrong?


The best way would be to create custom component.
cerate some folder for your custom components.
Create sub folder for files for some component.
Copy your files to that folder (flat folder structure don't use subfolders
and make sure that all files have unique names)
Open CD.
Add files to it.
change build order.
Create repository.
Set repository.
Select file paths.
.....
....
This is all well documented in help reachable from CD.
Or in this NG:
http://groups.google.com/groups?hl=...group=microsoft.
public.windowsxp.embedded

Watch for the link wrap.

Regards,
Slobodan

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

> Thanks for the help.
> - Tony
>
> "KM" <konstmor@nospam.yahoo.com> wrote in message

news:<ewDmhY9KEHA.2556@TK2MSFTNGP11.phx.gbl>...
> > Tony,
> >
> > Check out "Windows Sockets" component. You will find the "hosts" file in

the components' Files section.
> > You can also create your own components to hold the "hosts" file and

change the component any time (+ updating it in your
> > Configuration).
> >
> > --
> > KM,
> > BSquare Corporation
> >
> > > Hi. I need to add an entry to the "hosts" file of my XPe image. I
> > > _could_ just modify "hosts" in the resulting pre-FBA image each time I
> > > do a build, but I would prefer to do this through TD if possible. Any
> > > ideas on how I could do this?
> > >
> > > Thanks.
> > > - Tony



  Reply With Quote
Old 27-04-2004, 07:48 PM   #5
KM
Guest
 
Posts: n/a
Default Re: Adding to file 'hosts' from TD

Just to add to that:

> The best way would be to create custom component.
> cerate some folder for your custom components.
> Create sub folder for files for some component.
> Copy your files to that folder (flat folder structure don't use subfolders
> and make sure that all files have unique names)
> Open CD.
> Add files to it.
> change build order.
> Create repository.
> Set repository.
> Select file paths.
> ....


Better to add "Windows Sockets" component as a dependency to the new component (your component should be built AFTER the "Windows
Sockets").
Also, when you add your new "hosts" file set Overwrite flag ("Advanced" button) to True (default state is False :-( ) to overwrite
the "hosts" from the "Windows Sockets".

You can also archive all this by using TD Extra Files section. Only make sure you set build order there that is higher than the
"Windows Sockets" build order.

--
KM,
BSquare Corporation


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off