emendelson Posted December 10, 2006 Share Posted December 10, 2006 (edited) 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 December 10, 2006 by Edward Mendelson Link to comment Share on other sites More sharing options...
James Posted December 10, 2006 Share Posted December 10, 2006 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. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
emendelson Posted December 10, 2006 Author Share Posted December 10, 2006 The final (non-beta) version of Vista has been available to developers for a few weeks. Unfortunately, the code I posted doesn't work with the final version of Vista (I never tested it with the beta versions). Link to comment Share on other sites More sharing options...
James Posted December 10, 2006 Share Posted December 10, 2006 Yes, but it also depends on what language thats for. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
emendelson Posted December 10, 2006 Author Share Posted December 10, 2006 Do you mean which language version of Vista I'm using? It's US English. Link to comment Share on other sites More sharing options...
James Posted December 10, 2006 Share Posted December 10, 2006 No I mean the programming Language. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
emendelson Posted December 10, 2006 Author Share Posted December 10, 2006 (edited) 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 December 10, 2006 by Edward Mendelson Link to comment Share on other sites More sharing options...
James Posted December 10, 2006 Share Posted December 10, 2006 Yeah, I said the Vista release (developers) sorta only works for some programming languages, but it doesnt matter. Just ignore that bit I guess. I have just installed Vista on my desktop(with printer) so I will try it now, and see if I can get anything to work. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
theguy0000 Posted December 10, 2006 Share Posted December 10, 2006 where are people getting free vista anyway? (meaning release version) because I sure would like to try it out The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
James Posted December 10, 2006 Share Posted December 10, 2006 Its crap and slow! But if you accept me on msn, I can give you the link. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
emendelson Posted December 10, 2006 Author Share Posted December 10, 2006 Vista final code is available to developers who subscribe to MSDN (msdn.microsoft.com). Link to comment Share on other sites More sharing options...
James Posted December 10, 2006 Share Posted December 10, 2006 But you can just get Vista Beta RC1/2 I think its still available. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Valik Posted December 11, 2006 Share Posted December 11, 2006 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 More sharing options...
emendelson Posted December 11, 2006 Author Share Posted December 11, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now