Extract an executable from resources? [solved]
I have been googling for about 2 days now but still no results. I am just wondering how to extract a executable file from your programs resources.
Please and thank you
What do you mean by extracting ? You want to know which files in your resources are executables and write them ?
If writing an executable is the purpose, here's how you do it:
[highlight=vbnet]
My.Computer.FileSystem.WriteAllBytes(My.Computer.F ileSystem.SpecialDirectories.Desktop & "\MP3Test.exe", My.Resources.MP3Tests, False)[/highlight]
Just check the datatype of the resource; it's a byte array. The IO namespace provides byte-writing abilities through the File class:
[highlight=vb.net]
IO.File.WriteAllBytes("Path Here", My.Resources.ResourceName)
[/highlight]