using rundll32 in an installer .... Installshield works ... Visual Studio .NET msi does not
Posted on 2005-04-26
I am trying to create a shortcut in my app folder to a CPL (control panel object.)
I have used Installshield and used to following to add a shortcut to allow me to run the shortcut to the CPL.
"<my application name>",
"rundll32.exe shell32.dll,Control_RunDLL \""+TARGETDIR+"\\<cpl file>.cpl\"",
TARGETDIR+"\\<cpl file>.cpl", // Icon executable
This works ok and allows me to add a shortcut in XP / 2K.
Now I am migrating to .NET and using the "Setup Wizard" in .NET 2003.
I want to do the same as above and I have tried creating a shortcut to my cpl (with the arguements "shell32.dll,Control_RunDLL [TARGETDIR]UDMCPL.cpl" , but it asks for the rundll32.exe file. Now obviously if I try and run the cpl shortcut on any OS other than the one I am developing on then is get an error
"The procedure entry point ActivateActCtx could not be located in the dynamic link library KERNEL32.dll".
Can't switch between rundll32. OS specific.
So how do I create a shortcut to the CPL in the same way as Installshield so that it will work on 2K as well as XP?
I don't want to copy the rundll32.exe, but create a shortcut on the desktop. Any way to script it?