If the script finished I want a messagebox popup, but I don't know the if statement.
using (PowerShell PowerShellInstance = PowerShell.Create())
{
PowerShellInstance.AddScript("cmdkey /list | ForEach-Object{if($_ -like \"*Target:*\"){cmdkey /del:($_ -replace \" \",\"\" -replace \"Target:\",\"\")}}");
PowerShellInstance.Invoke();
if ()
{
MessageBox.Show("the process was successfully completed");
}
Aucun commentaire:
Enregistrer un commentaire