Hello, I need to be able to open a folder from vb .NEt, problem is, becuase of redistribution, i need to use variables so that it works on everybodys computer. Anybody know how to do say

Process.Start("%userprofile%")

?

Member Avatar

Huntondoom

Dim Path as string = string.empty
Path = enviroment.getfolder(enviroment.specialfolder.mydocuments)
Path += "/[insert path to VB.net Project like]

example:

Dim Path as string = string.empty
Path = enviroment.getfolder(enviroment.specialfolder.mydocuments)
Path += "/Visual Studio/Project/Some Project/

since Enviroment.getfolder(enviroment.specialfolder.mydocuments) will
retrieve the path to Mydocuments on the computer it is running you'll only have to add the last bit of the path

and then just say:

process.start(path)