/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


Printer Script

05/18/2017 733 views
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

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
  • This content is currently hidden from public view.
    Reason: Removed by member request For more information, visit our FAQ's.
  • thanks this worked fine

All Answers

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
Answered 05/19/2017 by: Desktop Jockey
Second Degree Green Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
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