2019-05-29 10:52:46 +02:00
|
|
|
|
/*
|
2024-03-05 18:37:42 +01:00
|
|
|
|
* Copyright (c) 2024 ETH Zürich, IT Services
|
2019-05-29 10:52:46 +02:00
|
|
|
|
*
|
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.ServiceProcess;
|
|
|
|
|
|
|
|
|
|
namespace SafeExamBrowser.Service
|
|
|
|
|
{
|
|
|
|
|
[RunInstaller(true)]
|
|
|
|
|
public class Installer : System.Configuration.Install.Installer
|
|
|
|
|
{
|
|
|
|
|
private ServiceProcessInstaller process;
|
|
|
|
|
private ServiceInstaller service;
|
|
|
|
|
|
|
|
|
|
public Installer()
|
|
|
|
|
{
|
|
|
|
|
process = new ServiceProcessInstaller();
|
|
|
|
|
process.Account = ServiceAccount.LocalSystem;
|
|
|
|
|
|
|
|
|
|
service = new ServiceInstaller();
|
|
|
|
|
service.Description = "Performs operations which require elevated privileges.";
|
|
|
|
|
service.DisplayName = "Safe Exam Browser Service";
|
2019-06-07 15:26:03 +02:00
|
|
|
|
service.ServiceName = nameof(SafeExamBrowser);
|
2019-05-29 10:52:46 +02:00
|
|
|
|
service.StartType = ServiceStartMode.Automatic;
|
|
|
|
|
|
|
|
|
|
Installers.Add(process);
|
|
|
|
|
Installers.Add(service);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|