Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Hello Members of this best Forum i have a question please for example if i have a long string and i want to extract a text between two tag what i can do to make that? note : i know that there is a StringRegExp function it's do that work but it result is be as an array i want the result to be a string is there any function on autoit can do that? Thanks in advance.
  3. Today
  4. PidGenX UDF PidGenX.au3 ; =========================================================================== ; Title: PidGenX ; AutoIt Version: ; Author: Krakatoa ; Description: Windows and Office Pid Checker ; Parameters: ; $ProductKey Product Key ; $PKeyPath xrm-ms file path ; Return Value: ; Success: array ; [0] = ProductID ; [1] = ExtendedPID ; [2] = ActivationID ; [3] = EditionType ; [4] = EditionID ; [5] = KeyType ; [6] = EULA ; Failure: ; 1 - Error in DllStructCreate ; 2 - Error in DllCall ; 3 - Invalid Arguments ; 4 - Invalid Key ; 5 - File xrm.ms not found ; 6 - Invalid Input ; =========================================================================== Global Const $PIDGENX_PRODUCTID = 0 Global Const $PIDGENX_EXTENDEDPID = 1 Global Const $PIDGENX_ACTIVATIONID = 2 Global Const $PIDGENX_EDITIONTYPE = 3 Global Const $PIDGENX_EDITIONID = 4 Global Const $PIDGENX_KEYTYPE = 5 Global Const $PIDGENX_EULA = 6 Func _PidGenX ($ProductKey, $PKeyPath) $PID = DllStructCreate("byte[50]") If @error Then Return SetError(1, 1, "Error in DllStructCreate") DllStructSetData($PID, 1, 50, 1) $DPID = DllStructCreate("byte[164]") If @error Then Return SetError(1, 2, "Error in DllStructCreate") DllStructSetData($DPID, 1, 164, 1) $DPID4 = DllStructCreate("byte[1272]") If @error Then Return SetError(1, 3, "Error in DllStructCreate") DllStructSetData($DPID4, 1, 248, 1) DllStructSetData($DPID4, 1, 4, 2) $result = DllCall("PidGenX.dll", "int", "PidGenX", _ "wstr", $ProductKey, _ "wstr", $PKeyPath, _ "wstr", "00000", _ "int", 0, _ "INT_PTR", DllStructGetPtr($PID), _ "INT_PTR", DllStructGetPtr($DPID), _ "INT_PTR", DllStructGetPtr($DPID4)) If @error Then Return SetError(2, 0, "Error in DllCall") If $result[0] = 0 Then Local $PidGenX[7] $PidGenX[0] = StringStripWS(BinaryToString(DllStructGetData($PID, 1), 2),15) $dpid4Result = DllStructGetData($DPID4, 1) $PidGenX[1] = StringStripWS(BinaryToString(BinaryMid($dpid4Result, 9, 128), 2),15) $PidGenX[2] = StringStripWS(BinaryToString(BinaryMid($dpid4Result, 137, 128), 2),15) $PidGenX[3] = StringStripWS(BinaryToString(BinaryMid($dpid4Result, 281, 512), 2),15) $PidGenX[4] = StringStripWS(BinaryToString(BinaryMid($dpid4Result, 889, 128), 2),15) $PidGenX[5] = StringStripWS(BinaryToString(BinaryMid($dpid4Result, 1017, 128), 2),15) $PidGenX[6] = StringStripWS(BinaryToString(BinaryMid($dpid4Result, 1145, 128), 2),15) Return $PidGenX Else If($result[0] == -2147024809) Then Return SetError(3, 0, "Invalid Arguments") ElseIf($result[0] == -1979645695) Then Return SetError(4, 0, "Invalid Key") ElseIf($result[0] == -2147024894) Then Return SetError(5, 0, "File xrm.ms not found") Else Return SetError(6, 0, "Invalid Input") EndIf EndIf EndFunc Example PidChecker PidChecker.au3 #include "PidGenX.au3" Opt("TrayIconHide", 1) $hGUI = GUICreate("PidChecker", 540, 340) GUICtrlCreateGroup("xrm-ms file path", 10, 10, 420, 55) $idComboBox = GUICtrlCreateCombo("C:\Windows\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms", 20, 30, 400, 20) GUICtrlSetData($idComboBox, _ @ScriptDir & "\xrm-ms\win81_pkeyconfig.xrm-ms" & _ "|" & @ScriptDir & "\xrm-ms\win7_pkeyconfig.xrm-ms" & _ "|C:\Program Files\Microsoft Office\root\Office16\pkeyconfig-office.xrm-ms" & _ "|C:\Program Files\Microsoft Office\root\Office15\pkeyconfig-office.xrm-ms") GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("Product Key", 10, 75, 420, 55) $Input = GUICtrlCreateInput("", 20, 95, 260, 20) $idCheck = GUICtrlCreateButton("CHECK", 320, 90, 85, 30) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("Output Data", 10, 140, 520, 185) $info = GUICtrlCreateEdit( "", 20, 160, 500, 150, 2048) GUICtrlSetFont($info, 9, 0, 0, "Consolas") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case -3 ExitLoop Case $idCheck $aPidGenX = _PidGenX (GUICtrlRead($Input), GUICtrlRead($idComboBox)) If @error Then $Output = _ "Product Key: " & GUICtrlRead($Input) & @CRLF & _ "Error: " & $aPidGenX GUICtrlSetData($info, $Output) Else $Output = _ "Product Key: " & GUICtrlRead($Input) & @CRLF & _ "Key Status: " & "Valid" & @CRLF & _ "Product ID: " & $aPidGenX[$PIDGENX_PRODUCTID] & @CRLF & _ "Extended PID: " & $aPidGenX[$PIDGENX_EXTENDEDPID] & @CRLF & _ "Activation ID: " & $aPidGenX[$PIDGENX_ACTIVATIONID] & @CRLF & _ "Edition Type: " & $aPidGenX[$PIDGENX_EDITIONTYPE] & @CRLF & _ "Edition ID: " & $aPidGenX[$PIDGENX_EDITIONID] & @CRLF & _ "Key Type: " & $aPidGenX[$PIDGENX_KEYTYPE] & @CRLF & _ "EULA: " & $aPidGenX[$PIDGENX_EULA] GUICtrlSetData($info, $Output) GUICtrlSetState ($info, 256) EndIf EndSwitch WEnd GUIDelete($hGUI) Info for example PidChecker: Windows 10 installed (C:\Windows\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms = Windows 10 xrm-ms file) Office 2016/2019 installed (C:\Program Files\Microsoft Office\root\Office16\pkeyconfig-office.xrm-ms = Office 2016/2019 xrm-ms file) Office 2016/2019 installed (C:\Program Files\Microsoft Office\root\Office15\pkeyconfig-office.xrm-ms = Office 2013 xrm-ms file) "\xrm-ms\win81_pkeyconfig.xrm-ms" from Windows 8.1 iso "\xrm-ms\win7_pkeyconfig.xrm-ms" from Windows 7 iso Screen:

    Couple of pointers: Always rename your Guis differently e.g. in your code you have main Gui called Form1 and additional Gui also named Form1, doing so allows you to target the correct Gui. Don't use Exit unless you wish to close your entire script, instead Exit the loop and use GuiDelete. But as Melba23 mentioned read the link he provided and also the help file.
  6. Agree with orbs, a quick google search for Uninstall Checkpoint returns the Endpoint Security Management Guide, search for Uninstalling Endpoint Security Clients, which gives you the command line to uninstall the client using: Using the vbscript at the end of the guide and translating it to AutoIt, however this is compatible with both x86/x64 systems. #NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Global $g_sCheckPassword = "<Enter Password Here>" Global $g_sProductCode = @OSArch = "x64" ? RegRead("HKLM64\SOFTWARE\Zone Labs\ZoneAlarm", "MSIProductCode") : RegRead("HKLM\SOFTWARE\Zone Labs\ZoneAlarm", "MSIProductCode") If $g_sProductCode = "" Then Exit ;~ CheckPoint is not installed on the system If @OSArch = "x64" Then DllCall("kernel32.dll", "boolean", "Wow64DisableWow64FsRedirection", "boolean", 1) ;~ Turns Off 64 Bit Redirection RunWait("MsiExec.exe /x " & $g_sProductCode & " /qn INSTALLPASSWORD=" & $g_sCheckPassword, "", @SW_HIDE) DllCall("kernel32.dll", "boolean", "Wow64DisableWow64FsRedirection", "boolean", 0) ;~ Turns On 64 Bit Redirection Else RunWait("MsiExec.exe /x " & $g_sProductCode & " /qn INSTALLPASSWORD=" & $g_sCheckPassword, "", @SW_HIDE) EndIf
  7. TimR, Welcome to the AutoIt forums. I quite agree and so your question falls foul of the Forum rules - specifically the prohibition on discussing "Bypassing of security measures - log-in and security dialogs". I realise that your intentions are good, but you must realise that these features are put there for a reason and we are not going to help you - and therefore anyone else with less honest goals - to get around them. Thread locked. I heartily endorse orbs proposal above - use the correct method to uninstall and forget trying to script it by simulation mouseclicks, etc. M23
  8. Changed to improve the interface, its now toolful
  9. ... $a = _GDIPlus_BitmapCreateFromFile ($sFile);<<<<< ok If @error Or Not $hImage Then MsgBox(BitOR($MB_TOPMOST, $MB_ICONERROR), "Error", "This file isn't supported by GDIPlus!") Else $size = _GDIPlus_ImageResize($a, 120, 70) _GDIPlus_BitmapDispose($a) $bmp = _GDIPlus_BitmapCreateHBITMAPFromBitmap($size) _GDIPlus_BitmapDispose($size) $b=_GUIImageList_Add($hImage, $bmp) _WinAPI_DeleteObject($bmp) $DadosCombo &= "|" & $i & "_img_princ.gif|" & $b EndIf ...
  10. @TimR, welcome to AutoIt and to the forum. Check Point Endpoint Security - like all enterprise security products - has a central management console, through which you can uninstall the clients. no other method is going to be simpler, or feasible at all. do NOT attempt it by simulating mouse clicks and key presses - this will fail in 99.9% of your targets (the rest 0.1% are your test targets), which will generate a lot more work for you to explain to users WTF is going on, then connect to their workstations and perform the process manually. you have revealed your lack of experience in scripting by simulating opening the Control Panel applet of "Programs and Features", then trying to locate the software products for uninstall. if scripting is your way, you'd be using the formal uninstall command from the registry (typically handled by msiexec). script-wise, what you are dealing here is more complicated than usual; this be the second reason i advise you do not follow that path. if, for some reason, you do not have access to the central management console, then either make such access for yourself, or ask the person in charge of it to do the remote uninstallation for you. if none of that is possible, consult Check Point support for other options. if manual uninstall is your only option, inform your boss you'd have to do it manually, and it will take as much as it will take. once your boss understands that, trust me - you'd have your access in no time and you will complete the uninstall in a few hours.
  11. GUI IN GUI

    JuanFelipe, I suggest reading the Managing Multiple GUIs tutorial in the Wiki - that will explain how to do it. M23
  12. Batch Convert To FLAC (DTS, etc)

    Updated to v1.8. See first post. (v1.8) Added a reduction (half) for drive free space, if destination drive is different to source drive, and use source for temporary WAV file is enabled. NOTE - Default limit is less than 2 Gb, so new option makes it less than 1 Gb. Selected entry file size is now shown. Other minor improvements. Bugfix for find image file with LAST button. Disc number now automatically removed (if criteria met) from new CUE/M3U file name in JOINER process. VIEW button added for source CUE file, plus conversion now exits if Index error detected, as such an error impacts current and following track. ADVICE - With such an error, which could be as simple as a missing leading zero in the Index for the listed track, you can correct the track index (using Notepad) and then reload the CUE file (LAST button), and then use the 'From Selected' option to start from a specific track/entry, to continue on from the last track that was successfully converted (or just remove successful tracks from list). Should have mentioned previously.
  13. Best multi-threading solution?

    What a beautiful idea. Thank you KaFu
  14. Can't set icon to a Status Bar

    I don't run as i know there is a easier way to do this.
  15. Hi, there are many socalled "controls" in software products, that are definetly no "typically" windows controls! Sometimes the only way to place some text into an input-field is the send()-command. If you are sure that the password-input-control is active ( ! ) try to use the "send()"-command to send the text. "Active" means, the cursor is blinking into the input-control. If ControlFocus() does´nt work, you could try to activate the input-control via the TAB´s. ...and use more Sleep()´s between your lines of code, because your AutoIt-Script is normally way faster than the most Windows-Programs.
  16. Check Point Endpoint Security

    Good morning @TimR So, the issue you are having, is that, in the "final part", the password is not typed in the input box, is it right? I always suggest to check return value of functions that you're using, so you can say: "Ok, calling this function, there is an issue" Best Regards.
  17. Of course basically you write a file with name format like 0xXXXXXXX in script directory because InetGet does not support pass a handle so you basically past string "0x000000" and the download work correctly but you are no able to get what you expect. Also check that InetGet internally do not use FILE_READ_ATTRIBUTES and you will be not able to get the file size CreateFileW ( "0x00000224", GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, 0x04caf7ac, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL ) You dont get any result int _WinAPI_GetFileSizeEx because the handle you pass to inetget is never used InetGet never write to that file it write to the internal created one named like 0x000000. Saludos
  18. First off, I wanted to say, AutoIT is AMAZING and I have learned a lot from these forums. I searched ALL over the forum and could not find this topic so I am going to post this one in hopes there is nothing already out there. We have an Anti Virus piece of software that requires a password to be passed in a gui during the regular windows uninstall. They call this "Tamper Protection". The problem is I have to uninstall this software on nearly a thousand machines and thought that AutoIt would work. I believe that Check Point Endpoint Security may have built some logic that makes it impossible to uninstall the software even with AutoIT. I wanted to know if anyone has had this issue in the past? I have been spinning wheels and I hate asking. I have tried to create this script manually using classes defined within the AutoIt v3 Window Information tool. After several hours, I gave up and thought that I would try Au3Record. That didn't even work. In a nutshell, the AU3Record does not even really seem to record data typed in the password field. Could there be protections against AutoIT or am I just too green with the product? Run("C:\Windows\System32\control.exe appwiz.cpl") WinWait("Programs and Features") WinActivate("Programs and Features") Send("Check Point Endpoint Security") Send("{Enter}") Sleep(1000) ControlClick("Programs and Features", "&Yes", "[CLASS:Button; INSTANCE:1]") Sleep(2000) ControlFocus("Check Point Endpoint Security", "Please enter administrative password", "Edit1") ControlSetText("Check Point Endpoint Securty", "Please enter administrative password", "Edit1", "the uninstall password") Sleep(15000) ControlClick("Check Point Endpoint Securty", "OK", "[CLASS:Button; INSTANCE:1]") Exit
  19. EFo74, Are your input fields fixed in size? kylomas
  20. Slow down CPU = cooler CPU = fan idle

    What's New in Version 0.2018.6.22 Added a CPU stress test, to aid test settings. Added an automatic mode called "anti creep up temperature thing" to lower the throttle, if needed. Added a paused state. Added a predefined throttle state, for an "overwhelmed CPU", where everything is unresponsive or way too slow to get the CPU temp. in a timely manner ( ~1000 ms. ). Added a measurement of efficiency for the "CPU stress test" in cycles/1000 ( kilo cycles per second ). Added sample data, to be read via ControlGetText() ( There is an example is in the source zip ). PS: I don't find anything else to add to this utility -that no one should need to use, unless for a very specific reason-. In any case, if you find a bug or have a request, post it here.
  21. Same link I posted =/ Well, If you run the script, you'll see in the console: $sFilePath = "C:\Users\PACSAD~1\AppData\Local\Temp\C447.tmp" The total download size: 456 - ( if more than zero, the file downloaded ) filesize as per FileGetSize: 456 bytes - ( if more than zero, the file got written ) filesize as per _WinAPI_GetFileSizeEx: 0 bytes - ( if more than zero, the file got written ) --- file start --- --- file end --- --- file start --- 2):0 --- file end --- So, "filesize as per FileGetSize: 456 bytes" means that , something got written, somewhere. Maybe the access permissions are wrong ?. No clue.
  22. Can't set icon to a Status Bar

    @AutoBert I already managed to set icons in my Status Bar, but, in this particular situation, I can't do it, and I don't know why... If you try to run the code in the first post, what result do you get? Thanks. Best Regards.
  23. Yesterday
  24. So funny thank you made me laugh. I was able to accomplish with AutoHotkey and I did it all by myself. Yeah me!!
  25. i ded what you tell me but the result is 3 this is the function #include <Array.au3> Local $sString = "%D8%A3%D8%B0%D9%83%D8%A7%D8%B1%20%D9%88%D8%A3%D8%AF%D8%B9%D9%8A%D8%A9/%D8%A3%D8%B0%D9%83%D8%A7%D8%B1%20%D9%85%D9%86%D9%88%D8%B9%D8%A9/%D8%A3%D8%B0%D9%83%D8%A7%D8%B1%2003.mp3" MsgBox(0, "", _MakeReadable($sString)) Func _MakeReadable($sString) Local $aReg = StringRegExp($sString, '%[0-9a-fA-F]{2}|.', 3) Local $sChar = "" Local $sReadableString="" For $i = 0 To UBound($aReg) - 1 $sChar = StringReplace($aReg[$i], "%", "") If StringLen($sChar) = 2 Then $sReadableString = Chr("0x" & $sChar) Else $sReadableString = $sChar EndIf Next Return BinaryToString(StringToBinary($sReadableString), 4) EndFunc
  26. check my first code. :-S Saludos
  27. I don't understand. Please explain more.
  28. You will have to post something that we can run which also demonstrates the problem as this doesn't give me anything to go on. Jos
  1. Load more activity