Script crashes Photoshop when Print Spooler is not running

A Listing of Confirmed Scripting Bugs and Anomalies - Open to all but only moderators can post

Moderators: Tom, Kukurykus

Ricardo
Posts: 1
Joined: Mon Jul 12, 2021 2:48 am

Script crashes Photoshop when Print Spooler is not running

Post by Ricardo »

Just a heads-up: this simple script will crash Photoshop if the "Print Spooler" service is not running (tested on Windows 10 20H2 and Photoshop 20.0.1):

Code: Select all

var r=new ActionReference()
r.putEnumerated(charIDToTypeID('Dcmn'),charIDToTypeID('Ordn'),charIDToTypeID('Trgt'))
var d=executeActionGet(r)
It might be relevant, since last week Microsoft was suggesting to stop that service in order to prevent the "PrintNightmare" vulnerability
User avatar
Kukurykus
Posts: 528
Joined: Mon Jul 25, 2016 12:36 pm

Re: script crashing Photoshop when Print Spooler not running

Post by Kukurykus »

Wow, you are right - how you found it. That is very unintuitive! I just tested it and I'm surprised it crashes Photoshop, though I don't see how that process is related to Action Manager document properties :/ Documents surely may be printed, so probably AM initiates / checks / looks for some informations by this simple code in Windows, from which one of them is that for printing.

For those who'd like to test it themselves use Enabling the Print Spooler Service in Windows | HP Printers | HP to find Print Spooler service and stop it instead of restarting. Then try the provided code on an open document. My Photoshop release is 22.4.2. In CS6 that does not occur.