Rename a Dokan network drive.

987 views
Skip to first unread message

mladenovic

unread,
Aug 18, 2011, 7:46:06 AM8/18/11
to Dokan
Does anubody know how to programatically rename Dokan drive mountedv
as network drive?
Thanks ín advance. as network drive?
Thanks ín advance.

김재호

unread,
Aug 18, 2011, 7:55:30 AM8/18/11
to do...@googlegroups.com
How do you mount your dokan volume? At removable disk? or at network volume?


--
You received this message because you are subscribed to the Google Groups "Dokan" group.
To post to this group, send email to do...@googlegroups.com.
To unsubscribe from this group, send email to dokan+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dokan?hl=en.



김재호

unread,
Aug 18, 2011, 8:24:32 AM8/18/11
to do...@googlegroups.com
You should use registry if you attatched your volume at network drive. SetVolumeLabel function doesn't work.

Make a hive under MountPoint2. X is your volume designator(letter).
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\X

Then create a value _LabelFromReg. And insert any name you want.
--
Benjamin Kim

mladenovic

unread,
Aug 18, 2011, 2:25:02 PM8/18/11
to Dokan
It didn't work. I tryed manualy editing the values. But an removable
(real usb drive that I mounted on same letter)drive gets that
label.It's lame but can you post some code in any language?

김재호

unread,
Aug 18, 2011, 10:27:55 PM8/18/11
to do...@googlegroups.com
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\X
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\X:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\#X
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\#X:

Make these hives all. Insert _LabelFromReg to each all keys, then try again.
In my memory, some OS(Vista or later) works differently.

If it also doesn't work, you can figure out that yourself.
Use Mark Russinovich's Process Monitor. Do monitor only registry activities. And do filter 'MountPoint2' string.
When you press F5, your explorer will try to read MoundPoint2/XXX/_LabelFromReg. XXX is the point what you have to find out.



--
You received this message because you are subscribed to the Google Groups "Dokan" group.
To post to this group, send email to do...@googlegroups.com.
To unsubscribe from this group, send email to dokan+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dokan?hl=en.




--
Benjamin Kim

mladenovic

unread,
Aug 19, 2011, 1:52:30 PM8/19/11
to Dokan
It did what you said and it seems that Explorer access a registry key
for a label ,bu it is not using drive letter insted it user some Guid.
I tried to get that guid by GetVolumeNameForMountPoint and
QueryDosDvice winapi. Also I tried using IShellFolder.SetNameOf shell
api and Shell.Aplication scripting object nothing of those worked. Is
there another way.

Jeho Kim

unread,
Aug 20, 2011, 2:50:23 PM8/20/11
to do...@googlegroups.com
If Windows Explorer doesn't try to read drive letter, your network provider could be installed wrong.
Check that your dokan network provider dll works fine.


--
You received this message because you are subscribed to the Google Groups "Dokan" group.
To post to this group, send email to do...@googlegroups.com.
To unsubscribe from this group, send email to dokan+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dokan?hl=en.




--
김재호 Benjamin Kim

NHN Corp.
Tel. 031-784-1957
Mobile. 010-4148-9919

mladenovic

unread,
Aug 21, 2011, 6:43:29 AM8/21/11
to Dokan
Hi, that should be dokannp.dll but I couldn't find it in my comp and
the instsler doesent insall it. Where can I download it and how
notwork drive works without it?

mladenovic

unread,
Aug 25, 2011, 5:34:43 AM8/25/11
to Dokan
I reinstalled the provider,but the issue is still there . It seems
like only Explorer can rename a drive . I tested few Explprer
alternatives and they are 'not working well' with network drive. Any
sugestions?

Benjamin

unread,
Aug 25, 2011, 6:46:20 AM8/25/11
to do...@googlegroups.com
Check that your Windows Explorer is loading the dokannp.dll
You can do this by the tool like Process Explorer

--
You received this message because you are subscribed to the Google Groups "Dokan" group.
To post to this group, send email to do...@googlegroups.com.
To unsubscribe from this group, send email to dokan+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dokan?hl=en.




--
Benjamin Kim

mladenovic

unread,
Aug 25, 2011, 7:23:48 AM8/25/11
to Dokan
It isn't because installer doesen't insall it . If you have it in your
system please post it here.

zz w

unread,
Oct 12, 2011, 3:58:56 AM10/12/11
to Dokan
I have met this problem,too.And It drive me crazy 。Have you solved the
problem? Please help me .I have tried autorun.inf and
desktop.ini ,but it do not work ........... And I do not know how to
find dokannp.dll

zz w

unread,
Oct 13, 2011, 4:16:32 AM10/13/11
to Dokan
I have find dokannp.dll and Imade it work , but it donot work
well , It build a reg but do not use it ,That is an regkey has
nothing to do our mounted network drive ,best regards ,Thank you~

mladenovic

unread,
Oct 13, 2011, 6:39:40 AM10/13/11
to Dokan

Can you post your solution here?
Thanks in advance.

zz w

unread,
Oct 14, 2011, 8:19:07 AM10/14/11
to Dokan
I do not ,But I got 2 solutions.
1、use autorun.inf to change the label ,It would not change the
label ,but you find the key that name by GUID through the autorun-
>defaultlabel subkey in mountpoints2, then you can change the label
via labelfromreg

2、recompile dokan with ddk and fix the code ~

zz w

unread,
Oct 14, 2011, 8:20:24 AM10/14/11
to Dokan
Hope that helps~ In fact I can not figure out a useful solution ,too~

On 10月13日, 下午6时39分, mladenovic <mladenovic...@gmail.com> wrote:

zz w

unread,
Oct 21, 2011, 8:26:33 AM10/21/11
to Dokan
Very happy to tell you that I have solved the question. Here it is the
solution:

Download the source code,
Go to dokannp.c change the code of NPGetConnection and set the
parameter remote name(which is surpposed to show as label) as you
want .
Then compile the code and register dokannp.dll with comand dokanctl /
i n
Then it worked!!!!!!!!!!





On 10月13日, 下午6时39分, mladenovic <mladenovic...@gmail.com> wrote:

Benjamin

unread,
Oct 21, 2011, 10:20:37 AM10/21/11
to do...@googlegroups.com
Finally, you made it. Congratulations! :)

2011/10/21 zz w <tag...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "Dokan" group.
To post to this group, send email to do...@googlegroups.com.
To unsubscribe from this group, send email to dokan+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dokan?hl=en.




--
Benjamin Kim

mladenovic

unread,
Oct 24, 2011, 10:12:18 AM10/24/11
to Dokan
Can you post one with label DOKAN or similar , because I don't have
build environment?
Thanks in advance.

zz w

unread,
Oct 27, 2011, 6:54:38 AM10/27/11
to Dokan
OK. You need Windows Driver Kit to build it .Give me you email, I
will send you a dokannp.dll of win7 32 bit version.

mladenovic

unread,
Oct 30, 2011, 11:15:11 AM10/30/11
to Dokan
Thanks, it works at least in win 7.
It is still resistant to any kind of renaming but it looks nice.
I can't use WDK don't have space (installation >600 MiB).
Can you try using GetVolumeInformation api in NPGetConnection to get
label (I think that volume is already mounted on LocalName when that
function is called)?
Thanks in advance.

mladenovic

unread,
Oct 30, 2011, 1:12:13 PM10/30/11
to Dokan

Found space , downloading wdk does anybody know how to compile so it
would work on multiple version of windows?

zz w

unread,
Nov 1, 2011, 9:30:43 AM11/1/11
to Dokan
the DDK proviedes different build environment to build in different
platforms~ Just download DDK and install it ,you will understand how
to do ~

mladenovic

unread,
Nov 1, 2011, 9:49:09 AM11/1/11
to Dokan
This is the part that I changed
if (QueryDosDevice(local, temp, 128)) {
DbgPrintW(L" WN_ALREADY_CONNECTED");
NetResource->lpRemoteName=L"TEST";// <---
status = WN_ALREADY_CONNECTED;

When I use x86 Checked Build Environment it works in xp , doesn't show
TEST in explorer but there is registry entry of type ""DRIVE
LETTER":#"(F:# for examlpe) and I can change the _LabelFromReg, but
when I use x86 Checked Build Environment or any other it just crashes
my explorer on win7. That's strange because even if use you dll on xp
it works and in registry there is only key "DOKAN"(explorer just shows
"Network Drive").


mladenovic

unread,
Nov 1, 2011, 10:37:47 AM11/1/11
to Dokan
I use Build Environments\Window 7 for win 7 and Windows XP for xp ,
just to clarify.

zz w

unread,
Nov 2, 2011, 10:20:11 PM11/2/11
to Dokan
I do not know why ,too.
Usually ,I debug with debug viewer(a tool that can show the message
you send in function DbgPrintW )
On 11月1日, 下午9时49分, mladenovic <mladenovic...@gmail.com> wrote:
> This is the part that I changed
> if (QueryDosDevice(local, temp, 128)) {

zz w

unread,
Nov 2, 2011, 10:27:09 PM11/2/11
to Dokan
Which function do you change ?
Is QueryDosDevice available in explorer.exe?

On 11月1日, 下午9时49分, mladenovic <mladenovic...@gmail.com> wrote:
> This is the part that I changed
> if ((local, temp, 128)) {

mladenovic

unread,
Nov 3, 2011, 1:09:15 PM11/3/11
to Dokan
I finished it ,now it shows your VolumeLabel that you put in
GetVolumeInformation callback. It seem that the same dll works for win
xp and for win 7 at least in x86. http://code.google.com/p/win-sshfs/downloads/detail?name=dokan_np.rar

zz w

unread,
Nov 4, 2011, 7:20:25 AM11/4/11
to Dokan
Big con!!!!
Reply all
Reply to author
Forward
0 new messages