Archive: Internet Component Download problem


Internet Component Download problem
I have a little problem and maybe someone here can help me out.

What I'm trying to accomplish is an installer which would be automatically invoked from the internet.

So far I've created an installer with NSIS, packaged it inside a signed cab along with an INF file which uses a hook to launch the installer executable. Part of the problem might be that my application is not an ActiveX component, but a plain Windows executable.

I'm writing the install information to HKCU branch to make it easier to remove the app if/when a particular user is deleted.

Everything else works fine except that I can't uninstall the application properly using the uninstaller. To be more specific, Windows places a copy of my inf file to WINDOWS/Downloaded Program Files as well as writes registry entries under HKLM/Software/Microsoft/Code Store Database.

I tried to delete the inf file, which results in Windows thinking the installation is broken. However, it does not attempt to install it again when I hit the page with the object tag pointing to my cab.

If I go on and delete the registry key under the HKLM key mentioned above my installer will be invoked again, but do I violate the "current user only" policy by deleting this key?

I've thought about making my application to support a few com interfaces and registering the component, but am I missing a point here?

All I want to do is to be able to distribute the installer via internet (launch it using the object tag) and deploy the application for the current user to avoid problems with people not having admin/power user privileges.

All ideas more than welcome.


Isn't there a special way to uninstall just like there is a special way to install? What happens if you go to Windows\Downloaded Program Files and manually delete the "file"? Doesn't it call your uninstaller?

MSDN should probably answer this best if no one has a definite answer.


Well, the inf documentation is quite wide-spread along MSDN and MSI archives seem to be the preferred way to do it. Finding a definitve answer hasn't caught my eyes as of writing.

My installation is not that special, if you have a look at Sun's JRE installer, it's very much the same, although my executable is NSIS installer.

Downloaded Program Files is a special folder and as such, it displays the 'files' differently. Righ-clickin on an item would bring a choice of Update/Remove and remove deletes the inf file in this directory as well as deletes the associated registry entries.

One way might be to use ShellExecute with Remove as the command.

Deleting the inf file from the Downloaded Program Files only changes the status of my installation to broken and does not uninstall anything.

I've written installations before, but I'm new to this internet thingy, so I might be looking for the ansfer from all the wrong places.

Hopefully someone who has done this before can point me to right track.