I stumbled upon something that Microsoft made available to the Windows 2000 and XP operating systems. There are two ways to ensure an application uses the correct .dll and .ocx files without having to register these files using the systems registry. The first is called DLL/COM redirection (windows 2000). The second is called side-by-side assembly (windows XP only).
To get to the point and then give details after, I've been able to use side-by-side assembly to successfully redirect ccleaner.exe to use the required .ocx and .dll files without registering them in the registry on my Desktop XP Pro.
The way I did this was to create a manifest file using a little tool I found called
tregman.exe. You can find it at http://blogs.borland.com/cbensen/archive/2005/08/18/20809.aspx
or you can create your own .xml file, but tregman is a command-line tool and does it much quicker. I added this manifest file to my ccleaner folder where my .dll and .ocx files live. When ccleaner starts, it will find this ccleaner.exe.manifest file and not look in the registry to see where ccleaner's .dll and .ocx files live.
Another useful tool I found lists all the dlls loaded while a program is running. It's similar to Process Explorer but I'm a collector of tools and thought I'd share it here. http://www.sysinternals.com/utilities/listdlls.html
My problem is that I have not been able to use the DLL/COM redirection for ccleaner.exe on my Windows 2000 laptop.
Here's the scoop:
I found various articles on the above methods:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sbscs/s...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc...
http://blogs.msdn.com/junfeng/default.aspx
There are many more articles...check google if you want to find more.
So the DLL/COM redirection method says to create a ccleaner.exe.local file in my ccleaner directory. All my .dll and .ocx files live in this directory so according to the articles, when ccleaner starts, it should see my local file and use my .dll and .ocx files. Unfortunately this is not happening and I get a CCLISTBAR run-time error.
Any ideas on why this doesn't work in Windows 2000? If this was to work, this would be useful to keeping your apps portable and not messing up the registry!
If you do try either method, I'd really like to hear what applications work and which don't.
Wow, great find! I shall test this and report back in a bit. Thanks!
I just tried creating the manifest file on another Windows XP Pro computer, and this time it came up with an error! What the... My XP Pro at work creates it fine, yet a similar XP Pro desktop does not...I've got to verify this when I get to work on Monday. Hopefully someone else can get this to work consistently!
Gotta love tech :). I'll test it on the XP Home and the Pro. (Since it isn't quite such a big deal with me Da as WB, he should be fine with it.)
When I said earlier that it didn't work for me on another Windows XP PC, I meant that the tregman tool did not work for me. When I used the manifest file I created using tregman on my work PC on the other Windows XP PC, then the redirection worked and ccleaner opened with no errors. So it would seem that side-by-side assembly works for the two windows XP PC's I have access too. I'll have to look into writing a script to generate the manifest file instead of relying on tregman.
Can you post the ccleaner.exe.manifest? I'm trying to make ccleaner portable on my usb stick.
From my experience this only worked for me on Windows XP machines.
...okay, so it's written in xml and when I try to copy it here nothing shows up? I've tried using the
code
tags, but then my code is ignored and all that is displayed is an empty box...any ideas how I can show this code?Did we forget something???
***********************************
Deuce {The Core}{Dev Blog}
Portable Software: Just the beginning.
Deuce
Portable Software: Just the beginning.
Since no one has got back to me on how to post xml code, here is my work around:
Replace all ~ with less than symbol
Replace all ` with greater than symbol
Save the file as ccleaner.exe.manifest in the same directory as your ccleaner executable and .dll/.ocx files. I believe this only works for the Windows XP operating system.
I hope you find this useful.
Well..I saved it...and doesn't appear to work under win 2000...will have to stick to the bat file that registers/unregisters the dll's etc.
Thanks for trying.
Hi Famewolf,
Using the manifest file is called side-by-side assembly, and this only works in Windows XP. Windows 2000 uses DLL/COM redirection but I couldn't get this to work on my Windows 2000 PC.
Like you said, the .bat file solution will work.
I haven't had time to look into this all that much, but maybe AppShadow is something you can use???
http://www.d-fens.net/?uToc=1&idMenu=3&idSub=9&idPage=1&uLinkPages=1&uToc=0
*Cleanup in node 1056*
----
R McCue
"If you're not part of the solution, you're part of the precipitate."