8 lines
184 B
PowerShell
8 lines
184 B
PowerShell
if (Get-Process -Name "notepad" -ErrorAction SilentlyContinue)
|
|
{
|
|
Write-Warning -Message "notepad is already running."
|
|
}
|
|
else
|
|
{
|
|
Start-Process -FilePath C:\Windows\notepad.exe
|
|
}
|