Skip to content

Instantly share code, notes, and snippets.

@tnhung2011
Created July 5, 2025 02:29
Show Gist options
  • Save tnhung2011/746fa18a85fb0dbd60aa964c01a52293 to your computer and use it in GitHub Desktop.
Save tnhung2011/746fa18a85fb0dbd60aa964c01a52293 to your computer and use it in GitHub Desktop.
Creates a shortcut for convenient access to environment variables (could be placed in `Start Menu` folder)
Set h = WScript.CreateObject("WScript.Shell")
Set oLink = h.CreateShortcut(".\Environment Variables.lnk")
oLink.TargetPath = "%SystemRoot%\System32\rundll32.exe"
oLink.Arguments = "sysdm.cpl,EditEnvironmentVariables"
oLink.IconLocation = "%SystemRoot%\System32\shell32.dll,104"
oLink.Save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment