Jump to content

Recommended Posts

Posted (edited)

Hi all ¡¡

I have a script for activate windows.

$objWMI = ObjGet("winmgmts:\\localhost\root\CIMV2");

$ColItems = $objWMI.ExecQuery("Select * from Win32_WindowsProductActivation", "WQL", 0x10 + 0x20);

For $objItem In $ColItems

$var = $objItem.ActivationRequired ;$var is the value of the activation

Next;********AFTHER THIS NEXTN THE FUNCTION RESTARTS ONE TIME,AFTHER THAT IT CAN PASS THE NEX...Finally, afther, it not respects the end function and the function restarts ¿?

more code

more code

endfunc

thanks all and sorry to my bad english ¡¡¡¡ Edited by muralla
Posted

Hi all ¡¡

I have a script for activate windows.

thanks all and sorry to my bad english ¡¡¡¡

for $objitm in $colitems

$activado=$objitm.activateonline()

next

end func

This restarts ever the function if you dont have for example, conection to activate windows...

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
  • Recently Browsing   0 members

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