LukaszDziwisz
Hot Shot
Hot Shot

Logon/Logoff task

HEllo All,

 

I'm trying to configure either logoff or logon task that would delete all non-local printers from user profile. I have found the command:

wmic printer where "Local='FALSE'" delete

It works fine if I run it in users CMD console. So I wanted to configure it as a logoff or logon task that I can remove printers mapped to a print server that we no longer want to use. 

LukaszDziwisz_0-1646351135064.png

also tried changing the command with many flavors like:

cmd.exe /c "wmic printer where "Local='FALSE'" delete"

cmd /c "wmic printer where "Local='FALSE'" delete" 

but unfortunately it doesn't seem to be working at all. When I look at the DEM log, I see that condition was evaluated and set to True and the task ran but printers are still there.

2022-03-03 16:12:26.091 [DEBUG] Conditions: Check for computer OU = true 
2022-03-03 16:12:26.091 [INFO ] Running pre-export task ('cmd.exe /c "wmic printer where "Local='FALSE'" delete"') ('Remove ThinPrint printers.xml')

Does anybody have any idea on how to make it work? Any help would be greatly appreciated

Labels (2)
0 Kudos
2 Replies
kvmw2130
VMware Employee
VMware Employee

Hello,

 

If you intend to delete client mapped printer through ThinApp, you may use the latest Horizon client by default it would not redirect those printers.. If you are referring to VMware Horizon Integrated Printing redirection, you may use the Horizon Smart Policies feature to disable the redirection: 

 

kvmw2130_0-1646690628487.png

 

0 Kudos
LukaszDziwisz
Hot Shot
Hot Shot

It's neither of those. WE used a product called ThinPrint and now we are looking into switching to direct IP printers managed by PrinterLogic. Essentially what ThinPrint did is that it mapped them per user groups to printservers, so now to switch that around I need to remove those and then have PrinterLogic add them back as direct IP printers. 

 

I was able to make it work with Triggered Task in DEM using AppVOlumes Appstack trigger. 

Thank you for your suggestion