-
Posts
387 -
Joined
-
Last visited
-
Days Won
1
Everything posted by DXRW4E
-
Read All Reg. Values into an array?
DXRW4E replied to Unc3nZureD's topic in AutoIt General Help and Support
Hi Unc3nZureD try this Ciao. -
read registry subkeys and write to array
DXRW4E replied to kneze's topic in AutoIt General Help and Support
Not trying to be a smart OK hmmmmmm Not all users must necessarily do 4600 posts indicate ONLY the help of autoit , if I want to play you change irony pointing this and a few days ago OK, as already done just NOW OKKK Not a Necroposting OKKK, I think I have already explained very well here I know you are now pretended not to understand ok I do not understand the reasons why you keep this discussion I believe and already clarified here OK or I have advice for you, best to try to spend time on other things instead of the ironic with users around in the forum OK and forbidden to give a solution? (because you are not able to give a solution and prohibited to do it the other) but the real reason why put the link here was this, and you read that right to why because you do not like it, or because you're jealous (you must offending other users?, how fucking dare you make judgments for another user without knowing it?) what the fuck do I know (Luckily you're not a moderator or admin here, if I delete the account immediately, no nerves to break with guys like you around), this says it all about the reason why ect ect ect (I owe you? also delete the ) not nice to spend all the time with the purpose to break other OKKKK, not told that he must always speak when you do not do or say, still without speaking and better OK PS:I'm really really sorry (for real), wrong your nickname with that of guinness, guinness was not, but it was you you did servility with the story of , the post written here and for you OK (fuck I do not see where the crime here, and a crime to post a code fuck) -
I know I know, the point was that, before I do RegEnumKeyEx (google sent me to this old topic) I ended up in this topic and many other old topic (looking for a solution), and it more confusing to me ect ect, or put the link up there, not to create even more confusion but with the intention to do better, if someone else like me end up in some old posts also find new posts ect ect sorry again for my english Ciao
-
I understand, I apologize (I'm really sorry) the point is that I before making the RegEnumKeyEx, or read in forums and looking for RegEnumKey, have left 20-30 topics ect ect, after or fate to me that RegEnumKeyEx, after I had already in Firefox browser these posts and precisely or posted here and in another post always with idea to be of help, because I'm confused actually looking RegEnumKey + array ect ect, there are many topics with all the hanging question and all without a real solution sorry again Ciao.
-
not open or anything, only indicated a solution that in my opinion and better if you do not like hmmmmmmmm instead of saying thanks (for the release of _RegEnumKeyEx) you say hmmmmm (however it seems that your problem is not mine) I do not know what to say, from the way you wrote it seems that you gave to nuisance one of my publications hmmmmmmm okay anyway
-
Ciao.
-
read registry subkeys and write to array
DXRW4E replied to kneze's topic in AutoIt General Help and Support
Ciao. -
RegEnumKey into Array, can it be done?
DXRW4E replied to ScriptingNoob's topic in AutoIt General Help and Support
Ciao. -
Hi All, Sorry for my English I searched the forum a function like that, and not found, indeed, there are many topics request regarding all this function, and I have done this, I did not know what name to put them RegEnumKeyToArray or RegListToArray or ect ect in the end I chose _RegEnumKeyValEx (_RegEnumKeyEx & _RegEnumValEx), the function does almost everything (also includes $sFilter as the >_FileListToArrayEx), and works really fast too #include-once ; #UDF# ======================================================================================================================= ; Title .........: Reads\Search the name of a Key\Subkey\Value ; AutoIt Version : 3.3.8.1 ; Language ......: English ; Description ...: Lists all Keys\Subkeys\Values in a specified registry key ; Author(s) .....: DXRW4E ; Notes .........: ; =============================================================================================================================== ; #CURRENT# ===================================================================================================================== ;~ _RegEnumKeyEx ;~ _RegEnumValEx ; =============================================================================================================================== #Region ;**** Global constants and vars **** Global Const $sValueTypes[12] = ["REG_NONE","REG_SZ","REG_EXPAND_SZ","REG_BINARY","REG_DWORD","REG_DWORD_BIG_ENDIAN","REG_LINK","REG_MULTI_SZ","REG_RESOURCE_LIST","REG_FULL_RESOURCE_DESCRIPTOR","REG_RESOURCE_REQUIREMENTS_LIST","REG_QWORD"] #EndRegion ;**** Global constants and vars **** ; #FUNCTION# ======================================================================================================================== ; Name...........: _RegEnumKeyEx ; Description ...: Lists all subkeys in a specified registry key ; Syntax.........: _RegEnumKeyEx($KeyName[, $iFlag = 0[, $sFilter = "*"]]) ; Parameters ....: $KeyName - The registry key to read. ; $iFlag - Optional specifies Recursion (add the flags together for multiple operations): ; |$iFlag = 0 (Default) All Key-SubKeys Recursive Mod ; |$iFlag = 1 All SubKeys Not Recursive Mod ; |$iFlag = 2 Include in ArrayList in the first element $KeyName ; |$iFlag = 16 $sFilter do Case-Sensitive matching (By Default $sFilter do Case-Insensitive matching) ; |$iFlag = 32 Disable the return the count in the first element - effectively makes the array 0-based (must use UBound() to get the size in this case). ; By Default the first element ($array[0]) contains the number of strings returned, the remaining elements ($array[1], $array[2], etc.) ; |$iFlag = 64 $sFilter is REGEXP Mod, See Pattern Parameters in StringRegExp ; |$iFlag = 128 Enum value's name (_RegEnumKeyEx Return a 2D array, maximum Array Size limit is 3999744 Key\Value) ; |$iFlag = 256 Reads a value data, this flag will be ignored if the $iFlag = 128 is not set ; $sFilter - Optional the filter to use, default is *. (Multiple filter groups such as "All "*.XXx|*.YYY|*.ZZZ") ; Search the Autoit3 helpfile for the word "WildCards" For details. ; $vFilter - Optional the filter to use for ValueName, $vFilter will be ignored if the $iFlag = 128 is not set ; default is *. (Multiple filter groups such as "All "*.XXx|*.YYY|*.ZZZ") Search the Autoit3 helpfile for the word "WildCards" For details. ; $iValueTypes - Optional, set Value Types to search (Default $iValueTypes = 0 Read All), $iValueTypes will be ignored if the $iFlag = 128 is not set ; (add the flags together for multiple operations): ; 1 = REG_SZ ; 2 = REG_EXPAND_SZ ; 3 = REG_BINARY ; 4 = REG_DWORD ; 5 = REG_DWORD_BIG_ENDIAN ; 6 = REG_LINK ; 7 = REG_MULTI_SZ ; 8 = REG_RESOURCE_LIST ; 9 = REG_FULL_RESOURCE_DESCRIPTOR ; 10 = REG_RESOURCE_REQUIREMENTS_LIST ; 11 = REG_QWORD ; Return values .: Success - Return Array List (See Remarks) ; Failure - @Error ; |1 = Invalid $sFilter ; |2 = No Key-SubKey(s) Found ; |3 = Invalid $vFilter ; |4 = No Value-Name(s) Found ; Author ........: DXRW4E ; Modified.......: ; Remarks .......: The array returned is one-dimensional and is made up as follows: ; $array[0] = Number of Key-SubKeys returned ; $array[1] = 1st Key\SubKeys ; $array[2] = 2nd Key\SubKeys ; $array[3] = 3rd Key\SubKeys ; $array[n] = nth Key\SubKeys ; ; If is set the $iFlag = 128 The array returned is 2D array and is made up as follows: ; $array[0][0] = Number of Key-SubKeys returned ; $array[1][0] = 1st Key\SubKeys ; $array[1][1] = 1st Value name ; $array[1][2] = 1st Value Type (REG_NONE or REG_SZ or REG_EXPAND_SZ ect ect) ; $array[1][3] = 1st Value Data (If is set $iFlag = 256 Else Value Data = "") ; $array[2][0] = 2nd Key\SubKeys ; $array[2][1] = 2nd Value name ; $array[2][2] = 2nd Value Type (REG_NONE or REG_SZ or REG_EXPAND_SZ ect ect) ; $array[2][3] = 2nd Value Data (If is set $iFlag = 256 Else Value Data = "") ; $array[n][0] = nth Key\SubKeys ; Related .......: _RegEnumValEx() ; Link ..........: ; Example .......: _RegEnumKeyEx("HKEY_CURRENT_USER\Software\AutoIt v3") ; Note ..........: ; =================================================================================================================================== Func _RegEnumKeyEx($KeyName, $iFlag = 0, $sFilter = "*", $vFilter = "*", $iValueTypes = 0) If StringRegExp($sFilter, StringReplace("^\s*$|\v|\\|^\||\|\||\|$", Chr(BitAND($iFlag, 64) + 28) & "\|^\||\|\||\|$", "\\\\")) Then Return SetError(1, 0, "") Local $IndexSubKey[101] = [100], $SubKeyName, $BS = "\", $sKeyList, $I = 1, $sKeyFlag = BitAND($iFlag, 1), $sKeyFilter = StringReplace($sFilter, "*", "") If BitAND($iFlag, 2) Then $sKeyList = @LF & $KeyName If Not BitAND($iFlag, 64) Then $sFilter = StringRegExpReplace(BitAND($iFlag, 16) & "(?i)(", "16\(\?\i\)|\d+", "") & StringRegExpReplace(StringRegExpReplace(StringRegExpReplace(StringRegExpReplace($sFilter, "[^*?|]+", "\\Q$0\\E"), "\\E(?=\||$)", "$0\$"), "(?<=^|\|)\\Q", "^$0"), "\*+", ".*") & ")" While $I $IndexSubKey[$I] += 1 $SubKeyName = RegEnumKey($KeyName, $IndexSubKey[$I]) If @error Then $IndexSubKey[$I] = 0 $I -= 1 $KeyName = StringLeft($KeyName, StringInStr($KeyName, "\", 1, -1) - 1) ContinueLoop EndIf If $sKeyFilter Then If StringRegExp($SubKeyName, $sFilter) Then $sKeyList &= @LF & $KeyName & $BS & $SubKeyName Else $sKeyList &= @LF & $KeyName & $BS & $SubKeyName EndIf If $sKeyFlag Then ContinueLoop $I += 1 If $I > $IndexSubKey[0] Then $IndexSubKey[0] += 100 ReDim $IndexSubKey[$IndexSubKey[0] + 1] EndIf $KeyName &= $BS & $SubKeyName WEnd If Not $sKeyList Then Return SetError(2, 0, "") If BitAND($iFlag, 128) <> 128 Then Return StringSplit(StringTrimLeft($sKeyList, 1), @LF, StringReplace(BitAND($iFlag, 32), "32", 2)) $sKeyList = _RegEnumValEx(StringSplit(StringTrimLeft($sKeyList, 1), @LF), $iFlag, $vFilter, $iValueTypes) Return SetError(@Error, 0, $sKeyList) EndFunc ; #FUNCTION# ======================================================================================================================== ; Name...........: _RegEnumValEx ; Description ...: Lists all values in a specified registry key ; Syntax.........: _RegEnumValEx($KeyName[, $iFlag = 0[, $sFilter = "*"]]) ; Parameters ....: $KeyName - The registry key to read Or one-dimensional array RegKeyList ; use _RegEnumKeyEx() to get $RegKeyList (example $RegKeyList = [3, 1st Key\SubKeys, 2st Key\SubKeys, nth Key\SubKeys]) ; |$iFlag = 16 $sFilter do Case-Sensitive matching (By Default $sFilter do Case-Insensitive matching) ; |$iFlag = 32 Disable the return the count in the first element - effectively makes the array 0-based (must use UBound() to get the size in this case). ; By Default the first element ($array[0]) contains the number of strings returned, the remaining elements ($array[1], $array[2], etc.) ; |$iFlag = 64 $sFilter is REGEXP Mod, See Pattern Parameters in StringRegExp ; |$iFlag = 256 Reads a value data ; $sFilter - Optional the filter to use, default is *. (Multiple filter groups such as "All "*.XXx|*.YYY|*.ZZZ") ; Search the Autoit3 helpfile for the word "WildCards" For details. ; $iValueTypes - Optional, set Value Types to search (Default $iValueTypes = 0 Read All) ; (add the flags together for multiple operations): ; 1 = REG_SZ ; 2 = REG_EXPAND_SZ ; 3 = REG_BINARY ; 4 = REG_DWORD ; 5 = REG_DWORD_BIG_ENDIAN ; 6 = REG_LINK ; 7 = REG_MULTI_SZ ; 8 = REG_RESOURCE_LIST ; 9 = REG_FULL_RESOURCE_DESCRIPTOR ; 10 = REG_RESOURCE_REQUIREMENTS_LIST ; 11 = REG_QWORD ; Return values .: Success - Return Array List (See Remarks) ; Failure - @Error ; |3 = Invalid $sFilter ; |4 = No Value-Name(s) Found ; Author ........: DXRW4E ; Modified.......: ; Remarks .......: The array returned is 2D array and is made up as follows: ; $array[0][0] = Number of Key-SubKeys returned ; $array[1][0] = 1st Key\SubKeys ; $array[1][1] = 1st Value name ; $array[1][2] = 1st Value Type (REG_NONE or REG_SZ or REG_EXPAND_SZ ect ect) ; $array[1][3] = 1st Value Data (If is set $iFlag = 256 Else Value Data = "") ; $array[2][0] = 2nd Key\SubKeys ; $array[2][1] = 2nd Value name ; $array[2][2] = 2nd Value Type (REG_NONE or REG_SZ or REG_EXPAND_SZ ect ect) ; $array[2][3] = 2nd Value Data (If is set $iFlag = 256 Else Value Data = "") ; $array[n][0] = nth Key\SubKeys ; Related .......: _RegEnumKeyEx() ; Link ..........: ; Example .......: _RegEnumValEx("HKEY_CURRENT_USER\Software\AutoIt v3") ; Note ..........: ; =================================================================================================================================== Func _RegEnumValEx($aKeyList, $iFlag = 0, $sFilter = "*", $iValueTypes = 0) If StringRegExp($sFilter, "\v") Then Return SetError(3, 0, "") If Not IsArray($aKeyList) Then $aKeyList = StringSplit($aKeyList, @LF) Local $aKeyValList[1954][4], $iKeyVal = Int(BitAND($iFlag, 32) = 0), $sKeyVal = 1953, $sRegEnumVal, $iRegEnumVal, $RegRead = BitAND($iFlag, 256), $vFilter = StringReplace($sFilter, "*", "") If Not BitAND($iFlag, 64) Then $sFilter = StringRegExpReplace(BitAND($iFlag, 16) & "(?i)(", "16\(\?\i\)|\d+", "") & StringRegExpReplace(StringRegExpReplace(StringRegExpReplace(StringRegExpReplace($sFilter, "[^*?|]+", "\\Q$0\\E"), "\\E(?=\||$)", "$0\$"), "(?<=^|\|)\\Q", "^$0"), "\*+", ".*") & ")" For $i = 1 To $aKeyList[0] $iRegEnumVal = 0 While 1 If $iKeyVal = $sKeyVal Then If $sKeyVal = 3999744 Then ExitLoop $sKeyVal *= 2 ReDim $aKeyValList[$sKeyVal + 1][4] EndIf $aKeyValList[$iKeyVal][0] = $aKeyList[$i] $iRegEnumVal += 1 $sRegEnumVal = RegEnumVal($aKeyList[$i], $iRegEnumVal) If @Error <> 0 Then If $iRegEnumVal = 1 And $vFilter = "" Then $iKeyVal += 1 ExitLoop EndIf $aKeyValList[$iKeyVal][2] = $sValueTypes[@Extended] If BitAND(@Extended, $iValueTypes) <> $iValueTypes Then ContinueLoop If $vFilter And Not StringRegExp($sRegEnumVal, $sFilter) Then ContinueLoop $aKeyValList[$iKeyVal][1] = $sRegEnumVal If $RegRead Then $aKeyValList[$iKeyVal][3] = RegRead($aKeyList[$i], $sRegEnumVal) $iKeyVal += 1 WEnd Next $sRegEnumVal = $iKeyVal - Int(BitAND($iFlag, 32) = 0) If Not $sRegEnumVal Or ($sRegEnumVal = 1 And $vFilter = "" And $aKeyValList[$iKeyVal - $sRegEnumVal][2] = "") Then Return SetError(4, 0, "") ReDim $aKeyValList[$iKeyVal][4] If Not BitAND($iFlag, 32) Then $aKeyValList[0][0] = $iKeyVal - 1 Return $aKeyValList EndFuncexample #RequireAdmin #include <_RegEnumKeyValEx.au3> #include <Array.au3> Global $a, $t, $Error, $Extended, $KeyName ;$KeyName = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft" ;$KeyName = "HKEY_CLASSES_ROOT" ;104718 ;$KeyName = "HKEY_LOCAL_MACHINE\SOFTWARE\Classes" $KeyName = "HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3" $t = TimerInit() ;$a = _RegEnumKeyEx($KeyName, 0, "Opti*Components") ; to find HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\OptionalComponents ;$a = _RegEnumKeyEx($KeyName, 0, "*") $a = _RegEnumKeyEx($KeyName, 128 + 256 + 32 + 16, "*", "*vers*") $Error = @Error $Extended = @Extended $t = TimerDiff($t) ConsoleWrite("Timer = " & $t & @LF) ConsoleWrite("Return = " & $a & " - $Error = " & $Error & " - $Extended = " & $Extended & @LF) _ArrayDisplay($a) ;or $a = _RegEnumKeyEx("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3", 128 + 256) ;Return 2D array all Keys\Subkes\Values ect ect _ArrayDisplay($a) $a = _RegEnumKeyEx("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3", 128 + 256, "*","*Ver*on*") ;Return $a[2][4] = [[1],["HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt","Version","REG_SZ","v3.3.8.1"]] _ArrayDisplay($a) $a = _RegEnumKeyEx("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3", 128 + 256 + 32, "*","*ver*on*") ;Return $a[1][4] = [["HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt","Version","REG_SZ","v3.3.8.1"]] _ArrayDisplay($a) $a = _RegEnumKeyEx("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3", 128 + 256 + 16, "*","*ver*on*") ;Return @Error = 4 ($iFlag = 16 $sFilter do Case-Sensitive matching, Version <> version) ;_ArrayDisplay($a) $a = _RegEnumValEx("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", 256,"*Ver*on*") ;Return $a[2][4] = [[1],["HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt","Version","REG_SZ","v3.3.8.1"]] _ArrayDisplay($a)_RegEnumKeyValEx.au3
- 15 replies
-
- _filelisttoarrayex
- regenumkeytoarray
- (and 7 more)
-
http://www.heidoc.net/joomla/technology-science/microsoft/14-windows-7-direct-download-links Ciao.
-
Hi Tlem, Thank You for all suggestions I understand you very well, that was just my personal opinion, I really like the BITAND, using the BITAND can add it to function even more 10 flags, without changing the structure of the function ect ect, to give an example such as FileOpen, to me personally it looks much more professional the use of BITAND Thanks Again and sorry again for my English Ciao.
- 39 replies
-
- _regenumkeyex
- _filelisttoarrayex
-
(and 4 more)
Tagged with:
-
Hi BrewManNH, thanks for the info, Unfortunately StringRegExp does not interpret correctly "???" Ciao.
- 39 replies
-
- _regenumkeyex
- _filelisttoarrayex
-
(and 4 more)
Tagged with:
-
What are the "???" ? (What do you look for them?, It does not need to use "???"), windows uses them only in case of research in desktopsearch, but defualt ignores them (because those do not serve?), so we too we do not have enabled the search for the "?", the "?" is interpreted in regex mod not there ever a file name with the name "name?name.xxx" ?, so your $sFilter is not valid need to use these for example "s*.?.*" = "sname.name.txt" Or "snamename.txt" "s*.*.*" = "sname.name.txt" (NOT "snamename.txt") everything seems OK, everything perfect ? Ciao.
- 39 replies
-
- _regenumkeyex
- _filelisttoarrayex
-
(and 4 more)
Tagged with:
-
????? concrete example of what has not worked for you?
- 39 replies
-
- _regenumkeyex
- _filelisttoarrayex
-
(and 4 more)
Tagged with:
-
@Tlem Hi Tlem, Thank You, you're right, or forget that the full path is used only for subdir to be honest I do not like much the fate of using many flags in a function (I mean best to use as little as possible, BITAND and really nice), I think the better way and what he or posted in first post However who like that way will be able to use your script (that is already OK) in post above (_FileListToArrayEx($sPath, $sFilter = "*", $iFlag = 0, $iSDir = 0, $iFPath = 1)), so I think everything is OK Many Thanks Again @FVN Now you can use for example $iFlag = 0 + 8 --> Return both files and folders and Full Path Or $iFlag = 0 + 8 + 4 --> Return both files and folders and subdirectory and Full Path Or $iFlag = 1 + 8 + 4 --> Return files only and subdirectory and Full Path Or $iFlag = 1 + 8 --> Return files only and Full Path ect ect ect ect @All already updated the first post sorry again for my English Ciao.
- 39 replies
-
- _regenumkeyex
- _filelisttoarrayex
-
(and 4 more)
Tagged with:
-
First post of topics and code of _FileListToArrayEx.au3, Replace the line shown in post above, after _FileListToArrayEx.au3 always return full path Ciao.
- 39 replies
-
- _regenumkeyex
- _filelisttoarrayex
-
(and 4 more)
Tagged with:
-
I did not want to change the original code, that and the setting and the original code for this reason the left so However who wants to will be able to modify the code if they suffered, just put it so $FPath = StringRegExpReplace(StringRegExpReplace($sSDir, '[^2]+', ""), "2+", StringRegExpReplace($sPath, '\\', "\\\\")) in $FPath = $sPath So Default and always full path (no need to use more $sSDir = 2) Sorry for my english
- 39 replies
-
- _regenumkeyex
- _filelisttoarrayex
-
(and 4 more)
Tagged with:
-
[Solved] DllCall & NULL parameter ?
DXRW4E replied to DXRW4E's topic in AutoIt General Help and Support
Hi ProgAndy, it seems that everything works OK Thank You Very Much Ciao. -
Sorry for my English Hi All, I'm curious who and pramenter in this case SetupOpenInfFile Function ??? SetupApiEx.au3 Global Const $h_SetupApiDll = DllOpen("SetupApi.dll") Global Const $h_Kernel32DLL = DllOpen("Kernel32.dll") Global Const $INF_STYLE_NONE = 0 Global Const $INF_STYLE_OLDNT = 1 ;A legacy INF file format. Global Const $INF_STYLE_WIN4 = 2 ;A Windows INF file format. Global Const $INF_STYLE_NULL = Null ;; Or AutoIt v3.3.8 Global Const $INF_STYLE_NULL = "Null" ;;; ERROR_CLASS_MISMATCH = -536870399 ;;; ERROR_WRONG_INF_STYLE = -536870656 ;;; ERROR_LINE_NOT_FOUND = -536870654; Func _SetupOpenInfFile($FileName, $InfClass = 0, $InfStyle = 0) ;;AutoIt v3.3.8 ;~ Local $HINF, $sType = "wstr" ;~ If $InfClass = $INF_STYLE_NULL Then $sType = "ptr" ;Thanks ProgAndy ;~ $HINF = DllCall($h_SetupApiDll, "long", "SetupOpenInfFileW", "wstr", $FileName, $sType, $InfClass, "dword", $InfStyle, "uint*", 0) ;~ Return SetError(_WinAPI_GetLastErrorEx(), $HINF[4], $HINF[0]) $HINF = DllCall($h_SetupApiDll, "long", "SetupOpenInfFileW", "wstr", $FileName, "wstr", $InfClass, "dword", $InfStyle, "uint*", 0) Return SetError(_WinAPI_GetLastErrorEx(), $HINF[4], $HINF[0]) EndFunc ;==>_SetupOpenInfFile Func _SetupGetLineText($Context = 0, $InfHandle = "", $Section = "", $Key = "", $RBSize = 65536) Local $SGLT, $RBuffer = DllStructCreate("wchar") $SGLT = DllCall($h_SetupApiDll, "int", "SetupGetLineTextW", "ptr", $Context, "long", $InfHandle, "wstr", $Section, "wstr", $Key, "wstr", DllStructGetPtr($RBuffer), "dword", $RBSize, "dword*", 0) If Not $SGLT[0] Then Return SetError(_WinAPI_GetLastErrorEx(), $SGLT[0], "") Return SetError(0, $SGLT[7], $SGLT[5]) EndFunc ;==>_SetupGetLineText Func _SetupCloseInfFile($InfHandle) DllCall($h_SetupApiDll, "none", "SetupCloseInfFile", "long", $InfHandle) EndFunc ;==>_SetupCloseInfFile Func _WinAPI_GetLastErrorEx() Local $GetLastError = DllCall($h_Kernel32DLL, "long", "GetLastError") Return $GetLastError[0] EndFunc ;==>_WinAPI_GetLastErrorEx to say more clear this and OK #include <SetupApiEx.au3>; ;; Display.inf ;;[Version] ;;signature="$Windows NT$" ;;ClassGUID={4D36E968-E325-11CE-BFC1-08002BE10318} ;;Class=Display ;; ;;[sectionname] ;;KeyName="AAAAAAA" ;; ;;[sectionname2] ;;BBB="BBBBBBBB" ;; ;;[sectionname3] ;;CCC="CCCCCCCC" local $hInf, $a, $b, $c, $d $InfClassTest = "Display" ;$InfClassTest = 0 $hInf = _SetupOpenInfFile(@DesktopDir & "display.inf", $InfClassTest, $INF_STYLE_WIN4) If Not @Error Then $a = _SetupGetLineText(0, $hInf, "SectionName", "KeyName") EndIf Msgbox(0, 0, $a) but if you use the $InfClassTest = 0 (Null ?) fails to work (Return ERROR_CLASS_MISMATCH), when both Microsoft and all their write clear examples that can be used InfClass = Null without problems http://msdn.microsoft.com/en-us/library/aa376965%28v=VS.85%29.aspx HINF MyInf; //variable to hold the INF handle UINT ErrorLine; //variable to hold errors returned BOOL test; //variable to receive function success MyInf = SetupOpenInfFile ( szInfFileName, //the filename of the inf file to open NULL, //optional class information INF_STYLE_WIN4, //the inf style &ErrorLine //line number of the syntax error ); why can not I open for example layout.inf, for example [Version] signature="$Windows NT$" ClassGUID={00000000-0000-0000-0000-000000000000} ;; Or SetupClass=Base [sectionname] AAA="AAAAAAA" [sectionname2] BBB="BBB" [sectionname3] CCC="CCCCCCCC" EDIT all OK, Thanks again ProgAndy ;; file.inf ;;[Version] ;;signature="$Windows NT$" ;;ClassGUID=ClassGUID={00000000-0000-0000-0000-000000000000} ;; ;;[sectionname] ;;KeyName="AAAAAAA" ;; ;;[sectionname2] ;;BBB="BBBBBBBB" ;; ;;[sectionname3] ;;CCC="CCCCCCCC" local $hInf, $a, $b, $c, $d ;;;$InfClassTest = "Display" $InfClassTest = Null ;; Or AutoIt v3.3.8 $InfClassTest = "Null" $hInf = _SetupOpenInfFile(@DesktopDir & "file.inf", $InfClassTest, $INF_STYLE_WIN4) If Not @Error Then $a = _SetupGetLineText(0, $hInf, "SectionName", "KeyName") EndIf Msgbox(0, 0, $a)
-
Hi Yashied, it seems that microsoft updated the Dism API, can add them (the function of dism) in WinAPIEx UDF, I think it would be very useful (dism makes many useful tasks also online mod, now need only use the DismApi.dll already present by default in Windows 8) http://msdn.microsoft.com/en-us/library/windows/desktop/hh825834.aspx sorry for my english Ciao.
-
Hi monoceres, you can add support to save the ISO in HD, (to create xxxx.iso ect ect), here for example http://social.msdn.microsoft.com/Forums/...ead/0cf619cf-ef87-41e6-84b1-45 Mike Feng it seems that suggests a solution (would be nice to have it in IMAPI2.au3) Thanks Again and sorry for my english Ciao.
-
File Permission issue with Win Server 2008
DXRW4E replied to coondog7820's topic in AutoIt General Help and Support
Ciao. -
microsoft does so in windows RegWrite('HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionRunOnceEx' , 'Name' , 'REG_SZ' , "Command ect ect ect ect") example not in silent mode RegWrite('HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionRunOnceEx' , 'Name' , 'REG_SZ' , @SystemDir & 'reg.exe delete "hklmSOFTWARExxxxxxxx" /va /f') in silent mode RegWrite('HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionRunOnceEx' , 'Name' , 'REG_SZ' , @SystemDir & 'RUNDLL32.exe advpack.dll,DelNodeRunDLL32 ' & @WindowsDir & 'xxxxx.dll') http://support.microsoft.com/kb/179365 http://support.microsoft.com/kb/310593 http://blogs.msdn.com/b/junfeng/archive/2006/09/19/761765.aspx 'HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession Manager', and very helpful to rename or delete files after restart, Windows Updatehotfix setup always use '....Session Manager' Ciao.
-
Hi guinness, First Sorry for my English I answer you, as you know well autoit, and you understand argument, because I did not want to answer to some other because I will not go down to certain levels is not another, and that by default in autoit, just been updated and too simple to understand _FileListToArrayEx (uses only 39 line of code) use only 1 While, and so more than logical and more faster there is not anything that does not support _FileListToArrayEx? http://youtu.be/DvJZsZKaUWY However, I want to clarify, this is a discourse without any importance, are not talking about who is better, God forbid (I with Melba23 in autoit us 1 with 10000 ehhhhhh, these my post, I'm not in any way disrespect about Melba23, also looking at its contribution to this community), I like me too much of the work Melba23 (and I was personally useful more than once), and also as a person, always present in the forum and always tries to help everyone without exception at Melba23 as an example but the same goes for all other users sorry again for my English Ciao a tutti.
-
+>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-> OS:WIN_8 , OS Arch:X64, Language:0409 -> Dos command returned 9416 items in 0.73 seconds. -> FileListToArrayRecursive returned 9512 items in 0.44 seconds. -> FileListToArray3 returned 9512 items in 1.46 seconds. -> RecFileListToArray returned 9512 items in 1.97 seconds. -> FileListTreeToArray returned 9512 items in 2.64 seconds. -> _FileListToArrayEx returned 9512 items in 0.41 seconds. +>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++