/build/static/layout/Breadcrumb_cap_w.png

Printer Script

Hello, i have setup a online kscript to install a Printer as the logged on user, on a schedule for every 20mins and attempts 1.
the script launches a program directory=SYS and filename =cmd.exe, parameters =/C rundll32 printui.dll,PrintUIEntry /q /in /n \\PrintServer\nameOfPrinter and wait for completion is ticked and visable is unticked.

As i say this works fine, but this keeps running every 20mins, i know it keeps running as a popup appears installing the same Printer.
This Printer is then not listed in the device inventory under Printers, is this why it keeps installing?

Is there a way to stop this, so that it runs once on sucess dont run again?

Thanks


2 Comments   [ + ] Show comments
  • I would run a verify first:
    Verify that registry key exists or not:
    HKEY_CURRENT_USER\Printers\Connections\BlahBlahBlah
    Then If it does not exist, Run your Printer add:
    rundll32 printui.dll,PrintUIEntry /q /in /n \\Your Printer - Desktop Jockey 6 years ago
  • thanks this worked fine - markc0 6 years ago

Answers (1)

Posted by: Desktop Jockey 6 years ago
Second Degree Green Belt
0
I would run a verify first:
Verify that registry key exists or not:
HKEY_CURRENT_USER\Printers\Connections\BlahBlahBlah
Then If it does not exist, Run your Printer add:
rundll32 printui.dll,PrintUIEntry /q /in /n \\Your Printer
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ