Solved

Map printer within XenApp via script

Posted on 2012-03-21
3
368 Views
Last Modified: 2012-04-06
Hi,

I have a XenApp 6 server to which I need to add shares & printers.
Shares is no problem via vb-script, however, the printers are not appearing.

I use
MapPrinter "\\ipofserver\printername

Please advise how to troubleshoot/correct.

J.
0
Comment
Question by:janhoedt
  • 2
3 Comments
 

Author Comment

by:janhoedt
ID: 37747292
Ok, I found out howto via policies: http://www.grouppolicy.biz/tag/printer/.

Now how to remove the printers which are already there?
print
0
 
LVL 23

Accepted Solution

by:
Dirk Kotte earned 500 total points
ID: 37748920
you can use "rundll32 printui.dll,PrintUIEntry ..." (rundll32 printui.dll,PrintUIEntry /?) from commandline to add or remove printers at device or user-level.

Also searching,mapping,removing printers within vbs are possible.
0
 
LVL 23

Assisted Solution

by:Dirk Kotte
Dirk Kotte earned 500 total points
ID: 37748979
try this:

Option Explicit
Dim netPrinter, UNCpath
UNCpath = "\\YourServer\PrinterName"
Set netPrinter = CreateObject("WScript.Network")
netPrinter.AddWindowsPrinterConnection UNCpath
 WScript.Echo "Your printer is mapped from : " & UNCpath
 WScript.Quit

or try to use MapPrinter with a variable...
strUNC = "\\PrintSRV\printer01"
MapPrinter strUNC
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several days of searching and hunting for limited documentation, I wanted to share this guide to hopefully save someone the hassle of trying to figure this out on their own. I have tested this on Xendesktop 7.1 and PS 4.5 running simultaneous…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now