hdwwiz - button doesn't work if run through Macro Scheduler

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
BobDDstryr
Junior Coder
Posts: 38
Joined: Fri Oct 22, 2010 2:47 am

hdwwiz - button doesn't work if run through Macro Scheduler

Post by BobDDstryr » Fri Feb 04, 2011 4:16 am

Win7 and Vista have a program, hdwwiz that you can use to install drivers.

Running Win7-64 (haven't tried the other OSes) - if I perform the following steps manually, things work:
Run hdwwiz
Click next
Select "Install the hardware that I manually select from a list (Advanced)" and click next,
Peruse a list of "Common Hardware Types" where I can select one (say "Network Adapters") and click next, and continue through the program.

However, if I create a Macro Scheduler script that only contains:
run>hdwwiz (or executefile>hdwwiz.. or run>cmd.exe /C hdwwiz)
and follow the exact same steps manually after starting it with macro scheduler - when I reach the "Common Hardware Types" step - the "Next" button won't work. It will reload the "Common Hardware Types" with your entry as the second from the bottom - and then nothing. You can click it; hit enter; try selecting anything in the list - and nothing but that happens. I discovered this when I realized that the "PushButton" command wasn't allowing it to continue, and started trying different experiments one at a time.

It's entirely possible that this is due to a bug in hdwwiz, but since it seems to work fine manually, I'm wondering if maybe macro scheduler is grabbing control of something it shouldn't? I dunno.. any ideas? This is with 12.1.2

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Feb 04, 2011 5:33 am

Hi Bob,
Please show us your PushButton script.
Try: PushButton>Add Hardware,&Next >

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Feb 04, 2011 10:18 am

The issue is that as you're on 64 bit but Macro Scheduler is 32 bit Windows is forcing Macro Scheduler to run a 32 bit version of hdwwiz. If we disable 64 bit file system redirection ( http://www.mjtnet.com/forum/viewtopic.php?t=5800 ) it works fine.

This works fine for me on Win7 x64. However you will need to make sure Macro Scheduler is running as admin or UAC is disabled because hdwwiz requires administrator privs.

Code: Select all

//turn of 64 bit file system redirection so that we are running the 64 bit hdwwiz
LibFunc>kernel32,Wow64DisableWow64FsRedirection,result,0

//run hdwwiz.exe
Run>hdwwiz.exe

//wait for it to open
WaitWindowOpen>Add Hardware
SetFocus>Add Hardware

//press next
Wait>0.2
Press ALT
Send>n
Release ALT

//wait for next screen and press alt-m for manual install option
Wait>1
Press ALT
Send>m
Release ALT

//press next
Wait>0.5
Press ALT
Send>n
Release ALT

//choose network adaptors
Wait>0.5
Send>Network Adap

//Press next
Wait>0.5
Press ALT
Send>n
Release ALT

LibFunc>Kernel32,Wow64Revert64FsRedirection,result,0
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

BobDDstryr
Junior Coder
Posts: 38
Joined: Fri Oct 22, 2010 2:47 am

Post by BobDDstryr » Sat Feb 05, 2011 12:38 am

Hey Marcus - that libFunc command is what I needed - thanks!

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts