Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
UNC paths are not supported by CMD.EXE (Read 38567 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
UNC paths are not supported by CMD.EXE
11.08.08 at 10:26:10
 
UNC paths are not supported by CMD.EXE
 
One very annoying "feature" of windows is that cmd.exe, the MSDOS command interpreter, does not support UNC paths. Double clicking a batch file (.bat) that is accessed through a UNC path (\\server\share\...) will not be able to run.
 
I found that a registry key can be used to switch off the check. Microsoft warns that it may result in processes started from the session may go wrong.
 
Use regedit to go to the the entry:
HKEY_CURRENT_USER\Software\Microsoft\Command Processor
 
Add a value:
add the value DisableUNCCheck of type REG_DWORD and set the value to 1 (Hex).  
 
I added a .reg file to import this setting easily. Use at your own risk!
 
See also:
How to start a MSDOS prompt from Windows Explorer  
http://www.oraxcel.com/cgi-bin/yabb2/YaBB.pl?num=1148046343/0
Back to top
« Last Edit: 16.08.08 at 17:08:55 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: UNC paths are not supported by CMD.EXE
Reply #1 - 11.08.08 at 10:40:53
 
It works well for me. I can start any batch (.bat) file now directly accessed using a UNC path: \\server\share\...\mybat.bat
 
Occasionally I get the message that a file could not be found. It is useful to know that the %cd% variable in a batch file contains the current path. So when a command complains it can't find the file you may want to replace:
yourcommand yourfile.abc
with
yourcommand %cd%\yourfile.abc
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1