Files
DP44/DataPRO/DataPRO Installer/Source Files/.svn/pristine/99/993898ed9a4e3efc17190f61fc8d7e787824c272.svn-base

33 lines
982 B
Plaintext
Raw Normal View History

2026-04-17 14:55:32 -04:00
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;
}
}
}