Skip to content

Instantly share code, notes, and snippets.

@theznerd theznerd/Junk.ps1
Last active Aug 15, 2019

Embed
What would you like to do?
Start-Process -Wait -WindowStyle Hidden -FilePath "$PSScriptRoot\ServiceUI_x64.exe" -ArgumentList "-process:tsprogressui.exe `"c:\Windows\System32\WindowsPowershell\v1.0\powershell.exe`" -ExecutionPolicy Bypass -WindowStyle Hidden -File `"$PSScriptRoot\UserNotification.ps1`" -SettingsFile `"$PSScriptRoot\Settings.ini`""
Start-Process -Wait -WindowStyle Hidden -FilePath "$PSScriptRoot\ServiceUI_x64.exe" -ArgumentList "-process:tsprogressui.exe `"c:\Windows\System32\WindowsPowershell\v1.0\powershell.exe`" -ExecutionPolicy Bypass -WindowStyle Hidden -File \`"$PSScriptRoot\UserNotification.ps1\`" -SettingsFile \`"$PSScriptRoot\Settings.ini\`""
Start-Process -Wait -WindowStyle Hidden -Verb RunAs -FilePath "$PSScriptRoot\ServiceUI_x64.exe" -ArgumentList "-process:tsprogressui.exe `"c:\Windows\System32\WindowsPowershell\v1.0\powershell.exe`" -ExecutionPolicy Bypass -WindowStyle Hidden -File `"$PSScriptRoot\UserNotification.ps1`" -SettingsFile `"$PSScriptRoot\Settings.ini`""
Start-Process -Wait -WindowStyle Hidden -Verb RunAs -FilePath "$PSScriptRoot\ServiceUI_x64.exe" -ArgumentList "-process:tsprogressui.exe `"c:\Windows\System32\WindowsPowershell\v1.0\powershell.exe`" -ExecutionPolicy Bypass -WindowStyle Hidden -File \`"$PSScriptRoot\UserNotification.ps1\`" -SettingsFile \`"$PSScriptRoot\Settings.ini\`""
Start-Process -Wait -WindowStyle Hidden -NoNewWindow -FilePath "$PSScriptRoot\ServiceUI_x64.exe" -ArgumentList "-process:tsprogressui.exe `"c:\Windows\System32\WindowsPowershell\v1.0\powershell.exe`" -ExecutionPolicy Bypass -WindowStyle Hidden -File `"$PSScriptRoot\UserNotification.ps1`" -SettingsFile `"$PSScriptRoot\Settings.ini`""
Start-Process -Wait -WindowStyle Hidden -UseNewEnvironment -FilePath "$PSScriptRoot\ServiceUI_x64.exe" -ArgumentList "-process:tsprogressui.exe `"c:\Windows\System32\WindowsPowershell\v1.0\powershell.exe`" -ExecutionPolicy Bypass -WindowStyle Hidden -File `"$PSScriptRoot\UserNotification.ps1`" -SettingsFile `"$PSScriptRoot\Settings.ini`""
Start-Process -Wait -WindowStyle Hidden -NoNewWindow -FilePath "$PSScriptRoot\ServiceUI_x64.exe" -ArgumentList "-process:tsprogressui.exe `"c:\Windows\System32\WindowsPowershell\v1.0\powershell.exe`" -ExecutionPolicy Bypass -WindowStyle Hidden -File \`"$PSScriptRoot\UserNotification.ps1\`" -SettingsFile \`"$PSScriptRoot\Settings.ini\`""
Start-Process -Wait -WindowStyle Hidden -UseNewEnvironment -FilePath "$PSScriptRoot\ServiceUI_x64.exe" -ArgumentList "-process:tsprogressui.exe `"c:\Windows\System32\WindowsPowershell\v1.0\powershell.exe`" -ExecutionPolicy Bypass -WindowStyle Hidden -File \`"$PSScriptRoot\UserNotification.ps1\`" -SettingsFile \`"$PSScriptRoot\Settings.ini\`""
Start-Process -Wait -FilePath "cmd.exe" -ArgumentList "/c `"$PSScriptRoot\ServiceUI_x64.exe`" -process:tsprogressui.exe `"c:\Windows\System32\WindowsPowershell\v1.0\powershell.exe`" -ExecutionPolicy Bypass -WindowStyle Hidden -File \`"$PSScriptRoot\UserNotification.ps1\`" -SettingsFile \`"$PSScriptRoot\Settings.ini\`""
Start-Process -Wait -FilePath "cmd.exe" -ArgumentList "/c `"$PSScriptRoot\ServiceUI_x64.exe`" -process:tsprogressui.exe `"c:\Windows\System32\WindowsPowershell\v1.0\powershell.exe`" -ExecutionPolicy Bypass -WindowStyle Hidden -File `"$PSScriptRoot\UserNotification.ps1`" -SettingsFile `"$PSScriptRoot\Settings.ini`""
Start-Process -Wait -WindowStyle Hidden -Verb RunAs -FilePath "cmd.exe" -ArgumentList "/c `"$PSScriptRoot\ServiceUI_x64.exe`" -process:tsprogressui.exe `"c:\Windows\System32\WindowsPowershell\v1.0\powershell.exe`" -ExecutionPolicy Bypass -WindowStyle Hidden -File \`"$PSScriptRoot\UserNotification.ps1\`" -SettingsFile \`"$PSScriptRoot\Settings.ini\`""
Start-Process -Wait -WindowStyle Hidden -Verb RunAs -FilePath "cmd.exe" -ArgumentList "/c `"$PSScriptRoot\ServiceUI_x64.exe`" -process:tsprogressui.exe `"c:\Windows\System32\WindowsPowershell\v1.0\powershell.exe`" -ExecutionPolicy Bypass -WindowStyle Hidden -File `"$PSScriptRoot\UserNotification.ps1`" -SettingsFile `"$PSScriptRoot\Settings.ini`""
& "$PSScriptRoot\ServiceUI_x64.exe -process:tsprogressui.exe `"c:\Windows\System32\WindowsPowershell\v1.0\powershell.exe`" -ExecutionPolicy Bypass -WindowStyle Hidden -File \`"$PSScriptRoot\UserNotification.ps1\`" -SettingsFile \`"$PSScriptRoot\Settings.ini\`""
& "cmd.exe /c $PSScriptRoot\ServiceUI_x64.exe -process:tsprogressui.exe `"c:\Windows\System32\WindowsPowershell\v1.0\powershell.exe`" -ExecutionPolicy Bypass -WindowStyle Hidden -File `"$PSScriptRoot\UserNotification.ps1`" -SettingsFile `"$PSScriptRoot\Settings.ini`""
### Here's the lines that work in a batch script ###
"%~dp0ServiceUI_x86.exe" -process:tsprogressui.exe "c:\Windows\System32\WindowsPowershell\v1.0\powershell.exe" -ExecutionPolicy Bypass -WindowStyle Hidden -File \"%~dp0UserNotification.ps1\" -SettingsFile \"%~dp0Settings.ini\"
"%~dp0ServiceUI_x64.exe" -process:tsprogressui.exe "c:\Windows\System32\WindowsPowershell\v1.0\powershell.exe" -ExecutionPolicy Bypass -WindowStyle Hidden -File \"%~dp0UserNotification.ps1\" -SettingsFile \"%~dp0Settings.ini\"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.