PaulP Posted April 17, 2019 Share Posted April 17, 2019 How do I get the actual drive mapping for a DFS drive.. I've seen this old post but I'm not able to get it to work. https://www.autoitscript.com/forum/topic/34117-netdfsgetinfo-api/ Link to comment Share on other sites More sharing options...
jdelaney Posted April 18, 2019 Share Posted April 18, 2019 (edited) $a = DriveGetDrive ("NETWORK") For $i = 0 To UBound($a)-1 ConsoleWrite(DriveMapGet($a[$i]) & @CRLF) Next or is it not a mapped drive? If it's not mapped, you can run a command prompt with 'net use'...not sure if there is an autoit equivalent...parse the output. Edited April 18, 2019 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 18, 2019 Moderators Share Posted April 18, 2019 @PaulP when you say "actual drive mapping" do you mean the Target Folder for each path, or the true path to the folder on the dfs server? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
PaulP Posted April 23, 2019 Author Share Posted April 23, 2019 (edited) Okay, let me try this again but this time with pictures... If I do a DriveMapGet, it returns DFSROOT which isn't helpful. I've attached what the drive looks like in Windows Explorer. Just shows the Drive with no mapping. Then, if I look at the properties. What I want is the mapping that is shown in the DFS tab of the properties. The "net use" also doesn't show my the actual drive mapping. How do I get the actual drive mapping for a DFS Drive? In short, I want to determine which server the drive is mapped to. Edited April 23, 2019 by PaulP Link to comment Share on other sites More sharing options...
abberration Posted April 23, 2019 Share Posted April 23, 2019 (edited) I have only worked with DFS a little bit, so I'm no expert. But I did a quick search and found dfsutil.exe might be useful and with that, the 'dfsutil property' command (with the 'state' subcommand) would most likely get you the information you need. You could use AutoIt to execute the program with parameters. I have no way of testing any of this right now, so I may be wrong. I hope this will help guide you. Edited April 23, 2019 by abberration Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
Nine Posted April 24, 2019 Share Posted April 24, 2019 I am quite confident (but it remains untested on my part) that some of the Win32_ WMI class could answer your question. Look at Win32_MappedLogicalDisk or Win32_LogicalDisk or some other class in that category. You may find what you need. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
PaulP Posted April 24, 2019 Author Share Posted April 24, 2019 (edited) 7 hours ago, Nine said: I am quite confident (but it remains untested on my part) that some of the Win32_ WMI class could answer your question. Look at Win32_MappedLogicalDisk or Win32_LogicalDisk or some other class in that category. You may find what you need. Nope, still shows as \\dfsroot\site\RetailApps for the ProviderName for both of these.. Edited April 24, 2019 by PaulP Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now