Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Terminal users default printer not staying desfault.

Reply
Thread Tools Display Modes

Terminal users default printer not staying desfault.

 
 
saveoncomputers@yahoo.com
Guest
Posts: n/a

 
      08-02-2008
I use terminial servers with network printers. All users can use any printer
but they set their own default printer. The default printer is lost when they
log off.
On 2003 server, I created the logon and logoff script below:

Logon Script:
REG IMPORT \\server\DefaultPrinters\%clientname%.reg

Logoff Script:

DEL \\server\DefaultPrinters\%clientname%.reg /q

reg export "HKCU\Software\Microsoft\Windows NT\Currentversion\Windows"
\\server\DefaultPrinters\%clientname%.reg

This works great in 2003 but in 2008, the %clientname% variable is not
created while the logon scripte is run. And, it dissappears before the logoff
scrip is started.

IN 2008 I put the logon script in the Startup so it runs and gets the
%clientnamen% correctly but I don't know how to run a logoff script before
the %clientname% dissappears...

Qusetion:
How do I retain the default printer set by the user from one terminal
session to the next.
Does anyone have a way to perform this function in 2008 or another way to
achieve this goal?

Thanks,
Robert
 
Reply With Quote
 
 
 
 
saveoncomputers@yahoo.com
Guest
Posts: n/a

 
      08-03-2008

It was a pain in the @#$ but I found a workaround. This works for 2008
server.

Logon Script:
REM The following lines create a batch file to be run at logoff that will
create a reg file to be imported at next logon.
IF NOT %USERDOMAIN%==Domain GOTO :END
md \\server\defaultprinter\%username%
REG IMPORT \\server\defaultprinter\%clientNAME%.reg
echo REG export "HKCU\Software\Microsoft\Windows NT\Currentversion\Windows"
\\server\defaultprinter\%clientNAME%.reg >
\\server\defaultprinter\%userNAME%\defaultPrinter. cmd /Y
:END

Logoff Script:
REM Call the batch file that was created during logon.
IF NOT %USERDOMAIN%==Domain GOTO :END
call \\server\defaultprinter\%userNAME%\defaultPrinter. cmd
:END

Thanks
Robert

"" wrote:

> I use terminial servers with network printers. All users can use any printer
> but they set their own default printer. The default printer is lost when they
> log off.
> On 2003 server, I created the logon and logoff script below:
>
> Logon Script:
> REG IMPORT \\server\DefaultPrinters\%clientname%.reg
>
> Logoff Script:
>
> DEL \\server\DefaultPrinters\%clientname%.reg /q
>
> reg export "HKCU\Software\Microsoft\Windows NT\Currentversion\Windows"
> \\server\DefaultPrinters\%clientname%.reg
>
> This works great in 2003 but in 2008, the %clientname% variable is not
> created while the logon scripte is run. And, it dissappears before the logoff
> scrip is started.
>
> IN 2008 I put the logon script in the Startup so it runs and gets the
> %clientnamen% correctly but I don't know how to run a logoff script before
> the %clientname% dissappears...
>
> Qusetion:
> How do I retain the default printer set by the user from one terminal
> session to the next.
> Does anyone have a way to perform this function in 2008 or another way to
> achieve this goal?
>
> Thanks,
> Robert

 
Reply With Quote
Reply

Thread Tools
Display Modes

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
default printer on terminal server miki Scripting 0 06-25-2007 08:04 PM
Anybody else's default printer not staying default? Chris S Internet Explorer 8 11-12-2006 03:38 AM
Re: Anybody else's default printer not staying default? Robert Aldwinckle Windows Vista Printing / Faxing / Scanning 1 10-04-2006 01:28 AM
default printer setup in terminal services Rob H Windows Small Business Server 1 07-29-2005 10:20 AM
Terminal Services Default Printer Changes Joe Windows Server 0 08-02-2004 12:54 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59