Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically obtain drive mapping parms

Status
Not open for further replies.

MichaelBailey

Programmer
Apr 14, 2005
1
US
Our company is replacing 15 Novell servers with NetApps servers and plans on having 20,000 users manually remap their afffected network drives after getting login errors. I wrote a small utility to be called from the network logon script prior to connecting to the network servers that will remap the registry entries to the new shares. The utility compares persistent drive mappings in the registry to a list of affected shares in a text file and, when a match is found, modifies the registry RemotePath to the new location. The other registry values (DeferFlags, ProviderFlags, ProviderName, ProviderType, and UserName) are currently hardcoded in the utility (UserName is blank for Microsoft Windows Network entries on our network). WinAPI calls (RegQueryInfoKey, RegEnumKeyEx, RegOpenKeyEx, RegQueryInfoKey, RegSetValueEx) are used to read and modify the registry. I would like to make this utility more flexible by dynamically looking up those other registry values. When you manually map a network drive to a share with Reconnect at logon checked, the OS establishes the registry entry. Is there a way that I can obtain DeferFlags, ProviderFlags, ProviderName, and ProviderType knowing only the RemotePath and prior to establishing the connection? WinAPI functions WNetGetNetworkInformation and WNetGetResourceInformation don't seem to have what I need. Alternatively, is there a better approach to this problem?

Thanks,
Michael Bailey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top