Archive: uninstall using rundll32 advpack.dll does not work


uninstall using rundll32 advpack.dll does not work
made an installer , and uninstaller:

I want to run the following commands:

rundll32 advpack.dll,LaunchINFSection %windir%\inf\mpeg4ax.inf,Uninstall
rundll32 advpack.dll,LaunchINFSection %windir%\inf\mpg4sax.inf,Uninstall
rundll32 advpack.dll,LaunchINFSection %windir%\inf\msaud.inf,Uninstall
rundll32 advpack.dll,LaunchINFSection %windir%\inf\wmavdsax.inf,Uninstall
rundll32 advpack.dll,LaunchINFSection %windir%\inf\WMFSDK.inf,Uninstall
rundll32 advpack.dll,LaunchINFSection %windir%\inf\wmv8ax.inf,Uninstall
rundll32 advpack.dll,LaunchINFSection %windir%\inf\wmvax.inf,Uninstall

rundll32 advpack.dll,LaunchINFSection %windir%\inf\wmv9vcm.inf,Uninstall

This works in the batch file i created but how do I integrate this in the NSIS script does not work:

//Batch file uninstall_wmv.bat
rundll32 advpack.dll,LaunchINFSection %windir%\inf\mpeg4ax.inf,Uninstall
rundll32 advpack.dll,LaunchINFSection %windir%\inf\mpg4sax.inf,Uninstall
rundll32 advpack.dll,LaunchINFSection %windir%\inf\msaud.inf,Uninstall
rundll32 advpack.dll,LaunchINFSection %windir%\inf\wmavdsax.inf,Uninstall
rundll32 advpack.dll,LaunchINFSection %windir%\inf\WMFSDK.inf,Uninstall
rundll32 advpack.dll,LaunchINFSection %windir%\inf\wmv8ax.inf,Uninstall
rundll32 advpack.dll,LaunchINFSection %windir%\inf\wmvax.inf,Uninstall

rundll32 advpack.dll,LaunchINFSection %windir%\inf\wmv9vcm.inf,Uninstall
////



;Run the uninstaller
uninst:

ClearErrors

Exec "$INSTDIR\uninstall_wmv.bat"

ExecShell open "rundll32 advpack.dll,LaunchINFSection %windir%\inf\mpeg4ax.inf,Uninstall"
ExecShell open "rundll32 advpack.dll,LaunchINFSection %windir%\inf\mpg4sax.inf,Uninstall"
ExecShell open "rundll32 advpack.dll,LaunchINFSection %windir%\inf\msaud.inf,Uninstall"
ExecShell open "rundll32 advpack.dll,LaunchINFSection %windir%\inf\wmavdsax.inf,Uninstall"
ExecShell open "rundll32 advpack.dll,LaunchINFSection %windir%\inf\WMFSDK.inf,Uninstall"
ExecShell open "rundll32 advpack.dll,LaunchINFSection %windir%\inf\wmv8ax.inf,Uninstall"
ExecShell open "rundll32 advpack.dll,LaunchINFSection %windir%\inf\wmvax.inf,Uninstall"

ExecShell open "rundll32 advpack.dll,LaunchINFSection %windir%\inf\wmv9vcm.inf,Uninstall"

ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
IfErrors no_remove_uninstaller
;You can either use Delete /REBOOTOK in the uninstaller or add some code
;here to remove to remove the uninstaller. Use a registry key to check
;whether the user has chosen to uninstall. If you are using an uninstaller
;components page, make sure all sections are uninstalled.
no_remove_uninstaller:

done:


ANy Idea's ??


Use ExecWait instead of ExecShell, $WINDIR instead of %windir%


You can also call LaunchINFSection with the System.dll plug-in. There is no need to use rundll32.