Get the resource stream by using Stream s =
System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("myResource");
Then simply write the Stream to the files system, using the correct extension!
Hope the helps.

Signature
Good luck!
Shailen Sukul
Architect
(BSc MCTS, MCSD.Net MCSD MCAD)
Ashlen Consulting Service P/L
(http://www.ashlen.net.au)
> Is there an easy way to copy an Embedded Resource file to the file
> system? I have a config file that is an Embedded Resource in my project
> that I want to copy to a location in the file system but the only way I
> can think of doing it is to read it and then create a new file and
> write to the file.
Laurent Bugnion - 23 Nov 2006 07:59 GMT
Hi,
> Get the resource stream by using Stream s =
> System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("myResource");
>
> Then simply write the Stream to the files system, using the correct extension!
Or, to simplify the extension thing, simply save the file in the
resources using the extension already.
And remember that the path in the resources is separated with dots, not
slashes.
myAssembly.GetManifestResourceStream("myFolder.myResource.jpg");
HTH,
Laurent

Signature
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
I have posted an example on my blog at:
http://geekswithblogs.net/shailensukul/archive/2006/11/24/97962.aspx
It can save a text based stream to the file system.
HTH

Signature
Good luck!
Shailen Sukul
Architect
(BSc MCTS, MCSD.Net MCSD MCAD)
Ashlen Consulting Service P/L
(http://www.ashlen.net.au)
> Is there an easy way to copy an Embedded Resource file to the file
> system? I have a config file that is an Embedded Resource in my project
> that I want to copy to a location in the file system but the only way I
> can think of doing it is to read it and then create a new file and
> write to the file.