Simplest way, leading on from what Will said:
- Add the .exe using Resources.resx
-
Code this:
string path = Path.Combine(Path.GetTempPath(), "tempfile.exe"); File.WriteAllBytes(path, MyNamespace.Properties.Resources.MyExecutable); Process.Start(path);
More Related Contents:
- How to shut down the computer from C#
- Detect Windows version in .NET
- Finding the default application for opening a particular file type on Windows
- How to get a path to the desktop for current user in C#?
- Check for device change (add/remove) events
- How to detect a process start & end using c# in windows?
- How to prevent Windows from entering idle state?
- In .NET/C# test if process has administrative privileges
- Unlock Windows programmatically
- How to programmatically discover mapped network drives on system and their server names?
- How do I get a list of installed updates and hotfixes?
- How do I determine the true pixel size of my Monitor in .NET?
- C# – How to detect a Windows shutdown/logoff and cancel that action (after asking the user)
- Run Exe file as an Embedded Resource in C#
- Check if application is installed in registry
- Return to an already open application when a user tries to open a new instance
- How to write an image from byte[] into MS WORD using C# Windows application
- How to check if a String contains any letter from a to z? [duplicate]
- Make a window topmost using a window handle
- The HTTP request is unauthorized with client authentication scheme ‘Negotiate’. The authentication header received from the server was ‘NTLM’
- How to get the output of a System.Diagnostics.Process?
- Get selected items of folder with WinAPI
- How to get current windows username from windows service in multiuser environment using .NET
- Uninstall Custom Action Not Deleting Registry Key
- Why does “\n” give a new line on Windows?
- Send message to a Windows process (not its main window)
- Can’t run program because it asks me to attach on process
- Print html document from Windows Service in C# without print dialog
- Keeping window visible through “Show Desktop”/Win+D
- What does “Beta: Use Unicode UTF-8 for worldwide language support” actually do?