Jump to content

Print test page fails in Vista


Recommended Posts

Hello,

This AutoIt 3 script snippet works perfectly under Windows XP to print a test page, but it fails under Vista:

CODE
$a = MsgBox(270627, "Print printer test file?", "Test your default printer by printing a test file?" & @CRLF & @CRLF & _

"If you recently installed a printer, choose Yes.")

If $a = 2 Then Exit

If $a = 6 Then

$objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate,(LoadDriver)}!\\" & @ComputerName & "\root\cimv2")

$colInstalledPrinters = $objWMIService.ExecQuery ("Select * from Win32_Printer Where Default = True")

For $objPrinter In $colInstalledPrinters

$uResult = $objPrinter.PrintTestPage ()

Next

$a = MsgBox(270401, "Printing", "Please wait.")

If $a = 2 Then Exit

EndIf

Does anyone know a way of making it work under Vista?

Many thanks...

EDIT: Removed Func and EndFunc to make it standalone code that "just works" under XP, but does nothing under Vista (final code).

Edited by Edward Mendelson
Link to comment
Share on other sites

The code snippet I posted above is for an AutoIt 3 script (tested in beta and shipping versions). This is an AutoIt 3 support forum, and I assumed that it would be clear that I was writing about AutoIt 3 code running in Vista. Is there something essential that I haven't said?

To make it clear what programming language I'm using: The code snippet here is an AutoIt 3 script, not anything else.

(I suppose I should be grateful for all these replies, because they keep this thread near the top of the list. But I'm not sure that any actual *information* was added at any point along the way.)

Edited by Edward Mendelson
Link to comment
Share on other sites

Alot of people have had problems with some of their scripts in Vista, but do remember that Vista is still beta. Its the same with a program called Game Maker.

Can you please not spread misinformation like this? There are not a lot of people have trouble with Vista and you well know Vista is not in beta any longer. If you're going to try to help - help, don't confuse things further like you've done in this thread. And saying only some languages work on Vista? What kind of delusional crap is that?

Link to comment
Share on other sites

Can you please not spread misinformation like this? There are not a lot of people have trouble with Vista and you well know Vista is not in beta any longer. If you're going to try to help - help, don't confuse things further like you've done in this thread. And saying only some languages work on Vista? What kind of delusional crap is that?

The other piece of misinformation is that only RC1/RC2 are available at MSDN. Final code has been available to paying MSDN members for weeks. (It's not available as a free download; it's available to subscribers).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...