33 lines
982 B
Plaintext
33 lines
982 B
Plaintext
|
|
using System.Collections.Generic;
|
||
|
|
using System.Diagnostics;
|
||
|
|
|
||
|
|
namespace DPInstallWrapper2
|
||
|
|
{
|
||
|
|
class DPInstallWrapper2
|
||
|
|
{
|
||
|
|
static int Main(string[] args)
|
||
|
|
{
|
||
|
|
var proc = new Process();
|
||
|
|
var lArgs = new List<string>(args);
|
||
|
|
for( var i = 1; i < args.Length; i++)
|
||
|
|
{
|
||
|
|
if (args[i].Contains(" "))
|
||
|
|
{
|
||
|
|
//needs a start and end quote
|
||
|
|
lArgs[i] = $"\"{args[i]}\"";
|
||
|
|
}
|
||
|
|
}
|
||
|
|
proc.StartInfo.FileName = args[0];
|
||
|
|
proc.StartInfo.Arguments = lArgs[1] + " " + lArgs[2] + " " + lArgs[3];
|
||
|
|
proc.Start();
|
||
|
|
proc.WaitForExit();
|
||
|
|
var exitCode = proc.ExitCode;
|
||
|
|
proc.Close();
|
||
|
|
|
||
|
|
//dpinst.exe returns non-zero, even when successful,
|
||
|
|
//so this wrapper returns 0 (Success) to the installer.
|
||
|
|
return 0;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|