ffdshow Posted October 24, 2007 Share Posted October 24, 2007 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. Link to comment Share on other sites More sharing options...
Monamo Posted October 24, 2007 Share Posted October 24, 2007 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] Link to comment Share on other sites More sharing options...
ffdshow Posted October 24, 2007 Author Share Posted October 24, 2007 Run("rundll32.exe setupapi,InstallHinfSection DefaultInstall 128\camcodec.inf") Not working Link to comment Share on other sites More sharing options...
Monamo Posted October 24, 2007 Share Posted October 24, 2007 Run("rundll32.exe setupapi,InstallHinfSection DefaultInstall 128\camcodec.inf") Not workingWhat 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] Link to comment Share on other sites More sharing options...
ffdshow Posted October 24, 2007 Author Share Posted October 24, 2007 I got the message Installation failed with this line and the others: Run("rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 camcodec.inf") Thx anyway. Link to comment Share on other sites More sharing options...
Monamo Posted October 24, 2007 Share Posted October 24, 2007 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] Link to comment Share on other sites More sharing options...
ffdshow Posted October 24, 2007 Author Share Posted October 24, 2007 (edited) 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 October 24, 2007 by ffdshow Link to comment Share on other sites More sharing options...
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