startup folder path for Current user and local machine

How do i get the startup folder path for "Current user" and "All user" in VB.net?

-------------Problems Reply------------

Try

Environment.GetEnvironmentVariable("ALLUSERSPROFILE") 'All Users Directory'
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)) 'Current User Directory'

With the Environment.SpecialFolder enumeration you also have available a Startup and a CommonStartup enumeration. They map to the current user and the all users startup directory.

Im unclear about exatly what location you want ill give you a wey to get Environment Variables.

Private Function GetEnvironmentVariable(ByVal var As String) As String
var = Environment.GetEnvironmentVariable(var)
Return var
End Function

Then pass it the name of the Environment Variable you want. If you are going to add more to the paths like in Rudu's post, you should keep in mind that paths are different of different operating systems.

Category:vb.net Views:0 Time:2010-10-28
Tags: vb.net

Related post

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.127 (s). 11 q(s)