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