Jump to content

AutoIT Script Detect HW Change - (Moved)


Recommended Posts

Hi,

I'm an IT Engineer at a college, we are currently rolling out Windows 10 throughout the estate. We have a piece of software which is used by our Radio students, which relies on USB dongle licence keys. Due to security, we cannot make these USB keys accessible to students, so I have them attached to a PC in our data center, which are then shared out by a piece of software called "VirtualHere".

The problem is, I had written an AutoIT script which would -

1. Launch the VirtualHere client on the end-users device.
2. Wait for a hardware change event to occur and for "USB Input Device" to appear as a device in Device Manager (USB licence dongle).
3. Launch the piece of software used by the Radio Students (Synergy).

This script worked perfectly (and still does) on Windows 7, but doesn't appear to work on Windows 10 (1709). I'm a little confused as to what is going on here, I've added a message box as a test and from my test, it looks like the script isn't detecting the hardware change under Windows 10.

I've attached the script to this post, I'd greatly appreciate any help that can be given.

When running the script on Windows 10 with SciTE, the script execution ends with -

$colDevices = $objWMIService.ExecQuery ("Select * From Win32_USBControllerDevice")
$colDevices = $objWMIService^ ERROR
>Exit code: 1    Time: 3.799

AutoIT Script -

;Set Program Executable Details/Info
#pragma compile(Compatibility, win7)
#pragma compile(UPX, False)
#pragma compile(FileDescription, Synergy Runner)
#pragma compile(ProductName, Synergy Runner)
#pragma compile(ProductVersion, 2.0)
#pragma compile(FileVersion, 2.0) ; The last parameter is optional.
#pragma compile(LegalCopyright, © Richard Hughes)
#pragma compile(LegalTrademarks, 'City of Glasgow College')
#pragma compile(CompanyName, 'City of Glasgow College')


ProcessClose ( "COGC Synergy Licence Splash Screen.exe" )
ProcessClose ( "SRControlBar.exe" )
ProcessClose ( "vhui64.exe" )

$COGCSplash = "C:\Program Files (x86)\Diaced\Synergy\Bin\COGC Synergy Licence Splash Screen.exe"
$VirtualHereClient = "C:\Program Files\VirtualHere Client\vhui64.exe --start-minimized"



;Run COGCSplash
$SplashPID = Run ( $COGCSplash )

;Run VirtualHere USB Client silently
Run ( $VirtualHereClient ,"", @SW_MINIMIZE )

Global $Paused
HotKeySet("{Pause}","TogglePause")

$WM_DEVICE_CHANGE = 0x0219
$DBT_DEVNODES_CHANGED = "0x00000007"

GUICreate("")

GUIRegisterMsg($WM_DEVICE_CHANGE , "MyFunc")

Func MyFunc($hWndGUI, $MsgID, $WParam, $LParam)
If $WParam == $DBT_DEVNODES_CHANGED Then
   
If($PAUSED <> True)Then
tokenChk()
Exit
EndIf
EndIf
EndFunc

While 1
$GuiMsg = GUIGetMsg()
WEnd

Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc

Func tokenChk()

$mcount = 0

$strComputer = "."

$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\cimv2")
$colDevices = $objWMIService.ExecQuery ("Select * From Win32_USBControllerDevice")

For $objDevice in $colDevices
$strDeviceName = $objDevice.Dependent
$strQuotes = Chr(34)
$strDeviceName = StringReplace($strDeviceName, $strQuotes, "")
$arrDeviceNames = StringSplit($strDeviceName, "=")
$strDeviceName = $arrDeviceNames[2]
$colUSBDevices = $objWMIService.ExecQuery ("Select * From Win32_PnPEntity Where DeviceID = '" & $strDeviceName & "'")

For $objUSBDevice in $colUSBDevices
If($objUSBDevice.Description == "USB Input Device")Then
   MsgBox(4096, "Info", "Synergy Licence Dongle Connected.")
$mcount = 1

;Run Synergy Production under the context of the above local user account.
;Flag set to 1 for Interactive logon with profile.
Sleep(10000)
ProcessClose($SplashPID)
$PID = Run("C:\Program Files (x86)\Diaced\Synergy\Bin\SRControlBar.exe")

;Release licence if Synergy is closed
ProcessWaitClose($PID)
ProcessClose ( "vhui64.exe" )
EndIf
Next
Next
EndFunc

Cheers,
Richard

Link to comment
Share on other sites

I am a newbie myself but my guess would be that the error arises when using the method of the object that is declared on the line above.

$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\cimv2")

after that line I would add if @error and display @error and @extended it is possible that object is not found on win10,  or the methods have changed slightly , but I do not know anything about that object in specific , sorry

Link to comment
Share on other sites

Hi Ternal,

Cheers for your help, you are spot on! I've just added the following as suggested, and I get "Error". At least I know where the problem likely lies, how I fix that I'm not too sure :D

If Not @error Then
   MsgBox(4096, "Info", "No Error")
EndIf
        ;Else Click 2
If @error Then
   MsgBox(4096, "Info", "Error")
EndIf

Thanks again, much appreciated!

Cheers,
Richard

Link to comment
Share on other sites

If @error then msgbox(0, 0, "Error : "  &  @error  &  @CRLF  &  "Extended : "  &  @extended)

this is how you get the errormessage.

then you can go into the help file to see what that error means, extended is mostly used for function specific things.

 

from there on forward you can tell what is wrong on the object.

 

 

edit: it is still quite possible that that object does not excist anymore in win10 or is completly reworked or the  ExecQuery method is reworked, renamed or anything. I am in the dark here

I am struggling with objects and COM myself to be honest

Edited by ternal
Link to comment
Share on other sites

Just added this in and re-ran the script. I'm getting -

Error: -2147417843
Extended: 0

Had a look at the Help file, is this from SciTE Editor, Help > Help? Tried searching the long error code, but there weren't any results. Tried a quick Google Search too and I seem to be the only one with this error code (oh no).

Cheers,
Richard

Link to comment
Share on other sites

https://community.spiceworks.com/topic/1245352-winmgmt-for-windows-10-where-is-it

https://stackoverflow.com/questions/44963115/vbs-invalid-query-in-windows-10

the latter is a similar issue, the solution is in VBS though, maybe someone else can help with doing the similar approach in autoit. I am not confident enough to try

 

edit: I think that number is the Hresult return from the objget

http://www.mediamonkey.com/forum/viewtopic.php?t=12986

if you want additional info you can google, I found plenty of results with -2147417843 but do not forget to google for "-2147417843" if you leave out the quotation marks then the search engine enterprets it as all result without 2147417843

Edited by ternal
Link to comment
Share on other sites

  • Moderators

Moved to the appropriate forum, as the Developer General Discussion forum very clearly states:

Quote

General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here.


Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

23 minutes ago, Melba23 said:

Moved to the appropriate forum, as the Developer General Discussion forum very clearly states:

Moderation Team

Apologies for that, although the description on the forum's homepage could be very misleading. If the warning was to be included in the main description, then that may prevent the wrong forum being used in the future.

Link to comment
Share on other sites

Hi,


maybe try this on elvated rights(admin) :

$strComputer =  "."
$strQuery = "Select * From Win32_USBControllerDevice"
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\cimv2")
If @error then MsgBox(0, 0, "objget error:" & @error & @CRLF & "Extended : " & @extended)
$colDevices = $objWMIService.ExecQuery ($strQuery)

Else you need to look into winmgmts and how to find win32 usb devices in win10 I am clueless

I think the problem lies there

Edited by ternal
Link to comment
Share on other sites

2 hours ago, ternal said:

Hi,
maybe try this on elvated rights(admin) :

 

I am running Win 10 version 1703 build 15063.1206.

If I try this below (using ternals solution), it works.

$strComputer =  "."
$strQuery = "Select * From Win32_USBControllerDevice"
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\cimv2")
If @error then MsgBox(0, 0, "objget error:" & @error & @CRLF & "Extended : " & @extended)
$colDevices = $objWMIService.ExecQuery ($strQuery)

If IsObj($colDevices) Then
    For $objItem In $colDevices
        For $sProperty In $objItem.Properties_
            ConsoleWrite($sProperty.Name & ": " & $sProperty.Value & @CRLF)
        Next
    Next
EndIf

Perhaps you could try compiling without the "#pragma compile(Compatibility, win7)" directive?

Always carry a towel.

Link to comment
Share on other sites

@ModemJunki it worked on my side as well without my solution...

my solution was just the same solution they used in the vbs link I put up here. The only thing I did was place everything in a variable in stead of hardcoding it. I also added errorchecking.. Its just VERY helpfull to have it output error and extended in case something goes sideways

80% sure the problem lies with wingmts or his windows version/ rights

Edited by ternal
Link to comment
Share on other sites

17 minutes ago, ternal said:

80% sure the problem lies with wingmts or his windows version/ rights

I agree on that. Perhaps a policy on the target machine(s) is the issue.

@Richard_H, have you tried to run autoit scriptomatic on one of the client machines with a client account and query the WMI repository with that?

 

 

Always carry a towel.

Link to comment
Share on other sites

Thanks for all of your responses on this. I've just tried running the suggested code -

$strComputer =  "."
$strQuery = "Select * From Win32_USBControllerDevice"
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\cimv2")
If @error then MsgBox(0, 0, "objget error:" & @error & @CRLF & "Extended : " & @extended)
$colDevices = $objWMIService.ExecQuery ($strQuery)

If IsObj($colDevices) Then
    For $objItem In $colDevices
        For $sProperty In $objItem.Properties_
            ConsoleWrite($sProperty.Name & ": " & $sProperty.Value & @CRLF)
        Next
    Next
EndIf

Which ran successfully! It outputted the result in the SciTE console as it should. Why my original script doesn't work, makes this even more confusing. I'll also give the Autoit Script-o-matic a try.

 

Tried Script-o-matic, this works too and produces output with Win32_USBControllerDevice.

 

Cheers again!
Richard

Edited by Richard_H
Link to comment
Share on other sites

I'm starting to think that this may be more of a USB device issue than it being an issue with the script. I've discovered that when I run the VirtualHere client software and manually connect to a shared USB dongle, I sometimes (not always) get this in device manager...

Windows has stopped this device because it has reported problems. (Code 43)

A request for the USB device descriptor failed.

I have a feeling that Windows 10 may not be liking either these USB licence keys or there is an issue with the VirtualHere software/driver.

Link to comment
Share on other sites

8 hours ago, Richard_H said:

I'm starting to think that this may be more of a USB device issue than it being an issue with the script.

I've a similar problem with one particular external USB device - it will sometimes not start, but resetting it fixes it. So I use devcon.exe to brute-force restart it when I need to, this usually does the trick.

Maybe this will help you (replace the string for the device ID in $strn_devcon)

#RequireAdmin
$path_Devcon = @ScriptDir & '\'
$tool_devcon = "devcon.exe"
$strn_devcon = " restart " & '"USB\VID_13FE&PID_2012"'
$RunString = $path_Devcon & $tool_devcon & $strn_devcon
$sres1 = RunWait(@ComSpec & " /c " & $RunString, "", @SW_HIDE)

ClipPut($RunString)

If $sres1 <> 0 Then
    MsgBox(4096,"Error", "There wasn an error executing the command:" & @CRLF & $RunString & @CRLF &"The command is copied to the clipboard.",10)
    ClipPut($RunString)
Else
    MsgBox(4096,"Restarted", "Device restart with command below is succesful:" & @CRLF & $tool_devcon & $strn_devcon, 10)
EndIf

Or perhaps this - a bit more complete, looks at the actual status of the device and would allow some detailed logging if you want, replace the string for the device in $s_Device. I've included functions to use to translate the device code in case you can use them.

Note that devcon command line can also accept running against a remote device if you have to adapt the WMI function to read USB device state remotely.

#RequireAdmin
#include <Debug.au3>
$path_Devcon = @ScriptDir & '\'
$tool_devcon = "devcon.exe"
$cmd4_devcon = " restart "

$s_Device = "DISK&VEN_OTG&PROD_OTG" ; change this to the PNP string you want to use

$a_USBInf = _GetUSBDeviceInfo($s_Device) ; lets get the information about the device
Select
    Case UBound($a_USBInf) - 1 = 0
        If Not @Compiled Then ConsoleWrite("Device not found." & @CRLF) ; we did not find the device
    Case Else
        For $i = 1 To UBound($a_USBInf) - 1
            If $a_USBInf[$i][4] <> 0 Then
                $RunString = $path_Devcon & $tool_devcon & $cmd4_devcon & "'" & $a_USBInf[$i][8] & "'" ; restart the device using the DeviceID
                    $sres1 = RunWait(@ComSpec & " /c " & $RunString, "", @SW_HIDE)
                    sleep(500)
                ClipPut($RunString)
            EndIf
        Next
EndSelect

; #FUNCTION# ====================================================================================================================
; Name ..........: _GetUSBDeviceInfo
; Description ...: Returns information about a USB device by it's PnP ID.
; Return value...: A 2-d array of device information.
; ===============================================================================================================================
Func _GetUSBDeviceInfo($USBVIDPID)
    Local $colItems, $objWMIService, $objItem, $s_Avail, $s_CfgErr, $s_strInstDate, $strPowerManagementCapabilities, $s_LastReset
    Dim $a_USBDev[1][31], $i = 1

    $objWMIService = ObjGet("winmgmts:\\" & @ComputerName & "\ROOT\CIMV2")
    $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_PnPEntity WHERE PNPDeviceID LIKE '%" & $USBVIDPID & "%'", "WQL")

    If IsObj($colItems) Then
        For $objItem In $colItems
            ReDim $a_USBDev[UBound($a_USBDev) + 1][31]
            $a_USBDev[$i][0] = $objItem.Availability
            $a_USBDev[$i][1] = $objItem.Caption
            $a_USBDev[$i][2] = $objItem.ClassGuid
            $a_USBDev[$i][3] = $objItem.CompatibleID ; is an array
            $a_USBDev[$i][4] = $objItem.ConfigManagerErrorCode ; raw code
            $a_USBDev[$i][5] = $objItem.ConfigManagerUserConfig
            $a_USBDev[$i][6] = $objItem.CreationClassName
            $a_USBDev[$i][7] = $objItem.Description
            $a_USBDev[$i][8] = $objItem.DeviceID
            $a_USBDev[$i][9] = $objItem.ErrorCleared
            $a_USBDev[$i][10] = $objItem.ErrorDescription
            $a_USBDev[$i][11] = $objItem.HardwareID
            If IsObj($objItem.InstallDate) Then
                $s_strInstDate = _WMIDateStringToDate($objItem.InstallDate)
            Else
                $s_strInstDate = "Unknown"
            EndIf
            $a_USBDev[$i][12] = $s_strInstDate
            $a_USBDev[$i][13] = $objItem.LastErrorCode
            $a_USBDev[$i][14] = $objItem.Manufacturer
            $a_USBDev[$i][15] = $objItem.Name
            $a_USBDev[$i][16] = $objItem.PNPClass
            $a_USBDev[$i][17] = $objItem.PNPDeviceID
            $a_USBDev[$i][18] = $objItem.PowerManagementCapabilities
            $a_USBDev[$i][19] = $objItem.PowerManagementSupported
            $a_USBDev[$i][20] = $objItem.Present
            $a_USBDev[$i][21] = $objItem.Service
            $a_USBDev[$i][22] = $objItem.Status
            $a_USBDev[$i][23] = $objItem.StatusInfo
            $a_USBDev[$i][24] = $objItem.SystemCreationClassName
            $a_USBDev[$i][25] = $objItem.SystemName

            $i += 1
        Next
        $a_USBDev[0][0] = UBound($a_USBDev) - 1
        If $a_USBDev[0][0] < 1 Then
            SetError(1, 1, 0)
        EndIf
    Else
        SetError(1, 2, 0)
    EndIf
    $a_USBDev[0][0] = UBound($a_USBDev)
    Return $a_USBDev
EndFunc   ;==>_GetUSBDeviceInfo


; #FUNCTION# ====================================================================================================================
; Name ..........: _AvailXref
; Description ...: Cross-reference the Availability return to it's text string
; Reference:.....: https://msdn.microsoft.com/en-us/library/windows/desktop/aa394400%28v=vs.85%29.aspx
; Syntax ........: _AvailXref($s_code)
; Parameters ....: $s_code   - Integer value of the $objItem.Availability object from WMI query of Win32_SCSIController.
; Return value...:           - Concatenation of the passed integer value and it's cross-reference text.
; ===============================================================================================================================
Func _AvailXref($s_code)
    Local $s_ret = ""
    Local $a_arr[17][2] = [ _
            ["1", "((0x1) Other)"], _
            ["2", "((0x2) Unknown)"], _
            ["3", "((0x3) Running or Full Power)"], _
            ["4", "((0x4) Warning)"], _
            ["5", "((0x5) In Test)"], _
            ["6", "((0x6) Not Applicable)"], _
            ["7", "((0x7) Power Off)"], _
            ["8", "((0x8) Off Line)"], _
            ["9", "((0x9) Off Duty)"], _
            ["10", "((0xA) Degraded)"], _
            ["11", "((0xB) Not Installed)"], _
            ["12", "((0xC) Install Error)"], _
            ["13", "((0xD) Power Save - Unknown (The device is known to be in a power save mode, but its exact status is unknown).)"], _
            ["14", "((0xE) Power Save - Low Power Mode (The device is in a power save state but still functioning, and may exhibit degraded performance).)"], _
            ["15", "((0xF) Power Save - Standby (The device is not functioning, but could be brought to full power quickly).)"], _
            ["16", "((0x10) Power Cycle)"], _
            ["17", "((0x11) Power Save - Warning (The device is in a warning state, though also in a power save mode).)"] _
            ]
    For $i = 0 To UBound($a_arr) - 1
        If $s_code = $a_arr[$i][0] Then $s_ret = $a_arr[$i][0] & ", " & $a_arr[$i][1]
    Next

    If $s_ret = "" Then $s_ret = "Availability code not translatable. The code returned was a null value. See https://msdn.microsoft.com/en-us/library/windows/desktop/aa394400%28v=vs.85%29.aspx"

    Return $s_ret
EndFunc   ;==>_AvailXref

; #FUNCTION# ====================================================================================================================
; Name ..........: _ConfigMgrErrXref
; Description ...: Cross-reference the Configuration Manager return value to it's text string
; Reference:.....: https://msdn.microsoft.com/en-us/library/windows/desktop/aa394400%28v=vs.85%29.aspx
; Syntax ........: _ConfigMgrErrXref($s_code)
; Parameters ....: $s_code   - Integer value of the $objItem.ConfigManagerErrorCode object from WMI query of Win32_SCSIController.
; Return value...:           - Concatenation of the passed integer value and it's cross-reference text.
; ===============================================================================================================================
Func _ConfigMgrErrXref($s_code)
    Local $s_ret = ""
    Local $a_arr[32][2] = [ _
            ["0", "((0x0) Device is working properly.)"], _
            ["1", "((0x1) Device is not configured correctly.)"], _
            ["2", "((0x2) Windows cannot load the driver for this device.)"], _
            ["3", "((0x3) Driver for this device might be corrupted, or the system may be low on memory or other resources.)"], _
            ["4", "((0x4) Device is not working properly. One of its drivers or the registry might be corrupted.)"], _
            ["5", "((0x5) Driver for the device requires a resource that Windows cannot manage.)"], _
            ["6", "((0x6) Boot configuration for the device conflicts with other devices.)"], _
            ["7", "((0x7) Cannot filter.)"], _
            ["8", "((0x8) Driver loader for the device is missing.)"], _
            ["9", "((0x9) Device is not working properly. The controlling firmware is incorrectly reporting the resources for the device.)"], _
            ["10", "((0xA) Device cannot start.)"], _
            ["11", "((0xB) Device failed.)"], _
            ["12", "((0xC) Device cannot find enough free resources to use.)"], _
            ["13", "((0xD) Windows cannot verify the device's resources.)"], _
            ["14", "((0xE) Device cannot work properly until the computer is restarted.)"], _
            ["15", "((0xF) Device is not working properly due to a possible re-enumeration problem.)"], _
            ["16", "((0x10) Windows cannot identify all of the resources that the device uses.)"], _
            ["17", "((0x11) Device is requesting an unknown resource type.)"], _
            ["18", "((0x12) Device drivers must be reinstalled.)"], _
            ["19", "((0x13) Failure using the VxD loader.)"], _
            ["20", "((0x14) Registry might be corrupted.)"], _
            ["21", "((0x15) System failure. If changing the device driver is ineffective, see the hardware documentation. Windows is removing the device.)"], _
            ["22", "((0x16) Device is disabled.)"], _
            ["23", "((0x17) System failure. If changing the device driver is ineffective, see the hardware documentation.)"], _
            ["24", "((0x18) Device is not present, not working properly, or does not have all of its drivers installed.)"], _
            ["25", "((0x19) Windows is still setting up the device.)"], _
            ["26", "((0x1A) Windows is still setting up the device.)"], _
            ["27", "((0x1B) Device does not have valid log configuration.)"], _
            ["28", "((0x1C) Device drivers are not installed.)"], _
            ["29", "((0x1D) Device is disabled. The device firmware did not provide the required resources.)"], _
            ["30", "((0x1E) Device is using an IRQ resource that another device is using.)"], _
            ["31", "((0x1F) Device is not working properly. Windows cannot load the required device drivers.)"] _
            ]
    For $i = 0 To UBound($a_arr) - 1
        If $s_code = $a_arr[$i][0] Then $s_ret = $a_arr[$i][0] & ", " & $a_arr[$i][1]
    Next

    If $s_ret = "" Then $s_ret = "Error code not translatable. The code returned was a null. See https://msdn.microsoft.com/en-us/library/windows/desktop/aa394400%28v=vs.85%29.aspx"

    Return $s_ret
EndFunc   ;==>_ConfigMgrErrXref

; #FUNCTION# ====================================================================================================================
; Name ..........: WMIDateStringToDate should only be uncommented if this include is used without globalincludes.au3
; Description ...: Turns WMI datestring into a formatted date string
; Syntax ........: _WMIDateStringToDate($dtmDate)
; Parameters ....: $dtmDate  - Raw date object from WMI query
; Return value...:           - Formatted date string
; ===============================================================================================================================
Func _WMIDateStringToDate($dtmDate)
    Return (StringMid($dtmDate, 5, 2) & "/" & StringMid($dtmDate, 7, 2) & "/" & StringLeft($dtmDate, 4) _
             & " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate, 13, 2))
EndFunc   ;==>_WMIDateStringToDate

 

Always carry a towel.

Link to comment
Share on other sites

Thanks for all the help so far, It's really appreciated. I'm really pushed for time to get this issue resolved as we need to complete the Windows 10 role out. I've come up with a possible alternative... Instead of monitoring WMI, I've created a Windows Scheduled Task which runs the software when event Synergy Authentication Proxy 205 is triggered in Event Log. This does work and provides similar functionality as to the original script I had created for Windows 7, but I'd prefer to not have a scheduled task. Does anybody know if Autoit has the functionality to detect events which are logged in Event Viewer and perform an action when the event is triggered? (similar to the scheduled task?). I'd prefer to keep all of this to one script, instead of a script and a scheduled task.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...