Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Set the default printer for a terminal server session

Reply
Thread Tools Display Modes

Set the default printer for a terminal server session

 
 
Andrea Caldarone
Guest
Posts: n/a

 
      12-29-2009
Hi all,

I've one user, let's say "user_one" who is granted to access to a terminal
server "ts01", on this terminal server is installed for that user a printer
(shared on a third machine):

user_one is the user who logons
ts01 is the terminal server (Windows 2008)
pc01 is the pc on wich is shared the printer
hp101 is the printer name

I'm searching for a script that set \\pc01\hp101 as the default printer for
user_one, I'me trying the following:

Set WshNetwork = WScript.CreateObject("WScript.Network")
PrinterPath = "\\pc01\hp101"
WshNetwork.AddWindowsPrinterConnection PrinterPath
WshNetwork.SetDefaultPrinter PrinterPath
WScript.Quit

but the script does nothing

 
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
I also have an error 646 in Windows update. Please help. Jose Windows Update 12 01-09-2010 01:00 PM
your computer could not be joined to the domain because the follow takman_777 Windows Small Business Server 4 12-26-2009 08:16 AM
Re: SBS2003 with Server 2008 Terminal Services Larry Struckmeyer[SBS-MVP] Windows Small Business Server 0 11-25-2009 06:25 PM
Re: SBS2003 with Server 2008 Terminal Services Larry Struckmeyer[SBS-MVP] Windows Small Business Server 0 11-25-2009 05:59 PM
Help - Home Network Printer Setup User66 Windows Vista Installation 14 08-24-2007 03:40 AM



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