anguilla1980 Posted June 2, 2015 Share Posted June 2, 2015 Searching online I'm having a difficult time trying to find a sample .bat that will simply take a screenshot and immediately send it to the default printer. I guess it would need to take a screenshot that saves to the clipboard, then print the clipboard. I don't need to save the screenshot as an image file, but if I must for this to work, I'll then also need to auto delete it off the system once it's sent to the printer. Anyone have something like that they can share with me please? I will be running it on Server 2008 R2. Thanks allot in advance!!!! Link to comment Share on other sites More sharing options...
+primortal Subscriber² Posted June 2, 2015 Subscriber² Share Posted June 2, 2015 I don't think it can be easily done with a .bat file. Try this powershell script, https://gallery.technet.microsoft.com/scriptcenter/eeff544a-f690-4f6b-a586-11eea6fc5eb8 Link to comment Share on other sites More sharing options...
anguilla1980 Posted June 2, 2015 Author Share Posted June 2, 2015 I don't think it can be easily done with a .bat file. Try this powershell script, https://gallery.technet.microsoft.com/scriptcenter/eeff544a-f690-4f6b-a586-11eea6fc5eb8 Yeah, that still just takes a screenshot tho. I guess it's a start, I'll just have to figure out how to add a print command at the end of it and a command to flush the file... EDIT: NM, I see now that was added to the script already, sweet, thanks! Link to comment Share on other sites More sharing options...
+primortal Subscriber² Posted June 2, 2015 Subscriber² Share Posted June 2, 2015 Yeah, that still just takes a screenshot tho. I guess it's a start, I'll just have to figure out how to add a print command at the end of it and a command to flush the file... Read the description 26Aug2010: Added functionality to send screenshot directly to a default printer. Link to comment Share on other sites More sharing options...
anguilla1980 Posted June 2, 2015 Author Share Posted June 2, 2015 Script doesn't work at all for me. I'll have to dig into and figure out why. Link to comment Share on other sites More sharing options...
Top Qat Posted June 2, 2015 Share Posted June 2, 2015 Damn i was too slow I used http://www.nirsoft.net/utils/nircmd.html for this. nircmd savescreenshot shot.png mspaint /p shot.png del shot.png Link to comment Share on other sites More sharing options...
anguilla1980 Posted June 2, 2015 Author Share Posted June 2, 2015 Damn i was too slow I used http://www.nirsoft.net/utils/nircmd.html for this. nircmd savescreenshot shot.png mspaint /p shot.png del shot.png That worked freakin perfectly, thank you!!! I just need to figure out how to delay the screenshot (it keeps getting a shawdow of the cmd box) and then get it to print the entire screen and constrain it to fit on the page when it prints... Link to comment Share on other sites More sharing options...
Top Qat Posted June 2, 2015 Share Posted June 2, 2015 Trying to figure out where you want the delay. Try this one: nircmd cmdwait 2000 savescreenshot shot.png mspaint /p shot.png del shot.png Link to comment Share on other sites More sharing options...
anguilla1980 Posted June 3, 2015 Author Share Posted June 3, 2015 Trying to figure out where you want the delay. Try this one: nircmd cmdwait 2000 savescreenshot shot.png mspaint /p shot.png del shot.png The issue really isn't a delay issue I guess, it's the fact the cmd window from the .bat file to run that appears in the screenshot. I fixed that by creating a silent vbs script that runs the .bat Now my problem is getting a screenshot of the entire screen and not just the top left portion lol. Link to comment Share on other sites More sharing options...
sc302 Veteran Posted June 3, 2015 Veteran Share Posted June 3, 2015 switch it to a vbscript. no cmd window. Link to comment Share on other sites More sharing options...
Recommended Posts