Sign in to follow this  
Followers 0
kjason

I want to automate the inf driver install / uninstall with AutoIT

5 posts in this topic

Hi? there

I want to automate installing *.inf and uninstalling with AutoIT.

Would you kindly help me with it?

Please, give me some sample code.

Thanks for reading my post.

Share this post


Link to post
Share on other sites



Feelin' snarky...

I want to automate installing *.inf and uninstalling with AutoIT.

Step 1 (Installing)- http://www.tech-recipes.com/windows_tips462.html - Learn to love Google. Heck, even try searching the forums.

Step 2 (Uninstalling) - I've performed my one non-personal google search today (See above)

Please, give me some sample code.

Step 2 - No, check out the help file. Of particular interest will be the Run() command

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Share this post


Link to post
Share on other sites

Thanks guys ~

Would you explain more detail? especially, about uninstalling device.

I tried to check this fourm but I could not find the answer ( Sorry, mabe there are some...but I'm a beginner)

Would you explain a bit more in detail or possiblly some sample code?

About devcon....... I also looked into it but no idea...ㅜㅜ

Anyway, thanks monamo and weaponx.

Share this post


Link to post
Share on other sites

Moin,

M$ installs .INF files with the command: "rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 file_name.inf"

So, do in AutoIt this for default *.inf files:

; to install an .INF file
$sPathINF = 'C:\AnyWhere\file_name.inf'    ; the full path to your *.inf file
RunWait(@SystemDir & '\rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 ' & $sPathINF)

; to uninstall an .INF file
$sPathINF =     ; the full path to the copied *.inf file
RunWait(@SystemDir & '\rundll32.exe setupapi,InstallHinfSection DefaultUninstall 132 ' & $sPathINF)

For drivers it is a little bit tricky to get the path/uninstall section of the driver.inf ...

Test a normal installation of the driver and explore the Registry in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall to figure it out ...

Also take a look at here:

http://search.msdn.microsoft.com/Default.a...mp;locale=de-de

Greetz

Greenhorn

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