Powershell script to check if a program is running or not
$Prog = "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
$Running = Get-Process firefox -ErrorAction SilentlyContinue
$Start = {([wmiclass]"win32_process").Create($Prog)}
if($Running -eq $null) # evaluating if the program is running
{& $Start} # the process is created on this line
3 comments:
Great Article
C# Training in Chennai | C# Online Training | ASP.NET Training in Chennai
C# Training in Chennai | Dot Net Training in Chennai | Dot Net Training in Chennai
Thank you for this valuable information. Get your business to the next level in simple steps. We provides lowest price of erp Software for our clients erp in Chennai
The actual time and effort taken to create this wonderful article were really great and would like to watch this blog regularly to get more useful stuff thanks much for sharing here...
Best Online Software Training Institute | Unix Linux Online Training
Post a Comment