Commit 7749080a authored by Joe Fitzgerald's avatar Joe Fitzgerald
Browse files

Determining path of script and using it for reboots

parent 10fb9bef
......@@ -29,7 +29,7 @@ function Check-ContinueRestartOrEnd() {
$prop = (Get-ItemProperty $RegistryKey).$RegistryEntry
if (-not $prop) {
Write-Host "Restart Registry Entry Does Not Exist - Creating It"
Set-ItemProperty -Path $RegistryKey -Name $RegistryEntry -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\install-win-updates.ps1"
Set-ItemProperty -Path $RegistryKey -Name $RegistryEntry -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File $($script:ScriptName)"
} else {
Write-Host "Restart Registry Entry Exists Already"
......@@ -167,5 +167,4 @@ if ($global:MoreUpdates -eq 1) {
} else {
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment