Suppress Reboot When Updating VMware Tools

Today I found two ways to avoid rebooting a virtual machine when updating its vmware tool. This helps me to save time when I do not have to coordinate time with the owner of the servers.

  1. Using Advanced Option

After click on the Install/Upgrade Tools, enter the following command to suppress the reboot.

/S /v/qn ADDLOCAL=ALL REBOOT=ReallySuppress


2. Using PowerCLI

To use this option, you will have to install PowerCLI from vmware website. The current version is 5.5 and the link is here:

After install PowerCLI, you can start it from the Start Menu.

The first step is to connect to your vCenter Server system.

connect-viserver “servername”

Then you can start updating the vmtool on a machine by running this command.

get-vm “vmname” | update-tools -noreboot

Hope this is helpful for you.


Error – Another version of this product is already installed

Today, I got an weird error message when trying to remove/install Adobe Pro XI on a user’s machine. It said that another version of this product is already installed.


Here’s the symptom.

  • The app is installed but no icon is shown up in Start Menu
  • No icon in Add/Remove Program
  • The GUID is under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
  • All the files are laid down correctly in %ProgramFiles(x86)%\Adobe\Acrobat 11

After thinking for a while, I tried to search for the word “Adobe” in registry and found a matched “Adobe” word under HKLM\SOFTWARE\Classes\Installer\Products.

After delete the key, I was able to remove and reinstall the app.



Restore User Registry

Today I did a bad mistake on a user machine. After loading the user’s HKCU in regedit to check for some settings, I accidentally deleted it. After that, the user cannot login to the machine because her profile was corrupted. I tried to run the system restore but that did not help at all. Ah…

I finally found out a way to fix this problem. The idea is to delete the user’s profile and re-create it.


After deleted the profile, I rebooted the machine then asked the user to login. She was able to log back in without any problem. The only thing she lost was her recent opened applications under the start menu.




Remove a printer

In our Microsoft Office 365 v2016 C2R deployment , we have to delete the local “Send To OneNote 2013” printer. This printer was created when we installed Office 2013. After a little bit of searching, I found out 3 ways to delete a printer.

  1. Using command line

You can use the command to remove a printer.

Local printer:
rundll32 printui.dll,PrintUIEntry /dl /n “printer-name” /q

Network printer:
rundll32 printui.dll,PrintUIEntry /dn /n “printer-name” /q

/dl: delete local printer
/n: printer name
/q: quiet

To see all the options, run this command:
rundll32 printui.dll,PrintUIEntry /?

2. Using vbscript

This script scans all local printers on the system then remove the “Fax” printer. Modify the wmi query to get the network or all printers if needed.

strComputer = “.”
Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\cimv2”)
Set colInstalledPrinters = objWMIService.ExecQuery(“Select * from Win32_Printer where Network = FALSE”)
For Each objPrinter in colInstalledPrinters
 If StrComp(Trim(objPrinter.Name), “Fax”) = 0 Then 
 End If

3. Using PowerShell

This script removes the network printers only. Modify the if statement to remove local or all printers if needed.

$printers = Get-WmiObject -Class win32_printer
foreach ($printer in $printers)
#Remove only network printers
if($printer.Name -ne $null -and $printer.Name.StartsWith(“\\”))

Fix SCCM Client Installation Error 0x80041002

Today, I had problem installing CM client on a machine. Both manual install and client push methods did not work. I checked the ccm.log file on the SCCM server and found this error.


The error code indicates that the WMI repository on the client is broken. In order to fix this error, we have to rebuild the WMI repository.

I run the Windows commmand (cmd.exe) as a local administrator and try these commands.

  • winmgmt /verifyrepository
  • winmgmt /salvagerepositor

The first command checks for the consistency of the WMI repository and the second command rebuilds the repository if an inconsistency is detected.

However, these commands do not fix the problem for me. So I end up with rebuilding the WMI repository manally by follow these steps.

  • Change the startup type of the Windows Management Instrumentation to Disabled and stop this service
  • Go to %windir%\System32\wbem and rename the Repository folder to Repository.bak
  • Run the cmd.exe as administrator and CD to %windir%\System32\wbem
  • Run for /f %s in (‘dir /b /s *.dll’) do regsvr32 /s %s
  • Change the startup type of the Windows Management Instrumentation back to Automatic
  • In the cmd.exe windows, run cd /d C:\ to go back to the root of the C drive
  • Run for /f %s in (‘dir /s /b *.mof *.mfl’) do mofcomp %s
  • Reboot the machine

After reboot the machine, I push the CM client to the machine again and it works. Yay!




AWU Lookup

Written in C#, this application scans the Uninstall registry keys under HKLM to find all information about installed applications on a machine. It’s very helpful when we want to look for the UninstallString, which can be used as the uninstall command of a SCCM application.

I wrote this application because it takes too long for me to look for the UninstallString of an application every time I create an SCCM application.

Note: This application requires .NET Framework 3.5



The Windows Update tab searches for all Windows updates on the machine. In order to use it, you have to set the ExecutionPolicy to RemoteSigned, Bypass or Unrestricted (not recommended) on your machine.




Have fun!

Install Application using PowerShell in SCCM

Today I did some testing with installing an application in SCCM using PowerShell. I found out a few interested things and I want to share it with you guys.

In order for an application to be successfully installed, there are few things that we have to setup.

1. Change the PowerShell execution policy

From Client Settings, change the PowerShell execution policy to Bypass in the Computer Agent category.


If we don’t do this, we’ll get an error message when trying to install the application from the application catalog.


The error is also captured in the AppDiscovery.log file on the client.


Note: You may not have to do step 1, if you don’t use PowerShell script for application detection.

2. Include the Bypass ExecutionPolicy in the install command

If you don’t set the PowerShell ExecutionPolicy to Bypass or Unrestricted on your machine, you have to include it in the install command similar as below.

powershell.exe -ExecutionPolicy Bypass -file “.\Install.ps1”

If not, you will get an unmatched return code 1 error, captured in the AppEnforce.log file.

Have fun!