i have tried this solution (Unfortunately still not working in my case):
I made two different (but they do the same thing) .bat file to set printer as default, the bat file contains this string:
One called: DefaultW10.bat (for windows 10 clients) RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n "StampaSicura" (StampaSicura is the name of my Printer's Queue)
and One called: DefStampaSicura.bat containing this string: wmic printer where name='stampasicura' call setdefaultprinter
In the specific Operational Rule i've added a step called "Execute program" and added the following command: "C:\BMCTEMP\DefaultW10.bat" or "C:\BMCTEMP\DefStampaSicura.bat"
but here's comes the problem:
If i run the .bat file from local machine just clicking on it, it works perfectly, from footprints it doesn't.It doesn't generate a log and i have no way to check where the problem is.
My idea is to find a way to run that instruction with the right privilegies or in the right way, but now i have totaly 0 ideas, any suggestion?
Thank you a lot and i hope that my little guide works for you!
Because printer assignments are USER profile specific you will need to run as the current logged on user. When you just run the rule without checking the proper box it runs as system.
On the device or device group entry, where you assigned the Op Rule, right click and select properties. In the top section there is a check box that says to Run as Current User. Make sure that is checked and the rerun the test.
Are there just two steps? The reason I ask is if you are also trying to update custom inventory and you are running as Current User you may experience a permissions issue writing to the file as the current user.
Let use know if this solves your issue.
Actually these two steps are enough for me because "StampaSicura" is not a network printer or a physical one, it's just a Printer Queue.
The advice you gave me it's actually working, the fact is that i will have to deploy it on 2400+ Client so i made two different operational rules.
One is installing the driver, the other one runs the script using user's session (the script is copied with the first operational rule on every machine).
I really have to thank you, can i borrow you a coffee?
Glad I could help! I love a good cup of Coffee... Where are you located so if I am ever in your neck of the woods I can take you up on your offer?
I'm located in Italy, Milan! Glad to offer a good italian coffee!
Today i have another great issue with FP totally differnt, but i've opened a ticket with the Support... i'm pretty desperate!