Archive: Executing an INF file?


I am having trouble executing an INF file from the installer or batch file. Anyone know how to do this?



Exec '"$WINDIR\Notepad.exe" "$INSTDIR\myconfig.inf"'


For People without notepad or an ini/inf configuration editor,

ExecShell open '"$INSTDIR\myconfig.inf"'


or for fun,

IfFileExists $WINDIR\Notepad.exe 0 nonote
Exec '"$WINDIR\Notepad.exe" "$INSTDIR\myconfig.inf"'
Goto pass
nonote:
ExecShell open '"$INSTDIR\myconfig.inf"'
pass:


Hope That Helps.

-DJ

Sorry, let me clarify my question.
I am looking to install an inf file.

Simply using ExecShell open '"$INSTDIR\myconfig.inf"' will not install it.


'ExecShell "install" "blah.inf"' should do the trick


Thanks Edgewize that worked.


INF files are installed by a runtime dll. This dll can be advpack.dll, w95inf32.dll or w95inf16.dll. I believe advpack.dll is the newest. In order to do this, you should:

Exec "rundll32.exe advpack.dll,LaunchINFSection c:\myinf.inf, DefaultInstall"

To uninstall, you should:
Exec "rundll32.exe advpack.dll,LaunchINFSection %1, UnInstall"

both rundll32.exe and advpack.dll should be installed on windows pcs that have a recent version of IE installed. but they can (obviously) be included in your distribution just to be safe.