TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
dogan solmaz
NA
1
0
Run file.exe from Resource
Oct 12 2009 12:08 AM
hi i have problem
how to executing(run,start) file.exe directly from Resource
sorry my english very bad (:
my codes
System.Reflection.Assembly asm;
asm = System.Reflection.Assembly.GetExecutingAssembly();
string resourceName = asm.GetName().Name + ".Child.exe";
System.IO.Stream stream = asm.GetManifestResourceStream(resourceName);
byte[] buffer = new byte[stream.Length];
int bufferSize = Convert.ToInt32(stream.Length);
stream.Read(buffer, 0, bufferSize);
string tempFileFolder = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
string tempFilePath = System.IO.Path.Combine(tempFileFolder, "Child.exe");
System.IO.FileStream fs = new System.IO.FileStream(tempFilePath, System.IO.FileMode.Create);
fs.Write(buffer, 0, bufferSize);
fs.Close();
System.Diagnostics.Process.Start(tempFilePath);
Reply
Answers (
2
)
Sending data to crystal report by text box from C#
How to change the column property of a column of a database table using SMO.