Xenobiologist Posted February 21, 2006 Share Posted February 21, 2006 (edited) Hi,maybe some people could use it and do not look into the Idea Lap area. So, here it is : Link to threadSo long,MegaP.S.. Hope that is NO double posting Edited February 23, 2006 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
masvil Posted February 22, 2006 Share Posted February 22, 2006 Ehi, your script is great! Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 23, 2006 Author Share Posted February 23, 2006 Ehi, your script is great!Thanks, if you´ve got some ideas for improving or you miss some information, let me know. So long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
jaenster Posted February 23, 2006 Share Posted February 23, 2006 Uber cool -jaenster Link to comment Share on other sites More sharing options...
BigDod Posted February 25, 2006 Share Posted February 25, 2006 Thanks, if you´ve got some ideas for improving or you miss some information, let me know. So long,MegaHere is an idea for you. It would be good if your script could find the Microsoft Office product key as well. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Mosquitos Posted February 25, 2006 Share Posted February 25, 2006 Here is an idea for you. It would be good if your script could find the Microsoft Office product key as well.Thats a good idea.Like jellybean keyfinder Sapiente vince, rex, noli vincere ferro! Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 26, 2006 Author Share Posted February 26, 2006 (edited) Hi, thanks for your replies. That should be possilbe. I´ll work on that maybe at wednesday. Now I´m gonna celebrate carnival. Helau Alaaf! So long, Mega Maybe only Office 2003 should be enough?!??? Edited February 27, 2006 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
raquien Posted February 28, 2006 Share Posted February 28, 2006 Got this error in Line 70 $colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem") $colSettings = $objWMIService.E^ ERROR Error: Unable to parse line. Link to comment Share on other sites More sharing options...
Xenobiologist Posted March 5, 2006 Author Share Posted March 5, 2006 Got this error in Line 70$colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")$colSettings = $objWMIService.E^ ERRORError: Unable to parse line.HI,I cannot re-enact this error. Works fine for me. I also released a new Version, now the OfficeKey is included. Hope you´ll like it.So long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
miko0001 Posted March 7, 2006 Share Posted March 7, 2006 Got this error in Line 70 $colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem") $colSettings = $objWMIService.E^ ERROR Error: Unable to parse line. Same to me ... Another (VBS)-Script with an equal expression works fine on my machine ... strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colOperatingSystems = objWMIService.ExecQuery _ ("Select * from Win32_OperatingSystem") First thought was WMI not enabled, because i use a "nlited"-version of Win XP Pro,but thats not the problem. I want to create a "GUI-attended" Windows Setup-CD/DVD with a "PostInstall"-Menue to install further drivers/Software/Addons , adding Sys-Info to my AutoIT-created PostInstall-GUI. But i´m a NOOB :"> Thx. Miko Link to comment Share on other sites More sharing options...
Xenobiologist Posted March 7, 2006 Author Share Posted March 7, 2006 Same to me ... Another (VBS)-Script with an equal expression works fine on my machine ... strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colOperatingSystems = objWMIService.ExecQuery _ ("Select * from Win32_OperatingSystem") First thought was WMI not enabled, because i use a "nlited"-version of Win XP Pro,but thats not the problem. I want to create a "GUI-attended" Windows Setup-CD/DVD with a "PostInstall"-Menue to install further drivers/Software/Addons , adding Sys-Info to my AutoIT-created PostInstall-GUI. But i´m a NOOB :"> Thx. Miko Hi, the problem was already answered in the other thread. You need beta. And you need to compile it with beta version! Hi, If you are using Scite you pressed ALT+F5 which means Beta-Run. That should work. When you compile the au3. file you have to use compile (bata) script to exe from the beta folder of autoit-installation. Hope that helps and you like the script. Edit: Besides, I would always toggle to beta. :-) So long, Mega So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
miko0001 Posted March 7, 2006 Share Posted March 7, 2006 Hi,the problem was already answered in the other thread. You need beta. And you need to compile it with beta version!So long,MegaThx, now it works. Link to comment Share on other sites More sharing options...
Mosquitos Posted March 7, 2006 Share Posted March 7, 2006 (edited) If you don't mind i changed the gui a little bit :"> ; ----------------------------------------------------------------------------;; AutoIt Version: 3.1.1 beta; Author: Thorsten Meger & ...;; Script Function:; Windows XP Information displayed in a Gui;; ----------------------------------------------------------------------------#include <GUIConstants.au3>$GUI = GUICreate("", 380, 315, -1, -1)GUISetFont(9, 700, -1, "MS Sans Serif")$windowsInformation_L = GUICtrlCreateLabel(" Windows Information", 5, 3, 290, 25)$status_L = GUICtrlCreateLabel("Information read ...", 20, 280, 200, 20)$description_L = GUICtrlCreateLabel("Description", 20, 58, 100, 20)$windowsType_L = GUICtrlCreateLabel("WindowsType", 20, 83, 100, 20)$serialNumber_L = GUICtrlCreateLabel("SerialNumber", 20, 108, 100, 20)$ProductKey_L = GUICtrlCreateLabel("ProductKey", 20, 133, 100, 20)$InstallDate_L = GUICtrlCreateLabel("InstallDate", 20, 158, 100, 20)$LastBootUpTime_L = GUICtrlCreateLabel("LastBootUpTime", 20, 183, 100, 20)$RegisteredOwner_L = GUICtrlCreateLabel("RegisteredOwner", 20, 208, 100, 20)$officeKey_L = GUICtrlCreateLabel("OfficeKey", 20, 233, 100, 20)$description_I = GUICtrlCreateInput("", 125, 55, 235, 20)$windowsType_I = GUICtrlCreateInput("", 125, 80, 235, 20)$serialNumber_I = GUICtrlCreateInput("", 125, 105, 235, 20)$ProductKey_I = GUICtrlCreateInput("", 125, 130, 235, 20)$InstallDate_I = GUICtrlCreateInput("", 125, 155, 235, 20)$LastBootUpTime_I = GUICtrlCreateInput("", 125, 180, 235, 20)$RegisteredOwner_I = GUICtrlCreateInput("", 125, 205, 235, 20)$officeKey_I = GUICtrlCreateInput("", 125, 230, 235, 20)$informationPanel_G = GUICtrlCreateGroup("Information Panel", 10, 35, 360, 225)$status_G = GUICtrlCreateGroup("Status", 10, 265, 360, 40)$font = "Comic Sans MS"GUICtrlSetColor($windowsInformation_L, 0xff0000)GUICtrlSetFont($windowsInformation_L, 16, 700, 4, $font)$progressbar = GUICtrlCreateProgress(140, 278, 220, 20)Global $product = ""Global $counter = 3Global $wait = 150GUISetState(@SW_SHOW)While 1$msg = GUIGetMsg()If $counter = 3 ThenSleep(1000)GUICtrlSetData($status_L, "Initialize ... " & $counter)progress()$counter -= 1ElseIf $counter = 2 ThenGUICtrlSetData($status_L, "Initialize ... " & $counter)progress()$counter -= 1ElseIf $counter = 1 ThenGUICtrlSetData($status_L, "Initialize ... " & $counter)progress()$counter -= 1ElseIf $counter = 0 ThenGUICtrlSetData($status_L, "Ready ...")progress()$counter -= 1ElseIf $counter = -1 ThenDim $Bin = RegRead("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersion", "DigitalProductID")Dim $key4RegisteredOwner = "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersion"$objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!.rootcimv2")$colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")For $objOperatingSystem In $colSettingsNextGUICtrlSetData($description_I, StringMid($objOperatingSystem.Description, 1))GUICtrlSetData($windowsType_I, '(' & @OSVersion & ') ' & StringMid($objOperatingSystem.Caption, 19))GUICtrlSetData($serialNumber_I, StringMid($objOperatingSystem.SerialNumber, 1))GUICtrlSetData($ProductKey_I, DecodeProductKey($Bin))GUICtrlSetData($InstallDate_I, WMIDateStringToDate($objOperatingSystem.InstallDate))GUICtrlSetData($LastBootUpTime_I, WMIDateStringToDate($objOperatingSystem.LastBootUpTime))GUICtrlSetData($RegisteredOwner_I, RegRead($key4RegisteredOwner, "RegisteredOwner"))GUICtrlSetData($officeKey_I, getOfficeKey())GUICtrlSetData($officeKey_L, "Office " & $product)$counter -= 1ElseIf $counter < - 1 ThenSelectCase $msg = $GUI_EVENT_CLOSEGUICtrlSetState($progressbar, $GUI_HIDE)GUICtrlSetData($status_L, "Goodbye My Lover")Sleep(2000)ExitLoopEndSelectEndIfWEndExitFunc DecodeProductKey($BinaryDPID)Local $bKey[15]Local $sKey[29]Local $Digits[24]Local $Value = 0Local $hi = 0Local $n = 0Local $i = 0Local $dlen = 29Local $slen = 15Local $Result$Digits = StringSplit("BCDFGHJKMPQRTVWXY2346789", "")$BinaryDPID = StringMid($BinaryDPID, 105, 30)For $i = 1 To 29 Step 2$bKey[int($i / 2) ] = Dec(StringMid($BinaryDPID, $i, 2))NextFor $i = $dlen - 1 To 0 Step - 1If Mod(($i + 1), 6) = 0 Then$sKey[$i] = "-"Else$hi = 0For $n = $slen - 1 To 0 Step - 1$Value = BitOR(BitShift($hi, -8), $bKey[$n])$bKey[$n] = Int($Value / 24)$hi = Mod($Value, 24)Next$sKey[$i] = $Digits[$hi + 1]EndIfNextFor $i = 0 To 28$Result = $Result & $sKey[$i]NextReturn $ResultEndFuncFunc WMIDateStringToDate($dtmDate)Return (StringMid($dtmDate, 7, 2) & "/" & _StringMid($dtmDate, 5, 2) & "/" & StringLeft($dtmDate, 4) _& " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate, 13, 2))EndFuncFunc progress()If $counter = 3 ThenFor $i = 0 To 20 Step 1GUICtrlSetData($progressbar, $i)Sleep($wait / 20)NextElseIf $counter = 2 ThenFor $i = 20 To 50 Step 1GUICtrlSetData($progressbar, $i)Sleep($wait / 30)NextElseIf $counter = 1 ThenFor $i = 50 To 80 Step 1GUICtrlSetData($progressbar, $i)Sleep($wait / 30)NextElseIf $counter = 0 ThenFor $i = 80 To 100 Step 1GUICtrlSetData($progressbar, $i)Sleep($wait / 20)NextGUICtrlSetState($progressbar, $GUI_SHOW)EndIfEndFuncFunc getOfficeKey()Local $List[1]Local $i = 1$var = RegRead("HKEY_LOCAL_MACHINESOFTWAREMicrosoftOffice11.0CommonInstallRoot", "Path")If $var <> "" Then$product = "2003"Dim $officeKey = "HKEY_LOCAL_MACHINESOFTWAREMicrosoftOffice11.0Registration"Else$var = RegRead("HKEY_LOCAL_MACHINESOFTWAREMicrosoftOffice10.0CommonInstallRoot", "Path")If @error <> 0 ThenGUICtrlSetData($status_L, "Info: Unable to find installationPath, maybe no Office installed!")Return "No Office XP or 2003 found"EndIfIf $var <> "" Then$product = "XP"Dim $officeKey = "HKEY_LOCAL_MACHINESOFTWAREMicrosoftOffice10.0Registration"EndIfEndIfDim $var = RegEnumKey($officeKey, $i)If @error <> 0 ThenGUICtrlSetData($status_L, "Info: Unable to find REG_BINARY 'DigitalProductID', maybe no Office installed!")Return "No Office XP or 2003 found"Else$List[$i - 1] = RegRead($officeKey & "" & $var, "DigitalProductID")If $List[$i - 1] = "" ThenGUICtrlSetData($status_L, "Info: Unable to find REG_BINARY 'DigitalProductID', maybe no Office installed!")Else$key = $List[$i - 1]Return DecodeProductKey($key)EndIfEndIfEndFunc Edited August 21, 2013 by Melba23 Removed email address Sapiente vince, rex, noli vincere ferro! Link to comment Share on other sites More sharing options...
Xenobiologist Posted March 7, 2006 Author Share Posted March 7, 2006 If you don't mind i changed the gui a little bit :">Hi,no problem. Have fun playing around with the code.So long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
bubke Posted March 9, 2006 Share Posted March 9, 2006 Hi, I'm new with autoIT and I'm learning. Is it possible to write the code, that you can write a new serial key or new information of the owner to the registry? TY bubke Link to comment Share on other sites More sharing options...
Xenobiologist Posted March 9, 2006 Author Share Posted March 9, 2006 (edited) Hi, I'm new with autoIT and I'm learning. Is it possible to write the code, that you can write a new serial key or new information of the owner to the registry? TY bubke Hi & welcome, sure that is possible. Have a look at : expandcollapse popup; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.1 beta ; Author: ; ; Script Function: ; RegisteredOwner for Windows XP --> change ; ; ---------------------------------------------------------------------------- #include <GUIConstants.au3> ;GUI $GUI = GUICreate("Change RegisteredOwner", 170, 200, 200, 200) ;Label $RegisteredOwner_L = GUICtrlCreateLabel("RegisteredOwner", 10, 10, 150, 17) $NewRegisteredOwner_L = GUICtrlCreateLabel("Type: New RegisteredOwner", 10, 70, 150, 17) $status_L = GUICtrlCreateLabel("Status", 10, 170, 150, 17,$SS_SUNKEN) ;Input $RegisteredOwner_I = GUICtrlCreateInput("RegisteredOwner", 10, 30, 150, 17) $NewRegisteredOwner_I = GUICtrlCreateInput("New RegisteredOwner", 10, 90, 150, 17) ;Button $ok = GUICtrlCreateButton("Change RegisteredOwner", 10, 120, 150, 23) ;Variable Dim $count = 0 Dim $key4RegisteredOwner = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" GUICtrlSetData($RegisteredOwner_I, RegRead($key4RegisteredOwner, "RegisteredOwner")) ;TrayIconToolTip TraySetToolTip("Change RegisteredOwner") GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $count < 1 Then Sleep(2000) GUICtrlSetData($status_L, "ready...") $count += 1 EndIf Select Case $msg = $GUI_EVENT_CLOSE GUICtrlSetData($status_L, "So long, Mega") Sleep(1000) ExitLoop Case $msg = $ok $status = RegWrite($key4RegisteredOwner, "RegisteredOwner", "REG_SZ", ControlGetText("","", $NewRegisteredOwner_I)) If $status = 1 Then GUICtrlSetData($status_L, "changed successfully...") Sleep(1000) GUICtrlSetData($status_L, "ready...") Else GUICtrlSetData($status_L, "Error...") EndIf EndSelect WEnd ExitHope that helps. So long, Mega ChangeRegisteredOwner.au3 Edited August 21, 2013 by Xenobiologist Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
masvil Posted June 11, 2006 Share Posted June 11, 2006 How can I simply show RegisteredOwner in a Msgbox? Link to comment Share on other sites More sharing options...
nfwu Posted June 11, 2006 Share Posted June 11, 2006 How can I simply show RegisteredOwner in a Msgbox?Yep, look at the code, strip out the unnecessary parts, add in the MsgBox, and you are done!#) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
masvil Posted June 11, 2006 Share Posted June 11, 2006 (edited) Yep, look at the code, strip out the unnecessary parts, add in the MsgBox, and you are done!Already tried without success Edited June 11, 2006 by masvil Link to comment Share on other sites More sharing options...
Xenobiologist Posted June 11, 2006 Author Share Posted June 11, 2006 Hi, try this: MsgBox(64, "RegOwner", RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "RegisteredOwner")) So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times 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