Copy resources from c# pjct to a windows directory

Chathuranga picture Chathuranga · Mar 9, 2012 · Viewed 13.1k times · Source

how can i copy a file in my project resources to a temp directory using C#

i have install.bat file in my project resources folder i want to copy this into c:\ directory

Answer

Quispie picture Quispie · Jan 14, 2013

My project can copy a dll as resource in a directory, maybe this wil work for you:

File.WriteAllBytes(@"C:\filename.extension", Properties.Resources.install);