I would like to embed all files/resources into a single exe (2 exe's and a ps1)
Is it possible ? and how would one go about doing it, currently I have managed to publish the project but there are additional files ( Application Files, Application Manifest and setup exe) in the output - this I would like to embed into single exe.
Been doing some readings, seems I may need to embed the resources and perhaps create pointers? or embedding image resources in the project, not sure if I am on right track and/or how to start the code..
What I have so far
private Boolean Install_certificate()
{
try
{
var newProcessInfo = new System.Diagnostics.ProcessStartInfo()
{
FileName = @"C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe",
Verb = "runas",
Arguments = (@"–ExecutionPolicy Bypass ""script.ps1""")
};
System.Diagnostics.Process.Start(newProcessInfo);
// Install the cert & change proxy settings
//System.Diagnostics.Process.Start(@"script.ps1" );
return true;
}
catch
{
return false;
}
}
private Boolean Install_exe1()
{
try
{
// Install exe1
System.Diagnostics.Process.Start(@"setup1.exe");
return true;
}
catch
{
return false;
}
}
private Boolean Install_exe2()
{
try
{
// Install exe2
System.Diagnostics.Process.Start(@"setup2.exe");
return true;
}
catch
{
return false;
}
}
Appreciate the help!
Thanks