示例#1
0
        public bool HasLicence()
        {
            IEnumerable <PSObject> resultats =
                PowershellService
                .ExecuteScript(PsScriptsFolderPath["CheckLicence"]);

            return(resultats
                   .Any(r => bool.Parse(r.ToString())));
        }
示例#2
0
        public void RegisterCertificate(string certificationFilePath)
        {
            if (string.IsNullOrWhiteSpace(certificationFilePath))
            {
                throw new ArgumentNullException("certificationFilePath");
            }
            if (!File.Exists(certificationFilePath))
            {
                throw new FileNotFoundException("Impossible d'accéder au certificat avec le chemin : '" + certificationFilePath + "'.");
            }

            PowershellService.ExecuteScript(PsScriptsFolderPath["RegisterCertificate"], new KeyValuePair <string, object>("certPath", certificationFilePath));
        }
示例#3
0
        public void InstallPackage(string appxPath)
        {
            if (string.IsNullOrWhiteSpace(appxPath))
            {
                throw new ArgumentNullException("appxPath");
            }
            if (!File.Exists(appxPath))
            {
                throw new FileNotFoundException("Impossible d'accéder au package avec le chemin : '" + appxPath + "'.");
            }

            PowershellService.ExecuteScript(PsScriptsFolderPath["Install"], new KeyValuePair <string, object>("packagePath", appxPath));
        }
示例#4
0
 public void Configure()
 {
     PowershellService.ExecuteScript(PsScriptsFolderPath["Configure"]);
 }
示例#5
0
 public void Uninstall()
 {
     PowershellService.ExecuteScript(PsScriptsFolderPath["Uninstall"],
                                     new KeyValuePair <string, object>("packageName", PackageName));
 }
示例#6
0
        public bool IsInstalled()
        {
            Collection <PSObject> psObjects = PowershellService.ExecuteScript(PsScriptsFolderPath["CheckInstall"], new KeyValuePair <string, object>("packageName", PackageName));

            return(psObjects.Any());
        }
示例#7
0
 public void RegisterLicense()
 {
     PowershellService.ExecuteScript(PsScriptsFolderPath["RegisterLicense"]);
 }