badshah Posted February 16, 2021 Posted February 16, 2021 I am trying to add legacy driver gui script. I am not able to record anything but I found an old script on the forum: #include <GUIConstants.au3> #include <GuiListView.au3> #RequireAdmin Run("hdwwiz.exe") Local $commonTitle = "Add Hardware" WinWaitActive($commonTitle, "This wizard helps you install driver software to support older devices") ; Click Next Send("!n") WinWaitActive($commonTitle, "The wizard can search for other hardware and automatically install it for you") ; Install the hardware that I m_anually select from list (Advanced) Send("!m") ; Next Send("!n") WinWaitActive($commonTitle, "If you do not see the hardware category you want, click Show All Devices") $handleListView = ControlGetHandle($commonTitle, "", "[CLASS:SysListView32; INSTANCE:1]") $networkAdapterListBoxIndex = _GUICtrlListView_FindText($handleListView, "Network adapters") _GUICtrlListView_SetItemSelected($handleListView, $networkAdapterListBoxIndex); ; Click Next Send("!n") The above script is working but it does not move to next after selecting driver options. I want to select the sound driver option but I don't know how to do it or how to record a fresh one. Can anyone help me please.
Dan_555 Posted February 16, 2021 Posted February 16, 2021 When i ran the script, it stopped at the network adapters, because there were no network adapters (or any other options) available, at least not here on win10. to open the sound options, instead of the network adapters, change the $networkAdapterListBoxIndex = _GUICtrlListView_FindText($handleListView, "Network adapters") line into: $networkAdapterListBoxIndex = _GUICtrlListView_FindText($handleListView, "Sound") basically, you enter the text which should be searched, and the script will select it. Some of my script sourcecode
badshah Posted February 16, 2021 Author Posted February 16, 2021 6 hours ago, Dan_555 said: When i ran the script, it stopped at the network adapters, because there were no network adapters (or any other options) available, at least not here on win10. to open the sound options, instead of the network adapters, change the $networkAdapterListBoxIndex = _GUICtrlListView_FindText($handleListView, "Network adapters") line into: $networkAdapterListBoxIndex = _GUICtrlListView_FindText($handleListView, "Sound") basically, you enter the text which should be searched, and the script will select it. Thanks for the response. I tried adding sound and it even selects it. But the issue is not going forward from that windows. You can't move to next window on clicking next. However running hdwwiz.exe from cmd with admin privileges' it works just fine. I am trying to silent install a legacy hardware. I have inf, cat and sys files. I tried pnputil but it doesn't work.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now