quasimodo Posted November 19, 2022 Posted November 19, 2022 I have a problem to access a network file. I have one folder on an USB stick sitting direct at my Fritz!Box NAS. If I mount it with the script Run(@ComSpec & " /c " & 'NET USE Z: \\fritz.box\FRITZ.NAS\FNAS password /user:user /PERSISTENT:NO', "", @SW_HIDE) everything is fine and I can access the drive Z: without any problem. I also have a folder in an external Nextcloud server. If I mount that with the script Run(@ComSpec & " /c " & 'NET USE Z: \\fritz.box\FRITZ.NAS\FNAS password /user:user /PERSISTENT:NO', "", @SW_HIDE) I can see the new drive Q: in Explorer and I can access it with apps without Admin rights, e.g. if I open "cmd" without Admin rights a 'dir Q:' will show the content, but if I open "cmd" with Admin rights, a 'dir Q:' generates the error message 'The system cannot find path specified'. The result is, that some application will find drive Q:, others do not. How can I fix it?
abberration Posted November 19, 2022 Posted November 19, 2022 It is mapped on your user account, try also mounting the drive on the admin account, too. Easy MP3 | Software Installer | Password Manager
quasimodo Posted November 20, 2022 Author Posted November 20, 2022 Sorry, the second script is Run(@ComSpec & " /c " & 'NET USE Q: https://servername/folder/ password /user:User /PERSISTENT:NO', "", @SW_HIDE) I'm running both scripts from an account with Windows admin rights.
Gianni Posted November 20, 2022 Posted November 20, 2022 (edited) ? maybe the following link can help https://learn.microsoft.com/en-us/troubleshoot/windows-client/networking/mapped-drives-not-available-from-elevated-command Edited November 20, 2022 by Gianni Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
spudw2k Posted November 21, 2022 Posted November 21, 2022 ^ This From my experience if you map a drive with elevated perms, whether it is the same user account or not, you can not access the mapped drive without elevated perms; and vice versa. If you need to access the mapping with both elevated and non-elevated, you need to map it with both levels of privilege. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
quasimodo Posted November 23, 2022 Author Posted November 23, 2022 Thanks everybody for their hints. Concerning the MS notes, I tried it all without success. I still would like to understand, why I have no problems to access the files on my FritBoxNAS - which is in my local network - and the other files in the external network. Could that be a problem because of Nextcloud rights?
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