Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a case here where I want to open a dialog which will allow to choose file from local drive or mapped network drive.

It's running okay in debug mode. But when I release the software (Installshield), the network drive is not showing in open dialog.

lEr =  RegOpenKeyExW(hKeyUser, L"Network", 0, KEY_READ|KEY_ALL_ACCESS, &hKeyNet);


This line show failed. Returned 2. but running in debug mode is ok.
so Im ensure that the key is there.

Any clue?

Thanks

What I have tried:

I have tried by creating a key "EnableLinkedConnections" with a value of 1. But then the mapped network drive is still not showing from my installed application.
Posted
Updated 4-Jul-19 22:21pm

1 solution

It may be valid on your system but may not be on others'. I have just checked my machine and the key is there but does not contain anything. You should not use the registry in this way as registry entries are not guaranteed.

You should let the user navigate to the correct place from the dialog.
 
Share this answer
 
Comments
Member 13627097 7-Jul-19 21:52pm    
I have a few mapped network drive (example: X:, Y:, Z:).
But then when I Click Open button from my application.
The open dialog does not show all those network drive but only local drive. (C:)

I did tried run in debug mode and all mapped drive are showing. But when I release the software (build using Installshield), the network drive are disappear from open dialog.

Tried with EnableLinkedConnections and also off the user account, but not working.

any solution would help on this issue?
Appreciate Thanks.
Richard MacCutchan 8-Jul-19 2:32am    
The dialog should show all drives that are mapped in the user's file system. I do not have any network drives on my system so cannot test it here. Maybe if you showed us some code we may be able to spot something, but it is difficult to be certain as the problem may be unique to your system.
Member 13627097 9-Jul-19 22:22pm    
i do the log file and here is the line show the error.

lEr = RegOpenKeyExW(hKeyUser, L"Network", 0, KEY_READ|KEY_ALL_ACCESS, &hKeyNet);

returned value 2 which is file path not found. But I'm pretty sure the key is there. as running in debug mode is all ok.
Richard MacCutchan 10-Jul-19 15:07pm    
Use regedit to check the presence of the key. However, as already explained, you should not use this. The user can easily navigate to any attached network drives from the dialog.
Member 13627097 10-Jul-19 22:46pm    
have already check the key from regedit.

Any other method for this.?

I want something like when we click on Open the dialog, all the drive (local and network drive) to be show for user to select.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900