-
Posts
2,003 -
Joined
-
Last visited
-
Days Won
13
jguinch last won the day on January 22 2022
jguinch had the most liked content!
About jguinch
- Birthday 05/13/1979
Profile Information
-
Member Title
Pause café
Recent Profile Visitors
2,159 profile views
jguinch's Achievements
-
@kahukuit : it works fine with Windows 10. I didn't try with Windows 11
-
ioa747 reacted to a post in a topic: Printers Management UDF
-
jguinch reacted to a post in a topic: IsArrayEmpty
-
@Gianni : Not, it was not designed for nested arrays. Like you said, "up to you decide" 😀
-
Another one : Func IsArrayEmpty($aArray) Local $iIndex, $iCount = 1, $sArray Local $iDimensions = UBound($aArray, 0) If @error Then Return SetError(1, 0, 0) For $i = 1 To $iDimensions $iCount *= UBound($aArray, $i) Next Local $iStep = $iCount, $iLastStep = $iCount For $i = 1 To $iDimensions If $i > 1 Then $iLastStep = $iStep $iStep /= UBound($aArray, $i) $iIndex = -1 $sArray = "" For $j = 0 To $iCount - 1 $iIndex += 1 If $iIndex = $iLastStep Then $iIndex = 0 $sArray &= "[" & Int($iIndex/$iStep) & "]" If $i = $iDimensions Then If Execute("$aArray" & $sArray) <> "" Then Return 0 EndIf Next Next Return 1 EndFunc
-
ahmeddzcom reacted to a post in a topic: Get resolution from another monitor
-
Parsix reacted to a post in a topic: StringRegEx get all URLs domain's names
-
yutijang reacted to a post in a topic: Real-Time log file viewer
-
jguinch reacted to a post in a topic: Printer Manager
-
There are two steps to perform the job: 1 - Installing the driver Two ways : - use #RequireAdmin - allow non-administrators to install printer drivers. That second way can be done using a group policy like this : How to edit a GPO to edit the Driver Installation policy to allow non-admins to install printers (4225529) (oneidentity.com) 2 - Installing the printer First, you have do understand what kind of printer you want to install. Is it a local printer or a shared printer ? If it's a shared printer, it's not necessary to elevalate privileges (so no need of #RequireAdmin). Just use _PrintMgr_AddWindowsPrinterConnection per user no per computer If it's a local printer (using a TCP/IP port), you will need to use #RequireAdmin
-
Hello @Celina76. Thanks for your message. In fact, the _ArrayAssign function is only useful in very rare cases. I think you have a 99.9% chance of not needing it. I advise you to use the native array declaration method, and in particular ReDim which will allow you to resize an array and therefore add rows easily
-
etidd reacted to a post in a topic: FileCopy() - Multiple File Types
-
marcus_tong reacted to a post in a topic: FileCopy() - Multiple File Types
-
FileCopy() - Multiple File Types
jguinch replied to etidd's topic in AutoIt General Help and Support
Just a loop : Local $aExt = ["*.d2s","*.key","*.ma0","*.ma1","*.ma2","*.ma3","*.map"] For $ext in $aExt FileCopy("C:\Users\------\Saved Games\Diablo II\" & $ext, "F:\Game Backup\Diablo II") Next -
Get Time it took to copy a File
jguinch replied to ayu_2403's topic in AutoIt General Help and Support
Here is one way : Local $hTimer = TimerInit() Local $sSource = "C:\Users\opc\Desktop\src\10GB_1.bin" Local $sDestination = "C:\Users\opc\Desktop\target\" _FileCopy($sSource, $sDestination) Local $fDiffInSec = TimerDiff($hTimer)/1000 Func _FileCopy($src, $dest) Local $oShell = ObjCreate("shell.application") $oShell.namespace($dest).CopyHere($src,256) EndFunc -
jguinch reacted to a post in a topic: How to run not elevated program ?
-
mLipok reacted to a post in a topic: How to run not elevated program ?
-
SOLVE-SMART reacted to a post in a topic: How to run not elevated program ?
-
How to run not elevated program ?
jguinch replied to mLipok's topic in AutoIt General Help and Support
There is a simple way using the "__COMPAT_LAYER" environment variable, but it does not work with all programs. Example here, if you want to run regedit without privileges : EnvSet("__COMPAT_LAYER", "RunAsInvoker") Run("regedit.exe") Run application without elevation ('Run As Administrator') (nirsoft.net) -
GHoSTiewicz reacted to a post in a topic: Printers Management UDF
-
argumentum reacted to a post in a topic: Printers Management UDF
-
@mandriospo 1. No, it's not possibile with this UDF for the moment. Although interesting, this feature is a little more complicated to implement. Unfortunately, I don't have the time right now for this. 2. This is not a bug. I just consider that if there is no printer that matches the search, it's not an error. The _PrintMgr_PrinterExists function is used precisely to ensure that the printer exists 3. Sometimes, exe file can be unpacked using 7Zip or other applications. Please, try it
-
jguinch reacted to a post in a topic: AutoIt v.3.3.16.1 Released
-
Added _SetCategory function, to set the category of a network (Public, Private, Domain)
-
How to set network state private or public using AutoIt ?
jguinch replied to t0nZ's topic in AutoIt General Help and Support
Here is a way to do it without using any external command (just use COM objects) #RequireAdmin ; Needed _NetSetCategory("LAN", 1) ; Sets the Private category to the network connection called "LAN" ; #FUNCTION# ==================================================================================================================== ; Name...........: _NetSetCategory ; Description....: Sets the category of a network. Changes made take effect immediately ; Syntax.........: _NetSetCategory($sNetworkId, $iNetCategory) ; Parameters.....: $sNetworkId - Name of the network connection ; $iNetCategory - New category of the network. Can be one of : ; 0 : Public ; 1 : Private ; 2 : Domain ; Return values..: Success - 1 ; Failure - 0 and sets the @error flag to non-zero ; Remarks........: The function requires administrator privileges ; =============================================================================================================================== Func _NetSetCategory($sNetworkId, $iNetCategory) Local $iRet = 1, $iNetFound = 0, $oNetwork, $oNetConnection If Not IsAdmin() Then Return SetError(4, 0, 0) If Not IsInt($iNetCategory) Or $iNetCategory < 0 Or $iNetCategory > 2 Then Return SetError(5, 0, 0) Local $INetListManager = ObjCreate("{DCB00C01-570F-4A9B-8D69-199FDBA5723B}") If Not IsObj($INetListManager) Then Return SetError($iRet, 0, 0) Local $oNetConnections = $INetListManager.GetNetworkConnections() If IsObj($oNetConnections) Then For $oNetConnection In $oNetConnections $oNetwork = $oNetConnection.GetNetwork If $oNetwork.GetName = $sNetworkId Then $iNetFound = 1 Execute("$oNetwork.SetCategory($iNetCategory)") $iRet = (@error ? 2 : 0) EndIf Next If Not $iNetFound Then $iRet = 3 EndIf $INetListManager = 0 If $iRet Then Return SetError($iRet, 0, 0) Return 1 EndFunc ; ===> _NetSetCategory Inspired from @Danyfirex code (thanks)- 7 replies
-
- network
- networking
-
(and 1 more)
Tagged with:
-
Local wifi password viewer and qr generator
jguinch replied to Hunter070's topic in AutoIt Example Scripts
Can you try this in command line (in elevated cmd): md c:\Windows\Temp\wifi cd /d c:\Windows\Temp\wifi netsh wlan export profile key=clear so you will have one xml file per SSID, in c:\windows\temp\wifi. You can now parse each XML file to get the informations you need. Not sure it contains the key... -
jguinch reacted to a file: AutoIt (Latest Stable Version)
-
Anyway, all Windows 10 users using a supported version (except the LTSC version) will be affected by the removal of Internet Explorer on June 15, 2022 https://docs.microsoft.com/en-us/lifecycle/announcements/internet-explorer-11-end-of-support
-
jguinch reacted to a post in a topic: AutoIt v.3.3.16.0 Released
-
What about the end of life of Internet Explorer ? From June 15, 2022, Internet Explorer will disappear from Windows 10 through Windows Updates - only for currently supported versions except LTSC version. Has anyone been able to test the AutoIt fonctions related to Internet Explorer with Windows 11? It seems that some functions will no longer work, maybe it would be wise to identify them and add a comment in the help file ?
-
jguinch reacted to a post in a topic: AutoIt v3.3.15.5 Beta
-
jguinch reacted to a post in a topic: CryptoNG UDF - Cryptography API: Next Gen
-
@TheXman : what about asking Powershell to to the whole job ? (replacement of " and without temp file) #include <Constants.au3> Local $PS_CMD = "(Get-Process|where{$_.MainWindowTitle}|select MainWindowHandle,Id,ProcessName,MainWindowTitle,Handles -first 4|ConvertTo-Csv -NoTypeInformation -Delimiter '|')-replace '""""', ''" $iPid = Run(StringFormat('powershell -command "%s"', $PS_CMD), "", @SW_HIDE, $STDOUT_CHILD ) ProcessWaitClose($iPid) $sOut = StdoutRead($iPid) ConsoleWrite($sOut)