Obecnie piszę skrypt, który zawiera wiele odinstalowań programów zainstalowanych na urządzeniu WES 7. Jedna z aplikacji, które muszę odinstalować (VMware Horizon View Client) prosi o ponowne uruchomienie. Kiedy jest to część skryptu, wydaje się, że akceptuje domyślny przycisk (TAK) i rozpoczyna ponowne uruchamianie urządzenia. Dlatego skrypt nie działa.Powershell Odinstaluj Script - Masz prawdziwy ból głowy
Byłbym wdzięczny za pomoc w zapobieganiu ponownemu uruchomieniu komputera.
FYI: Ten skrypt jest wysyłany za pomocą narzędzia do zarządzania i jest uruchamiany w podwyższonym stopniu na celu.
To jest mój skrypt:
set-executionpolicy unrestricted
#############################################################
# Un-install unwanted applications
#############################################################
$application = Get-WMIObject Win32_Product -filter "Name='ThinPrint Client Windows 8.6'"
$application.Uninstall()
$application = Get-WMIObject Win32_Product -filter "Name='2X Client'"
$application.Uninstall()
$application = Get-WMIObject Win32_Product -filter "Name='Adobe Reader X (10.1.4)'"
$application.Uninstall()
$application = Get-WMIObject Win32_Product -filter "Name='VMware Horizon View Client'"
$application.Uninstall()
$application = Get-WMIObject Win32_Product -filter "Name='VERDE VDI User Tools'"
$application.Uninstall()
$application = Get-WMIObject Win32_Product -filter "Name='vWorkspace Connector for Windows'"
$application.Uninstall()
#############################################################
# Remove Internet Explorer Access
#############################################################
dism /online /norestart /Disable-Feature /FeatureName:Internet-Explorer-Optional-x86
#############################################################
# Remove IE Browser LNK from Taskbar
#############################################################
del "C:\Users\User\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\Launch Internet Explorer Browser.lnk"
#############################################################
# Make Citrix Receiver the shell
#############################################################
Push-Location
CD 'HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon'
New-Itemproperty -path .\ -name Shell -Type String -Value 'c:\program files\Citrix\Receiver\receiver.exe'
Pop-Location
set-executionpolicy restricted
# End of Script
bym bardzo wdzięczny za pomoc w jaki sposób, aby zapobiec restart półmetku skryptu.