I am a software engineer that uses Visual C and Installshield. As I am creating DLLs and EXEs I would like to attach version information so that this information can be seen from:
a. Windows Explorer-Rt Mouse on file-Sel Prop-Sel version tab
b. Within installshield so that I can do version checking when installing DLLs.
Thanks for your help
Gary Horan
John Holifield
April 21st, 1999, 04:09 PM
In your projects resource(s), add a new version info resource and set it to whatever version and title you like. Then rebuild your project and you're all set.
Roger Osborn
April 21st, 1999, 04:16 PM
Hi Gary,
Normally in AppWizard created projects there is a Version folder containing this information in the resourceview window (or edit the .rc file directly). This is what Explorer normally displays. I'm not so sure about InstallShield but you'd expect it to be able to get at it.
Gary H Work
April 21st, 1999, 04:39 PM
Thanks Roger.
Unfortunately, I've already done this but, the version tab is still not within the Windows Explorer. It is a DLL. Do I have to do something special there.
Gary H Work
April 21st, 1999, 04:40 PM
Thanks John.
Unfortunately, I've already done this but, the version tab is still not within the Windows Explorer. It is a DLL. Do I have to do something special there.
John Holifield
April 22nd, 1999, 09:21 AM
There's nothing special about windows explorer that is going to change. But if you include that resource and build your dll or exe it will then have a version resource. Then when you right click on this file's icon, you will see a tabbed dialog with one or more tabs. One of those tabs will say 'Version'. If you click that tab, your version info that you built into the dll will be displayed. Then you can also do VerFindFileVersion, VerGetFileVersion, etc... from InstallShield.
Roger Osborn
April 23rd, 1999, 02:27 AM
Can you get the version tab on other DLLs? e.g. ones in WINNT\system32. You could also look at your DLL using the "depends" tool from www.stevemiller.net to check the version information is getting into the binary. Dumpbin could probably show you too. Sorry I can't think of anything more specific, but that might tell you whether it's a build or explorer configuration problem.
Gary H Work
April 23rd, 1999, 01:37 PM
I can see the version number of a lot of other DLLs.
Dependency Walker-Thanks for this tool and this site. They are great. Dependency walker did see the version. The one thing I did notice is that Dependency Walker and dumpbin both have a field called image version that contains zeros for my DLL. Any idea if that is what needs to get populated and if so how it does.
Thanks
Gary
ghoran@home.com
g.horan@xpedite.com
Gary H Work
April 23rd, 1999, 01:41 PM
I can see the version number of a lot of other DLLs through Windows Explorer
Installshield VerGetFileVersion returns 0.0.0.0 for my DLL.
Roger Osborn recommended Dependency Walker and http://www.stevemiller.net/ - They are great. Dependency walker did see the version. The one thing I did notice is that Dependency Walker and dumpbin both have a field called image version that contains zeros for my DLL. Any idea if that is what needs to get populated and if so how it does.
Thanks
Gary
ghoran@home.com
g.horan@xpedite.com
Gary H Work
April 23rd, 1999, 02:12 PM
I have a little more info.
image version is controlled by the linker directive
/version
and therefore I now have that but, I still cannot see the version in either windows explorer or Installshield.
Thanks
Garu
Gary H Work
April 23rd, 1999, 02:49 PM
I have a little more info.
image version is controlled by the linker directive
/version
and therefore I now have that but, I still cannot see the version in either windows explorer or Installshield.
Thanks
Gary
Roger Osborn
April 23rd, 1999, 04:17 PM
Hi Gary,
I played around on my machine to try and understand this. I did a File/New project/win32 dynamic link library and then selected "a simple dll project". I added a version into the resources and built it, and didn't get a version in the Explorer. Then I realised that on the FileView tab I had to select the "resource files" folder and add in the .rc (script1.rc) file I had just created. Then when I built it and retried the version tab appeared in Explorer.
Could be that what happened to you? It doesn't explain how you reckoned your information was visible in depends, but I'm clutching at straws here. If that's not it maybe you should post the sequence you went to to build the DLL so we can try it ourselves.
By the way, if you liked the depends tools you might like the stuff at www.sysinternals.com . e.g. tools to monitor registry access, file access, and show you which DLLs a running application has loaded from where. They've saved me hours of debugging time.
Cheers,
Roger
Rich Peters
April 24th, 1999, 02:50 AM
You dont mention if you are creating 32 or 16 bit DLL's. 16 bit dlls (or Vxds) need to use a special 16 bit version of RC to put the version so that the 32 bit OS sees it.
If you are doing a 32 bit dll, I am mystified.
Gary H Work
April 26th, 1999, 03:07 PM
Hi Roger,
Thanks for your responsiveness.
I can't post the sequence to build this DLL because it is a DLL written by a UNIX developer that can't remember how he built it. He thinks he had Visual C create a win32 DLL project and went from there but, he isn't sure and threw out the documentation.
Anyway,
I did send the following email to Steve Miller and would appreciate it if you have any other ideas. At this point, I can see the version number from my install but, it would be nice to see it from Explorer. By the way, I am including the file in fileview.
Steve,
Thank you. Thank you.
Problem 1 solved. Still could use help with problem 2.
Problem 1: Your dependency walker let me isolate the problem. I changed the project so that the Image version was set using /version link switch as you suggested but, you were right Installshield does not use this. For your edification it uses FileVersion not ProductVersion. I set FileVersion to 1,2,0,1 and ProductVersion 1,2,0,2 and the following snipit:
Problem 2: I am still not not seeing the version TAB (that's right not even the TAB) when I look at the properties on the file in explorer. Yes, I can see the version TAB on other files. Please note that the developer that originally created this project is a UNIX developer and he thinks he had "it" create a win32 DLL and he fleshed it out but, he's not sure.
Thanks for all your help
Gary
Gary H Work
April 26th, 1999, 03:12 PM
Hi John,
I have even more info on this subject
I did send the following email to Steve Miller and would appreciate it if you have any other ideas. At this point, I can see the version number from my install but, it would be nice to see it from Explorer. By the way, I am including the file in fileview.
Steve,
Thank you. Thank you.
Problem 1 solved. Still could use help with problem 2.
Problem 1: Your dependency walker let me isolate the problem. I changed the project so that the Image version was set using /version link switch as you suggested but, you were right Installshield does not use this. For your edification it uses FileVersion not ProductVersion. I set FileVersion to 1,2,0,1 and ProductVersion 1,2,0,2 and the following snipit:
Problem 2: I am still not not seeing the version TAB (that's right not even the TAB) when I look at the properties on the file in explorer. Yes, I can see the version TAB on other files. Please note that the developer that originally created this project is a UNIX developer and he thinks he had "it" create a win32 DLL and he fleshed it out but, he's not sure.
Thanks for all your help
Gary
Gary H Work
April 26th, 1999, 03:14 PM
Hi Rich,
I have more info.
I went to www.stevemiller.net and downloaded and installed depends and that prompted the following.
I did send the following email to Steve Miller and would appreciate it if you have any other ideas. At this point, I can see the version number from my install but, it would be nice to see it from Explorer. By the way, I am including the file in fileview.
Steve,
Thank you. Thank you.
Problem 1 solved. Still could use help with problem 2.
Problem 1: Your dependency walker let me isolate the problem. I changed the project so that the Image version was set using /version link switch as you suggested but, you were right Installshield does not use this. For your edification it uses FileVersion not ProductVersion. I set FileVersion to 1,2,0,1 and ProductVersion 1,2,0,2 and the following snipit:
Problem 2: I am still not not seeing the version TAB (that's right not even the TAB) when I look at the properties on the file in explorer. Yes, I can see the version TAB on other files. Please note that the developer that originally created this project is a UNIX developer and he thinks he had "it" create a win32 DLL and he fleshed it out but, he's not sure.
Thanks for all your help
Gary
Rich Peters
April 26th, 1999, 03:30 PM
Are you sure that windows.h is included in your .rc file? That is the only other way I have seen to get RC to compile a version, but have it not show up under properties.
John Holifield
April 26th, 1999, 04:09 PM
So, you have built your DLL with a Version Resource, and you can check the version info on the DLL with InstallShield, but Windows Explorer doesn't show the Version Tab in Properties? Have you tried using a different machine? One other thing you might try is open your .rc file as text and compare the version info you're compiling into your project with the version info from a .rc file that is known to work. If all else fails, try deleting the version resource and adding a newone. Adding this version stuff to your DLL is really simple, so if I were you, I'd ignore all that stuff about linker options and all that crap and check the basic stuff that should be obvious. Sometimes the answer is there staring you in the face.
Gary H Work
April 26th, 1999, 04:11 PM
Hi Rich,
Just tried this. Still no good.
I did notice that _USRDLL is a preprocessor definition in a DLL I created that works but, when I include that it comes up with a Linker- dup definition of _DllMain
Thanks
Gary
Roger Osborn
April 28th, 1999, 02:21 AM
Sorry, I'm rapidly running out of ideas. My inclination in your position would be to create a new DLL project using AppWizard, check the version works in that, then move your code over. It's probably not as long as it sounds to do.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.