Jump to content

Shocker

Active Members
  • Posts

    55
  • Joined

  • Last visited

Shocker's Achievements

Wayfarer

Wayfarer (2/7)

0

Reputation

  1. Thx for reply to all! Try some snippets with Array, but have no idea to compare Row's /Column's... Don't know if the right way? If all section values equal i want save to output.INI... file_a.ini file_b.ini file_c.ini file_d.ini
  2. Hi there! Looking for a simple way to read and compare different values from different INI files. It could be 4 files (if exist) or fewer. The values should be same (normally). If they are equal, safe this value to a variable to write in a new INI. ;sections for file_a.ini, file_b.ini, file_c.ini and file_d.ini [SectionName1] Key=Value_A [SectionName2] Key=Value_B [SectionName3] Key=Value_C Any idea?
  3. Think i found my mistake in Line 10. Have changed WinGetProcess($aWinList[$A][1]) into WinGetProcess($aWinList[$A][0]) and now script return correct handle.
  4. Hi there... Need a handle and try to get it from PID. I use _WinGetByPID but i get a "wrong" handle from this Process (use Window Info to check). If i use it for notepad.exe, calc.exe or mspaint.exe i get the right one. What's going wrong? MsgBox(0, "", _WinGetByPID("calc.exe", 1)) Func _WinGetByPID($iPID, $iArray = 1) ; 0 Will Return 1 Base Array & 1 Will Return The First Window. Local $aError[1] = [0], $aWinList, $sReturn If IsString($iPID) Then $iPID = ProcessExists($iPID) EndIf $aWinList = WinList() For $A = 1 To $aWinList[0][0] If WinGetProcess($aWinList[$A][1]) = $iPID And BitAND(WinGetState($aWinList[$A][1]), 2) Then If $iArray Then Return $aWinList[$A][1] EndIf $sReturn &= $aWinList[$A][1] & Chr(1) EndIf Next If $sReturn Then Return StringSplit(StringTrimRight($sReturn, 1), Chr(1)) EndIf Return SetError(1, 0, $aError) EndFunc ;==>_WinGetByPID
  5. Thx 4 reply! Found many of examples to compress files, but most without progressbar I found a example, where EXTRACT worked fine with progress bar, but i've no idea how i can use it with _7zipadd... ;_7ZIPExtractEx_Example_using_Callback.au3 #include <GuiConstantsEx.au3> #include <7Zip.au3> $hGUI = GUICreate("_7ZIPExtractEx demo", 300, 200) $ctlEdit = GUICtrlCreateEdit("", 10, 10, 280, 100) $ctlProgress = GUICtrlCreateProgress(10, 130, 280, 20) $ctlButton_Pack = GUICtrlCreateButton("Unpack!", 10, 167, 75, 23) $ctlButton_Close = GUICtrlCreateButton("Close", 215, 167, 75, 23) GUISetState() $ArcFile = FileOpenDialog("Select archive", "", "Archive Files (*.7z;*.zip;*.gzip;*.bzip2;*.tar)", 1, "", $hGUI) If @error Then Exit $sOutput = FileSelectFolder("Select output folder", "", 1, "", $hGUI) If @error Then Exit While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE, $ctlButton_Close Exit Case $ctlButton_Pack _7ZipStartup() $retResult = _7ZipSetOwnerWindowEx($hGUI, "_ARCHIVERPROC") If $retResult = 0 Then Exit MsgBox(16, "_7ZipAdd demo", "Error occured") $retResult = _7ZIPExtractEx($hGUI, $ArcFile, $sOutput, 1) _7ZipShutdown() If @error = 0 Then MsgBox(64, "_7ZIPExtractEx demo", "Archive unpacked successfully", 0, $hGUI) Else MsgBox(64, "_7ZIPExtractEx demo", "Error occurred", 0, $hGUI) EndIf GUICtrlSetData($ctlProgress, 0) GUICtrlSetData($ctlEdit, "") EndSwitch WEnd Func _ARCHIVERPROC($hWnd, $Msg, $nState, $ExInfo) Local $iFileSize, $iWriteSize, $iPercent = 0 If $nState = 0 Then Local $EXTRACTINGINFO = DllStructCreate($tagEXTRACTINGINFO, $ExInfo) GUICtrlSetData($ctlEdit, DllStructGetData($EXTRACTINGINFO, "szSourceFileName") & @CRLF, 1) $iFileSize = DllStructGetData($EXTRACTINGINFO, "dwFileSize") $iWriteSize = DllStructGetData($EXTRACTINGINFO, "dwWriteSize") $iPercent = Int($iWriteSize / $iFileSize * 100) GUICtrlSetData($ctlProgress, $iPercent) Return 1 EndIf If $nState = 2 Then GUICtrlSetData($ctlProgress, 100) Return 1 EndFunc
  6. Hi there, i'm looking for a simple way to compress Files with Progress Bar and percentage. I need a zip File, which can be extracted with Windows resources. Who can help me (perhaps with key words)?
  7. Hi @ all I want write a small installer for a driver who need KB3033929 (Win 7) or rather SHA-2 code signing. How can i check if SHA-2 Code signing is already available? If i want install KB3033929 it returned "already installed", but it is not listed if i try wmic qfe | findstr /R /I /C:"\<KB3033929" in command. Any other ideas?
  8. @AutoBert Thx 4 reply. It wouldn't work or i'm to stupid to use... $message = " " Local $x[6] $x[0] = " " $x[1] = ". " $x[2] = ".. " $x[3] = "... " $x[4] = ".... " $x[5] = "....." SplashTextOn("Information", $message, -1, -1, -1, -1, 4, "") While ProcessExists("notepad.exe") For $i = 0 To UBound($x) - 1 $message = $x[$i];[0] ControlSetText("Information", "", "Static1", "Installing" & $message) Sleep(500) If Not ProcessExists("notepad.exe") Then ExitLoop Next WEnd This^^ work, also ok? What do you mean with PID and 2D Array?
  9. @AutoBert Thx for reply! Get an error when testing... ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $message = $x[$i][0] $message = ^ ERROR #include <Array.au3> $message = "Installing " Local $x[3] $x[0] = "Installing. " $x[1] = "Installing.. " $x[2] = "Installing..." SplashTextOn("Information", $message, -1, -1, -1, -1, 4, "") For $i = 0 To UBound($x) + 1 $message = $x[$i][0] While ProcessExists("notepad.exe") ControlSetText("Information", "", "Static1", $message) Sleep(100) WEnd Next
  10. Hi @ all is it possible to updating a SplashTextOn (like example), but as long as a process exists? $message = "Installing " Local $x[3] $x[0] = "Installing. " $x[1] = "Installing.. " $x[2] = "Installing..." SplashTextOn("Information", $message, -1, -1, -1, -1, 4, "") For $i = 0 To UBound($x) + 1 $message = $x[$i] ControlSetText("Information", "", "Static1", $message) Sleep(1000) Next
  11. Thx 4 reply! Didn't work, return same sequence like #2
  12. Hi there, use FileListToArrayRec(1,1,1,2) to find 2 Files from different Folders. Array returns [0]|2 [1]|D:\MyProg\Folder\1\xyz123.txt [2]|D:\MyProg\Folder\2\xyz124.txt although second Filename is bigger than first one. Is there a simple way to correct that or only with _ArrayColInsert(), String splitting, _Arraysort(), _ArrayColDelete() etc.? Thx 4 reply
  13. Thx for reply! Func _registry() is not so important for the Driver installation. $hklm = "HKLM64" is for Regwrite into X64 Registry.
  14. Hi there... i´ve written a little X86/X64 Driver Installer on a X86 OS. It works under X86 but not right under X64. I use devcon for install and it shows "Driver successfully installed" but there are no Service-Entries like Type, Start type, Display Name, Executable and after reboot its all undone If i use CMDLINE with "devcon.exe install mydriver.inf root\mydevice" it works perfect - why not in the Script? Thx for reply
  15. Hi there, i try to remove a Driver Package on Win 8.1 (X64) with PnPutil - but it didn't work RunWait(@ComSpec & ' /k pnputil.exe -f -d ' & $sINF, @Systemdir, @SW_SHOW) ;it show wrong typed or File not found cause @Systemdir is C:\Windows\SYSWOW64 RunWait(@ComSpec & ' /k pnputil.exe -f -d ' & $sINF, @WindowsDir & "\system32", @SW_SHOW) ;same error but CMD GUI (ADMIN) show C:\Windows\System32 ;even if I type PnPutil with my Commands i get this error :-(What i'm doing wrong? Thx... Edit: with Filecopy or Fileinstall PnPutil.exe to @Systemdir or with devcon.exe dp_delete solved.
×
×
  • Create New...