Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



CMD and UNC Paths in Login Script

Windows Server Help


Reply
 
Thread Tools Search this Thread
  #1  
Old 03-11-2005
David
 
Posts: n/a
CMD and UNC Paths in Login Script

I am running a .cmd file as a login script on Domain Controllers.

The script works fine on 2k boxes but every time it runs on a 2k3 box, the
following error message appears:

CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.


The script still runs fine, but is there any way i can get rid of this error
message?


Thanks!



Reply With Quote
  #2  
Old 03-11-2005
Jerold Schulman
 
Posts: n/a
Re: CMD and UNC Paths in Login Script

Add the following to the logon script:

REG ADD "HKCU\Software\Microsoft\Command Processor" /V DisableUNCCheck /T REG_DWORD /F /D 1

The second time it runs for a user, the message will be gone.

NOTE: REG.EXE is built into Windows XP and Windows Server 2003.
It is installed on Windows 2000 from the Support Tools folder on the Windows 2000 CD-ROM.

Alternately, store the following DisUNCCK.reg file in the netlogon share of each DC:
REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"DisableUNCCheck"=dword:00000001

In the logon script, add
regedit /s %LOGONSERVER%\NETLOGON\DisUNCCK.reg
Reply With Quote
  #3  
Old 07-11-2005
ThorstenK
 
Posts: n/a
Re: CMD and UNC Paths in Login Script

perhaps just beginn the script with a "cls" to get rid of the message.
Reply With Quote
  #4  
Old 08-11-2005
Al Dunbar
 
Posts: n/a
Re: CMD and UNC Paths in Login Script

That's what we do, and nobody has complained yet about it.
Reply With Quote
  #5  
Old 08-11-2005
Mark V
 
Posts: n/a
Re: CMD and UNC Paths in Login Script

That's interesting Jerold. XP, W2K3 only?
It seems not to have yet made it into a Tip. At least, a search on
DisableUNCCheck
does not hit.
Reply With Quote
  #6  
Old 08-11-2005
Michael Harris \(MVP\)
 
Posts: n/a
Re: CMD and UNC Paths in Login Script

Cmd.exe does not support UNC names as the current directory

http://support.microsoft.com/?kbid=156276

from a google search for DisableUNCCheck ...
Reply With Quote
  #7  
Old 09-11-2005
Jerold Schulman
 
Posts: n/a
Re: Re: CMD and UNC Paths in Login Script

All versions of NT, from NT 4.0 - NT 5.2 (and beyond).
It will make the tips soon.
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "CMD and UNC Paths in Login Script"
Thread Thread Starter Forum Replies Last Post
Script to change User Profile paths gram Windows Server Help 4 10-05-2010 11:37 PM
WAP login script in php Steinbach Software Development 3 14-04-2009 09:22 AM
Where to place login script Jame-Son Active Directory 2 25-11-2008 07:44 PM
to add username & password into my login.cmd - login script sphilip Windows Server Help 4 05-03-2008 10:04 PM
Startup Script or Login Script ?? WANNABE Active Directory 5 22-12-2006 06:44 PM


All times are GMT +5.5. The time now is 09:04 AM.