Skip to content

Instantly share code, notes, and snippets.

@liyafe1997
Created May 3, 2020 08:48
Show Gist options
  • Save liyafe1997/763ef3fba700970ff9f88d0061b680e5 to your computer and use it in GitHub Desktop.
Save liyafe1997/763ef3fba700970ff9f88d0061b680e5 to your computer and use it in GitHub Desktop.
for detectiscsi.bat, run the autostart program manually
$key = Get-Item -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
$key.GetValueNames() |
ForEach-Object {
$ValueName = $_
$rv = 1 | Select-Object -Property Name, Type, Value
$tostart = $key.GetValue($ValueName)
echo $tostart
Start-Process cmd "/c $tostart" -WindowStyle Hidden
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment