Added hash check to setupTmp
Fixed issue with custom apps in choco
This commit is contained in:
@@ -3,6 +3,14 @@ function UserReg {
|
||||
param (
|
||||
[string] $Username
|
||||
)
|
||||
# check if User folder exist
|
||||
if( -not (Test-Path -Path "C:\Users\$Username" -PathType Container) ) {
|
||||
Write-Host "User folder for $Username not found."
|
||||
Write-Host "You need to login to $Username in order for its files and registry to be setup."
|
||||
Write-Host "Press Enter to continue..."
|
||||
$null = Read-Host
|
||||
Write-Host "Continuing the script..."
|
||||
}
|
||||
Write-Host "Loading $Username's HKU registry hive..."
|
||||
$UserProfiles = Get-WmiObject Win32_UserProfile | Where-Object { $_.Special -eq $false }
|
||||
$UserProfile = $UserProfiles | Where-Object { $_.LocalPath.EndsWith("\$Username") }
|
||||
|
||||
Reference in New Issue
Block a user