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

            return(resultats
                   .Any(r => bool.Parse(r.ToString())));
        }
Example #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));
        }
Example #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));
        }
Example #4
0
 public void Configure()
 {
     PowershellService.ExecuteScript(PsScriptsFolderPath["Configure"]);
 }
Example #5
0
 public void Uninstall()
 {
     PowershellService.ExecuteScript(PsScriptsFolderPath["Uninstall"],
                                     new KeyValuePair <string, object>("packageName", PackageName));
 }
Example #6
0
        public bool IsInstalled()
        {
            Collection <PSObject> psObjects = PowershellService.ExecuteScript(PsScriptsFolderPath["CheckInstall"], new KeyValuePair <string, object>("packageName", PackageName));

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