Jump to content

Roach

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by Roach

  1. Haha well it was a good troubleshoot excercise for me Thanks for your help man rlly appreciate it, you were the light in the dark that gave me atleast some hope ps. is there somekind of easy method to read that msdn website ?? even with the code workingi n my script i dont understand it.
  2. ah Yes ! got it working !!! The Final Code : #include <IE.au3> _IEErrorHandlerRegister() $vpcApp = ObjCreate ("VirtualServer.Application", "localhost" ) MsgBox (0,"", "Func Call VirtualMachines") $vmcollection = $vpcApp.VirtualMachines For $vm in $vmCollection MsgBox (0,"", "FindVirtualMachine") $objVM = $vpcApp.FindVirtualMachine($vm.Name) MsgBox (0,"", "TurnOff") $objVM.Turnoff () MsgBox (0,"", "Unregister") $vpcApp.UnregisterVirtualMachine($objVM) Next The problem was "Localhost" at the objcreate !
  3. Good morning, got a little impatient yesterday but nothing a good night sleep cant fix I inputed an extra error handler from the other topic, this is the output : >Running:(3.3.0.0):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Vsunregister.au3" --> COM Error Encountered in Vsunregister.au3 ----> $IEComErrorScriptline = 7 ----> $IEComErrorNumberHex = 80020009 ----> $IEComErrorNumber = -2147352567 ----> $IEComErrorWinDescription = Either a required impersonation level was not provided, or the provided impersonation level is invalid. ----> $IEComErrorDescription = ----> $IEComErrorSource = ----> $IEComErrorHelpFile = ----> $IEComErrorHelpContext = 0 ----> $IEComErrorLastDllError = 0 --> COM Error Encountered in Vsunregister.au3 ----> $IEComErrorScriptline = 9 ----> $IEComErrorNumberHex = 000000A9 ----> $IEComErrorNumber = 169 ----> $IEComErrorWinDescription = Variable is not of type 'Object'. ----> $IEComErrorDescription = ----> $IEComErrorSource = ----> $IEComErrorHelpFile = ----> $IEComErrorHelpContext = 0 ----> $IEComErrorLastDllError = 0 cant make any sence of it tough.
  4. i think it may be impossible ??? read : http://www.autoitscript.com/forum/index.php?showtopic=76767&st=0&p=556148&hl=&quot;Virtual%20Server&quot;&fromsearch=1&#entry556148 Same problem as me and never could get the right code !!!!
  5. Nobody ??? hello ?? help pls
  6. i added that peace of code but dont get an error, so the function is correct. i even copyd it from the other page. the error msg : C:\Vsunregister.au3 (6) : ==> The requested action with this object has failed.: $vmcollection = $vpcApp.VirtualMachine $vmcollection = $vpcApp.VirtualMachine^ ERROR
  7. yeah i already checked that link, thing is he only does it for 1 machine wich makes it a little easyer i think. Good idea about the msgboxes. it showes the "Func Call VirtualMachines" and than it drops out with " The requested action with this object has failed"
  8. Hmm ok, thanks for trying atleast The code in .vbs form works like a charm, its has to be something into the conversion to autoit what is wrong, i just cant put my finger on it cause i dun rlly have a developers eye.. altough it is just a small code Anybody else wanna give it a try ??
  9. Tried that also, it gives following error in Autoit : --- >Running:(3.3.0.0):C:\Program Files\AutoIt3\autoit3.exe "C:\PSExec\Vsunregister.au3" C:\PSExec\Vsunregister.au3 (2) : ==> Variable must be of type "Object".: $vmCollection = $vpcApp.VirtualMachines $vmCollection = $vpcApp^ ERROR ->13:39:21 AutoIT3.exe ended.rc:1 -- And when trying to excecute on the machine : -- Line -1: Error: The requested action with this object has failed. --
  10. Hey Stefan, thanks for your reply. The script is giving me a Syntax Error : C:\PSExec\Vsunregister.au3(7,43) : ERROR: syntax error $vpcApp.UnregisterVirtualMachine(objVM) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\PSExec\Vsunregister.au3 - 1 error(s), 0 warning(s) i dont get it ? it should work ? i tryed some other syntaxes, tryed different name, do it other but i keep getting this error. i tryed the DeleteVirtualmachine syntax taken from the MSDN website but that does not work also.
  11. Hi, For work im making a "pc" cleaner. What it do : clean I.E, Stop all VPC by closing the process, than delete all the directory's associated with them. Now i want todo the same with Virtual server, so it has to stop and remove the images out of the console so we can remove them. Ive build a script (rather stole and modified ) that takes info from the virtual server, and for each item it finds removes it. On Error Resume Next Set vpcApp = CreateObject("VirtualServer.Application") Set vmCollection = vpcApp.VirtualMachines For each vm in vmCollection Set objVM = vpcApp.FindVirtualMachine(vm.Name) objVM.Turnoff() errReturn = vpcApp.UnregisterVirtualMachine(objVM) next But how do i get something like this in Autoit ? ive copy paste it in but that the .exe just hangs and does nothing. Sorry if im asking the obvious but i cant find the answer anywhere.
  12. Grabbing this 1 just printed it out and gonna go trough it tonight thanks for the hard work you have put into this !
  13. Thanks all for the quick and friendly reply's and ofcourse the tips i think im gonna like it here
  14. Hi, Are there any tutorials/guides/ tips and tricks you guys recomend for a new autoit user ?? i searched the forum and the only link i could find is not there anymore. My goals : - First auto installation of programs, Adding system ODBC stuff, adding printers etc. - Auto macro check for Syrnia (webbased game, who gives a picture with 4 numbers, than you gotta insert that into a box) <-- is that even possible ?? - later a bot for Darkfall Online, if i even get that far i dont want code, just need some help starting up, cause we all know, the beginning is the hardest
×
×
  • Create New...