Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy resources from c# pjct to a windows directory

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

like image 841
Chathuranga Avatar asked Mar 09 '12 04:03

Chathuranga


People also ask

How do I copy a resource from one file to another?

You can easily copy resources from an existing resource or executable file to your current resource file. To copy resources, you open both files containing resources at the same time and drag items from one file to another or copy and paste between the two files.

How do I copy and paste a resource in Visual C++?

Right-click the resource file into which you'd like to paste the resource (for example, Source2.rc) and choose Paste. To avoid conflicts with symbol names or values in the existing file, Visual C++ may change the transferred resource's symbol value or symbol name and value when you copy it to the new file.

What are resource files in Visual C++?

This method works for resource script (.rc) files and resource template (.rct) files, and as executable (.exe) files. Visual C++ includes sample resource files that you can use in your own application.

How do I add a resource to a resource script?

In Resource View right-click the node of the resource script (.rc) file to which you want to add a resource and select Import. Locate and choose the file name of the bitmap (.bmp), icon (.ico), cursor (.cur), html file (.htm), or other file to import.


1 Answers

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);
like image 158
Quispie Avatar answered Sep 16 '22 12:09

Quispie