MrJinje Posted September 24, 2014 Posted September 24, 2014 I lose access to mapped drives when browsing for DVD folders via the Add Button. Can you remap network drives from the current session into the elevated session during open ?
MagicAndre1981 Posted September 24, 2014 Posted September 24, 2014 Set the option EnableLinkedConnections (DWORD) under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System to 1
MrJinje Posted September 25, 2014 Author Posted September 25, 2014 On every machine I plug this into ? Last I checked, it's $249 for the USB corporate version. Imagine some of my clients won't like me introducing another 24/7 security risk to their domains. Why not a loop routine during the onopen and onclose events. Temporary mapping, only for the duration of NTLite, un-map them afterwords, leaving no trace.
nuhi Posted September 25, 2014 Posted September 25, 2014 (edited) MrJinje, no reason to panic, I haven't even replied yet. So I opened NTLite on a machine which has a mapped network share as a drive, and went to Add button to browse around a little.The mapped drive is still there in Explorer. Haven't seen it in the tool's browse btw. Can you please elaborate in a little more detail how to see the effect of that issue? Edited September 25, 2014 by nuhi
MrJinje Posted September 25, 2014 Author Posted September 25, 2014 (edited) Test box is a Windows 8.1 x86 inside vmware. Opened NTLite after installation, attempted to browse. Did not see the mapped Z: drive which is mapping to shared folder on host machine. I manually mapped the drive via net use command in elevated cmd.exe window and NTLite could see the drive. Edited September 25, 2014 by MrJinje
nuhi Posted September 25, 2014 Posted September 25, 2014 Oh, so the issue is that NTLite can't see mapped drives by explorer, only by elevated CMD.If I understood you correctly, then I have replicated the issue.At first it looked to me that you said that the tool is breaking your mapped drive, which made no sense to me. Ok, I'll check what can be done regarding the browsing of mapped drives.
MagicAndre1981 Posted September 26, 2014 Posted September 26, 2014 as I said, this is by design since Vista. Enable this setting to show the drives.
nuhi Posted September 28, 2014 Posted September 28, 2014 MagicAndre1981, seems that you're right, this is not related to NTLite.http://www.winability.com/how-to-make-elevated-programs-recognize-network-drives/ If someone knows programmatically how to go around it, please let me know.
MrJinje Posted September 29, 2014 Author Posted September 29, 2014 (edited) The top key is a letter and the value "RemotePath" is the path. Those two values are all you need. Windows Registry Editor Version 5.00[HKEY_CURRENT_USER\Network][HKEY_CURRENT_USER\Network\Z]"RemotePath"="\\\\vmware-host\\Shared Folders"So from a programming stand point, just loop through HKCU\Network, look for top level keys (which are single letters), and read it's RemotePath value. Use the net mapping API as it will perform faster than "Net Use". ad infinitum OnLoad event. A second loop removes them during the OnClose event. That setting Andre mentions requires a reboot before it takes effect, re-mapping of pre-existing drives on the fly does not. The effect is instantaneous. Very easy to do. No need to make permanent settings on every machine.Net Use Z: \\vmware-host\Shared FoldersEDIT: I read the article you linked, it seems they back up my story, but for different reasons. Update for Windows 8It appears that the EnableLinkedConnections setting is not always working correctly on Windows 8: if a standard user has created a mapped network drive pointing to a subfolder of a shared folder (for example, drive Z: connected to //server/share/subfolder), then the elevated user will see the drive Z:, but it will be pointing to the root share, //server/share/, not to the subfolder. If this error creates a problem for you, then it’s better not to use the EnableLinkedConnections registry fix at all. Instead, just create the mapped network drive twice: first time using a standard user’s account, and the second time using an administrator account. Sure, it’s twice the work, but it should work correctly in all situations. Edited September 29, 2014 by MrJinje
nuhi Posted September 29, 2014 Posted September 29, 2014 (edited) MrJinje, thanks. So checking if I understood you correctly, the only way to do this is to temporarily re-map existing maps per user and unmap on exit. Hm...I appreciate the solution and will let it cook for a while. First things that come to mind to check are:- are mapped drive letters duplicated in Explorer- can we mount WIM from a shareIf you already know the answers, even better. Edited September 29, 2014 by nuhi
MrJinje Posted September 29, 2014 Author Posted September 29, 2014 (edited) 1) No they are not duplicated. 2) Yes of course. Here is a powershell snip that prints out net use commands for proof of concept.$MAPS = Get-Item HKCU:\Network\*ForEach ($MAP in $MAPS) { $KEY = ($MAP).name $UNC = (Get-ItemProperty -Path "registry::$KEY" -Name "RemotePath").RemotePath $LETTER = Split-Path -Path $KEY -Leaf Write-Host "Net Use "$LETTER": "`"$UNC`" Write-Host "Net Use "$LETTER": /DELETE /YES"} Edited September 29, 2014 by MrJinje
nuhi Posted September 29, 2014 Posted September 29, 2014 MrJinje, seems like I might need to do this one day, **** Thanks, appreciated.
MrJinje Posted September 30, 2014 Author Posted September 30, 2014 Here is an Official™ kludge for readers who cannot wait. Rename attachment to .ps1 and it will do the rest. Side effect, the %TEMP% setting no longer reverts to %APPDATA% upon open. NTLite_Starter_Tool.ps1.txt
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now