예제 #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"]);
 }