Solved

Map printer within XenApp via script

Posted on 2012-03-21
3
383 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 24

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 24

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Citrix XenDesktop 7.6 Citrix Policies Disable Peripherals
If your vDisk VHD file gets deleted from the image store accidentally or on purpose, you won't be able to remove the vDisk from the PVS console. There is a known workaround that is solid.
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.

624 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