Sign in to follow this  
Followers 0
kor

Is there a way to kill the "add new hardware" wizard?

9 posts in this topic

I am having a problem with my driver installation script.

It auto logs into a computer after a re-image and determines of the computer model number, then installs various extra drivers (things that require an install).

The script auto logs the computer in, then immediately locks it to keep staff members from being able to access the machine while its logged in a local administrator.

My problem is that the add new hardware wizard keeps running displaying the window to try and search for drivers and pauses the script from being able to continue. If I cancel the wizard the script runs fine and installs all the needed drives.

Is there a way to kill the add new hardware wizard while the work station is locked?

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

The drivers that I am installing come from INSTALLS, which means SETUP.EXE's. They aren't simple inf files I can inject during sysprep.

Anyone have any ideas?

Edited by kor

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

You can stop the new hardware wizard service Posted Image

_StopService ( "ShellHWDetection" )
; install your drivers
_StartService ( "ShellHWDetection" )
Exit

Func _StartService ( $_ServiceName )
    RunWait ( @ComSpec & ' /c net start "' & $_ServiceName & '"', "", @SW_HIDE )
EndFunc ;==> _StartService ( )

Func _StopService ( $_ServiceName )
    RunWait ( @ComSpec & ' /c net stop "' & $_ServiceName & '"', "", @SW_HIDE )
EndFunc ;==> _StopService ( )
Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Then use AutoIt to see the wizard window and close it.

The script auto logs the computer in, then immediately locks it...

you can't see a window when a computer is locked as far as I know.

Share this post


Link to post
Share on other sites

How are you locking it? With a splash screen?

Seriously?

Run("RunDll32.exe user32.dll,LockWorkStation") ; lock workstation

Share this post


Link to post
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
Sign in to follow this  
Followers 0