SEBWIN-392: Forgot to actually use the arguments of a whitelisted application.
This commit is contained in:
parent
bdc8dad413
commit
631fb583d7
1 changed files with 13 additions and 1 deletions
|
@ -80,7 +80,7 @@ namespace SafeExamBrowser.Applications
|
|||
try
|
||||
{
|
||||
logger.Info("Starting application...");
|
||||
InitializeInstance(processFactory.StartNew(executablePath));
|
||||
InitializeInstance(processFactory.StartNew(executablePath, BuildArguments()));
|
||||
logger.Info("Successfully started application.");
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -89,6 +89,18 @@ namespace SafeExamBrowser.Applications
|
|||
}
|
||||
}
|
||||
|
||||
private string[] BuildArguments()
|
||||
{
|
||||
var arguments = new List<string>();
|
||||
|
||||
foreach (var argument in settings.Arguments)
|
||||
{
|
||||
arguments.Add(Environment.ExpandEnvironmentVariables(argument));
|
||||
}
|
||||
|
||||
return arguments.ToArray();
|
||||
}
|
||||
|
||||
public void Terminate()
|
||||
{
|
||||
applicationMonitor.InstanceStarted -= ApplicationMonitor_InstanceStarted;
|
||||
|
|
Loading…
Add table
Reference in a new issue