PC Review


Reply
Thread Tools Rate Thread

CMD and UNC Paths in Login Script

 
 
David
Guest
Posts: n/a
 
      3rd Nov 2005
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
 
 
 
 
Jerold Schulman
Guest
Posts: n/a
 
      3rd Nov 2005
On Thu, 3 Nov 2005 14:56:26 -0000, "David" <(E-Mail Removed)> wrote:

>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!
>


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

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 
Reply With Quote
 
ThorstenK
Guest
Posts: n/a
 
      7th Nov 2005
perhaps just beginn the script with a "cls" to get rid of the message.

"David" <(E-Mail Removed)> schrieb im Newsbeitrag
news:436a251b$0$48889$(E-Mail Removed)...
>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
 
Al Dunbar
Guest
Posts: n/a
 
      8th Nov 2005

"ThorstenK" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> perhaps just beginn the script with a "cls" to get rid of the message.


That's what we do, and nobody has complained yet about it.

/Al

> "David" <(E-Mail Removed)> schrieb im Newsbeitrag
> news:436a251b$0$48889$(E-Mail Removed)...
>>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
 
Mark V
Guest
Posts: n/a
 
      8th Nov 2005
In microsoft.public.win2000.cmdprompt.admin Jerold Schulman wrote:

> On Thu, 3 Nov 2005 14:56:26 -0000, "David" <(E-Mail Removed)>
> wrote:
>
>>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.

[ ]

> Add the following to the logon script:
>
> REG ADD "HKCU\Software\Microsoft\Command Processor" /V
> DisableUNCCheck /T REG_DWORD /F /D 1


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
 
Michael Harris \(MVP\)
Guest
Posts: n/a
 
      8th Nov 2005
> ... At least, a search on
> DisableUNCCheck
> does not hit.



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

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

from a google search for DisableUNCCheck ...

--
Michael Harris
Microsoft MVP Scripting




 
Reply With Quote
 
Jerold Schulman
Guest
Posts: n/a
 
      9th Nov 2005
On Mon, 07 Nov 2005 23:15:25 -0500, Mark V <(E-Mail Removed)> wrote:

>In microsoft.public.win2000.cmdprompt.admin Jerold Schulman wrote:
>
>> On Thu, 3 Nov 2005 14:56:26 -0000, "David" <(E-Mail Removed)>
>> wrote:
>>
>>>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.

>[ ]
>
>> Add the following to the logon script:
>>
>> REG ADD "HKCU\Software\Microsoft\Command Processor" /V
>> DisableUNCCheck /T REG_DWORD /F /D 1

>
>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.
>[ ]


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

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I run a VB Script that requires a response during login script david_berger@nebf.com Microsoft Windows 2000 1 23rd Jan 2007 09:08 PM
I need to run my own script AFTER network login script =?Utf-8?B?ZG1vbnRhbGRv?= Windows XP New Users 1 6th Dec 2005 06:55 PM
login script default to user login name =?Utf-8?B?RG9uIERvZXJy?= Microsoft Windows 2000 Setup 3 8th Jun 2005 10:51 PM
Running a login script only when the script has changed =?Utf-8?B?TXIgQnJvd25zdG9uZQ==?= Microsoft Windows 2000 CMD Promt 4 19th May 2004 01:26 PM
Help with script for changing all profile paths Chris Knoche Microsoft Windows 2000 Active Directory 1 16th Sep 2003 08:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:42 PM.