Re: net use script issue with terminal server and DFS
- From: "jolteroli" <jolt1976@xxxxxxx>
- Date: Thu, 11 Dec 2008 19:40:31 +0100
the "net use z: /D" removes the mapping of drive z:. the following "1>nul" and "2>&1" is IO redirection. the redirections have to be read from right2left:
1.) redirect stderr (2) into stdout (1)
2.) redirect stdout (1) into NUL
in fact, the whole output stdout/stderr of the "net use ..." command will be redirected to NUL, the byte eater. this is a common method to supress warning and errors.
what seems odd to me, is the colon right after NUL, anyone an idea?
i would suggest, you remove the "1>NUL: 2>&1" and run the script again. you'll see the error message of "net use ..." if the command doesn't block. finally you can try to delete the just the colon.
if it still blocks, then try to manually remove the Z: mapping via explore and logoff the user. may be there is a problem in the unmapping process.
-jolt
"Luca Grazioli" <LucaGrazioli@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag news:06158CA6-9FD0-4C30-965A-2F95CCB960C8@xxxxxxxxxxxxxxxx
Hi Vera,
ok i've done that u have suggested. I've disabled usrlogon.cmd and the user
is logged correctly. So i've tried to run usrlogon.cmd (rem @echo off) with
the terminal server user. this is the copy of the command:
C:\WINDOWS\Application Compatibility Scripts>Set RootDrive=Z:
C:\WINDOWS\Application Compatibility Scripts>If "AZ:A" == "AA" End.Cmd
C:\WINDOWS\Application Compatibility Scripts>Rem
C:\WINDOWS\Application Compatibility Scripts>Rem Map the User's Home
Directory to a Drive Letter
C:\WINDOWS\Application Compatibility Scripts>Rem
C:\WINDOWS\Application Compatibility Scripts>Net Use Z: /D 1>NUL: 2>&1
it stops here!
----------------------------------------------------------------------------------------
Tnx!
"Vera Noest [MVP]" wrote:
No, a failed net use command won't generate an event in the
EventLog.
But it should give you an error message when you execute the same
command interactively. Temporarily disable usrlogon.cmd (you can
put an "exit" command on the first line to do so), logon as a
normal user and execute the failing command from a command prompt.
_________________________________________________________
Vera Noest
MCSE, CCEA, Microsoft MVP - Terminal Server
TS troubleshooting: http://ts.veranoest.net
___ please respond in newsgroup, NOT by private email ___
=?Utf-8?B?THVjYSBHcmF6aW9saQ==?=
<LucaGrazioli@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote on 10 dec 2008 in
microsoft.public.windows.terminal_services:
> there is no error message, nothing in the ts's ev, nothing in
> the dc's ev. Simply a usrlogon.cmd black window that, if the
> user doesnt close it, the desktop doesnt appear...
>
> "Vera Noest [MVP]" wrote:
>
>> When it doesn't work, what is the error message?
>> _________________________________________________________
>> Vera Noest
>> MCSE, CCEA, Microsoft MVP - Terminal Server
>> TS troubleshooting: http://ts.veranoest.net
>> ___ please respond in newsgroup, NOT by private email ___
>>
>> =?Utf-8?B?THVjYSBHcmF6aW9saQ==?=
>> <LucaGrazioli@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote on 10 dec 2008
>> in microsoft.public.windows.terminal_services:
>>
>> > Hi Vera and tnx for your reply :-)
>> >
>> > So...i've done other tests and the problem seems to be in the
>> > path of the unit mapped like home directory (in the terminal
>> > server profile). So: the script, with DFS path, runs; the
>> > profile, with DFS path, is ok; the unit (Z:), mapped like
>> > home directory, doesn't work only if i use the dfs path (in
>> > this case i have blue screen and usrlogon.cmd window). If i
>> > change it with a direct path there is no problem. Ah! the
>> > issue is only with a ts server the other works fine.
>> >
>> > thank u!
>> >
>> > Luca
>> >
>> >
>> > "Vera Noest [MVP]" wrote:
>> >
>> >> It seems that the server is hanging on a command in
>> >> usrlogon.cmd. Open the file in notepad and check for any
>> >> paths that are incorrect.
>> >> If there's an "echo off" command at the top of the file, you
>> >> can temporarily comment that out, which will enable you to
>> >> see any error messages that are produced.
>> >> _________________________________________________________
>> >> Vera Noest
>> >> MCSE, CCEA, Microsoft MVP - Terminal Server
>> >> TS troubleshooting: http://ts.veranoest.net
>> >> ___ please respond in newsgroup, NOT by private email ___
>> >>
>> >> =?Utf-8?B?THVjYSBHcmF6aW9saQ==?=
>> >> <LucaGrazioli@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote on 09 dec
>> >> 2008 in microsoft.public.windows.terminal_services:
>> >>
>> >> > Hi guys,
>> >> >
>> >> > i've 2 win 2003 terminal server (1 r2 ent version and 1
>> >> > std version). Only with the standard version there's a
>> >> > problem with the logon script. The script starts but the
>> >> > desktop become blue and only a command window (nothing
>> >> > inside) appears, the title is "usrlogon.cmd". If i close
>> >> > this windows the desktop appears correctly but the net use
>> >> > mapping doesn't run. With the other ts server there is no
>> >> > problem.
>> >> >
>> >> > the problem is started when i've activeted the DFS on
>> >> > another win 2003 ent rs server.
>> >> >
>> >> > Any idea?
>> >> >
>> >> > Tnx
.
- Follow-Ups:
- Re: net use script issue with terminal server and DFS
- From: Vera Noest [MVP]
- Re: net use script issue with terminal server and DFS
- References:
- net use script issue with terminal server and DFS
- From: Luca Grazioli
- Re: net use script issue with terminal server and DFS
- From: Vera Noest [MVP]
- Re: net use script issue with terminal server and DFS
- From: Luca Grazioli
- Re: net use script issue with terminal server and DFS
- From: Vera Noest [MVP]
- Re: net use script issue with terminal server and DFS
- From: Luca Grazioli
- Re: net use script issue with terminal server and DFS
- From: Vera Noest [MVP]
- Re: net use script issue with terminal server and DFS
- From: Luca Grazioli
- net use script issue with terminal server and DFS
- Prev by Date: Exchange 2003 Outlook 2007 on Terminal Services Domain Controller Options
- Next by Date: RE: 2008 Terminal server stops accepting connections and is solved onl
- Previous by thread: Re: net use script issue with terminal server and DFS
- Next by thread: Re: net use script issue with terminal server and DFS
- Index(es):
Relevant Pages
|