Skip to content

Instantly share code, notes, and snippets.

@skull-squadron
Last active August 30, 2025 11:26
Show Gist options
  • Save skull-squadron/ee10049692d1b2b173387cb30b58ec87 to your computer and use it in GitHub Desktop.
Save skull-squadron/ee10049692d1b2b173387cb30b58ec87 to your computer and use it in GitHub Desktop.
Permanent, hassle-free VMware Workstation 17 Autostart fix

VMware Workstation autostart that works

The problem is that VMware Workstation Autostart service doesn't work.

1. Reset the Autostart service back to default so it doesn't run

Start-Process powershell -Verb RunAs "Set-Service -Name VmwareAutostartService -StartupType Manual"

2. Fix the permissions issues that prevents VMWare Workstation from saving Autostart settings

Start-Process powershell -Verb RunAs "&icacls.exe '$env:ProgramData\VMware\VMware Workstation\vmautostart.xml' /grant '${env:USERDOMAIN}\${env:USERNAME}:F'"

1. Install

  1. Cmd-R shell:startup
  2. Create a folder called .scripts and drop the file autostart-vmware.ps1 in it
  3. Create a shortcut in the startup folder by running the following:
$Ws = New-Object -COMObject WScript.Shell
$Startup = "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup"
$S = $Ws.CreateShortcut("$Startup\autostart-vmware.lnk")
$S.TargetPath = "$env:windir\System32\WindowsPowerShell\v1.0\powershell.exe"
$S.Arguments = "-ExecutionPolicy Bypass -File `"$Startup\.scripts\autostart-vmware.ps1`""
$S.WindowStyle = 7 # 1: normal, 3: maximized, 7: minimized
$S.Save()

Note: Run the above in any regular Powershell terminal as your user (not Administrator)

cd "${env:ProgramFiles(x86)}\VMware\VMware Workstation"
$vmautostartXml = "$env:ProgramData\VMware\VMware Workstation\vmautostart.xml"
$vmxs = Select-Xml -Path $vmautostartXml -XPath "//ConfigRoot/AutoStartOrder/e/vmxpath" | ForEach-Object { $_.Node.'#text' }
$first = $true
foreach ($vmx in $vmxs) {
if (-Not $first) {
Start-Sleep 5
}
&.\vmrun.exe -T ws start $vmx nogui
$first = $false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment