Jump to content
Sign in to follow this  
ffdshow

Install a codec

Recommended Posts

ffdshow

I tried to "translate" this batch script for install a codec:

rundll32 setupapi,InstallHinfSection DefaultInstall 128 %~dp0camcodec.inf

into AutoIt.

This:

Run("rundll32.exe setupapi,InstallHinfSection DefaultInstall 128" & "\camcodec.inf")

does not work.

The files is in the same folder with autoit script.

Share this post


Link to post
Share on other sites
Monamo

I tried to "translate" this batch script for install a codec:

rundll32 setupapi,InstallHinfSection DefaultInstall 128 %~dp0camcodec.inf

into AutoIt.

This:

Run("rundll32.exe setupapi,InstallHinfSection DefaultInstall 128" & "\camcodec.inf")

does not work.

The files is in the same folder with autoit script.

Perhaps a spacing issue? With your example, the run command would be rendered (...DefaultInstall 128\camcodec.inf")

- 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
ffdshow

Run("rundll32.exe setupapi,InstallHinfSection DefaultInstall 128\camcodec.inf")

Not working

Share this post


Link to post
Share on other sites
Monamo

Run("rundll32.exe setupapi,InstallHinfSection DefaultInstall 128\camcodec.inf")

Not working

What I was trying to suggest was that you need an extra space in there. Your original code example:

Run("rundll32.exe setupapi,InstallHinfSection DefaultInstall 128" & "\camcodec.inf")

Would execute the line: "rundll32.exe setupapi,InstallHinfSection DefaultInstall 128\camcodec.inf"

However, your original batch file appears to have a space between 128 and camcodec.inf - SO to resolve the spacing issue, I'd try:

Run("rundll32.exe setupapi,InstallHinfSection DefaultInstall 128" & " \camcodec.inf")

or, since the concatenated ("&") portion is serving no purpose here, try rather:

Run("rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 \camcodec.inf")

Also, I don't know that the backslash("\") is really necessary before camcodec.inf either for .INF installations, so you may be able to trim that out as well.


- 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
ffdshow

I got the message Installation failed with this line and the others:

Run("rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 camcodec.inf")

Thx anyway.

Share this post


Link to post
Share on other sites
Monamo

I got the message Installation failed with this line and the others:

Run("rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 camcodec.inf")

Thx anyway.

Did a quick double-check on INF installation parameters, etc. Give this one a try:

Run("rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 " &@ScriptDir &"\camcodec.inf")

- 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
ffdshow

Did a quick double-check on INF installation parameters, etc. Give this one a try:

Run("rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 " &@ScriptDir &"\camcodec.inf")
Thanks man this work just fine. Thx for your effort <_< Edited by ffdshow

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  

×