Try this example:
Process.Start(Environment.ExpandEnvironmentVariables("%WINDIR%\Installer"))
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi
I am trying to open a specified folder location from VB
I am using Process.Start("C:\temp") as example and this works fine
But some of the paths I want to open won't work in same way
e.g. Process.Start("%WINDIR%\Installer")
gives "System.ComponentModel.Win32Exception: 'The system cannot find the file specified'"
Some other forum mentioned doing it like this Process.Start("explorer.exe", "%WINDIR%\Installer") but that just opens my Documents folder instead of specified path
It seems to be paths that have environment variables in e.g. %WINDIR% or %APPDATA% etc
Any thoughts please
Try this example:
Process.Start(Environment.ExpandEnvironmentVariables("%WINDIR%\Installer"))