|
|
|||||||
I have not done a lot of complicated scripting, so please be patient! I am trying to install Office 2000 SR-2 on workstations that are currently at the SP1 level. I have looked at various examples and seem to have tried them all, but they will not work. I am basing my install on the current version of the winword.exe file -- if it's not 9.0.0.4527. Below is the code I am using in my subroutine. The actual installation of the SR2 works fine, but it wants to install it no matter what. ================================================== code:==================================================:O2K_SR2 Thanks for any help you can give me, and as soon as possible. I'm about at my wits end! [ 26 April 2002, 19:04: Message edited by: Lori Paull ] |
||||||||
|
|
|||||||
I think I see your problem. Try this: code:I noticed that the value you're reading from the registry returns the path of winword without winword.exe appended. So, you aren't getting the version of winword.exe. If you use the (default) value (by using "" instead of "path"), you will get the full path including the winword.exe.:O2K_SR2$ Brian |
||||||||
|
|
|||||||
Lori, It is great that you are upgrading your client to SP-2 of Office 2k. However, you know there are issues with attachments in e-mail (Outlook), right? I know that has been addressed in 2002. I have heard that there are some tweaks to get around this. HTH, - Kent |
||||||||
|
|
|||||||
Thanks to you both for your help and comments. Brian, I tried what you suggested, but it still is not working. When I watch it, it acts as if it's not even checking the version -- I would expect to see a little hesitation of the script when it should be checking the version and I don't. Any other ideas? Kent, thanks for the information. We are aware of the e-mail attachments "problem." I'm really baffled as to why this is not working. Please help in any way you or anyone else can. Thanks! |
||||||||
|
|
|||||||
You can also look into the UpdateApps UDF for a convenient log and wrapper for installs. Instead of comparing file versions, look into the uninstall keys and the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\LocalPackages HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Products keys to determine if the package was installed [ 30 April 2002, 01:52: Message edited by: Radimus ] |
||||||||
|
|
|||||||
also, I believe the app exe versions don't use the "9.0.0.4527" ... try "9.0.4527" In either case, the most common issue here is also that while the value appears to be a number, it is actually a string, and will be evaluated as one. Try using instr or = to positively ID the version value |
||||||||
|
|
|||||||
Email attachments problem? Are we talking about Outlook has blocked access to the potentially blah blah blah, problem or is there one I missed? Hmm, onwards to technet |
||||||||
|
|
|||||||
Lori, Can you try the following? code:Dean R - In SP-2 of Outlook 2000, if a user tries to send a "potentially dangerous" attachment like a XLS, MDB, EXE file.. It is blocked by Outlook. From an IT standpoint, it is great.. However, from a user's perspective, it is a pain..:O2K_SR2$ Thanks! - Kent [ 30 April 2002, 16:36: Message edited by: kdyer ] |
||||||||
|
|
|||||||
Hey Kent.. Typo in your script! (I don't feel so bad.. i'm not the only one! lol).. Second line should be? code:Brian$currentfilever = "9.0.0.4527" |
||||||||
|
|
|||||||
Doh.. I think you copied MY error in my post.. sorry Kent! Ok.. let's try this again: code:If this doesn't work, try running a script from the command line that looks something like this::O2K_SR2 code:See what this comes out with.. it should tell you where you're going wrong.$currentfilever = "9.0.0.4527" Brian |
||||||||
|
|
|||||||
O.K. It seems the problem is that KIX (or something) can't tell if the version is less than, greater than, or equal to. I tried the last suggestion of running a batch file that showed me the version, and if it was less than (or whatever). I expanded on this and tried less than, greater than, equal to, and they all came back and said not less than, not greater than, not equal to . I tried putting <> rather than < or =, but that didn't work. I also tried grabbing the product version rather than file, but came up with the same result. Any other ideas? I also tried the suggestion about the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\LocalPackages HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Products keys, but couldn't see anything to go with on these. |
||||||||
|
|
|||||||
Running Brians latest offering on my system, returns the following: Current file version is: 9.0.0.4527 9.0.3822 is not less than 9.0.0.4527 Obviously you're not comparing apples to apples. They do not have the same number of characters. Since it's not a 'value' compare but rather is a 'string' compare, hence the result. What's wrong with checking for an exact match? Is there a chaance there's a newer version out there? If there is, I suggest you list all known variants in SELECT CASE statements. |
||||||||
|
|
|||||||
Lori, Made a change to the script.. Put "" around the Word path. Added in a VAL() statement around the $fileversion and $currentfilever (even though it appeared unecessary). code:If I run this, I get:break on cls quote:Can you post your results? Or, where it stops? BTW, what version of Kixtart are you running with this? Thanks! - Kent [ 02 May 2002, 03:41: Message edited by: kdyer ] |
||||||||
|
|
|||||||
the next simplest method is to use left() to determine 97, 2000, or XP and then use right() to pull the last 4 to determine build.... if everyone is 2000 then you could skip the left() |
||||||||
|
|
|||||||
Take a look at this UDF: http://www.scriptlogic.com/kixtart/ViewFunction.asp?FN=VersionCompare |
||||||||
|
|
|||||||
here is some old code I was using... before I got tired of trying to keep up with office patches... code:; ****************************** MSOffice version ***************************************** |
||||||||
|
|
|||||||
I think if you look at winword.exe for SP2 and get a file version from it you will find the version to be: "9.0.4527" and not "9.0.0.4527". I looked at the properties on mine (sp1.. i don't like the email security crapola) it says "9.0.0.5302" in the header but if you look under the property "FileVersion" it actually is defined as "9.0.5302".. I would guess that this will work the same with SP2. If it's installing every single time (whether installed or not), then I would assume this is your problem. Once the file version matches what you're actually uses on SP2, it should work. However, you can use a <> instead of just a < for your operation. Brian |
||||||||
|
|
|||||||
I changed the code as suggested to inlcude the VAL() statement, and I get the same results as you. winword.exe path from the registry is: C:\PROGRA~1\MICROS~2\Office\WINWORD.EXE Up-to-date file version is 9.0.0.4527 Version found is 9.0.3822 9.0.3822 is greater than 9.0.0.4527 What confuses me about this is if I go to Explorer and the properties, then the version tab, the Version number shows 9.0.0.3822. In the additional properties in that window the product version is what displays 9.0.3822. Also, if 9.0.3822 is greater than 9.0.0.4527, I would think that replacing the < with the > would take care of the problem, but that isn't the case. The KIX version is 3.62.0.0. |
||||||||
|
|
|||||||
To elaborate on my previous post, try this code: code:Notice that I changed $currentfilever to "9.0.4527" and "Path" to "" and < to <>.:O2K_SR2 Brian [ 02 May 2002, 17:51: Message edited by: BrianTX ] |
||||||||
|
|
|||||||
Brian, I can see an issue with that logic.. If it is not (<>) the prescribed version whether it is less or greater, you are going to run the update anyway? Hmmm.. - Kent |
||||||||
|
|
|||||||
Thank you all for your suggestions and help. It appears everything is working the way I need it now. For some reason though the < sign works. I still don't understand why using 9.0.4527 works instead of 9.0.0.4527, when the Explorer properties show 9.0.0.4527 for file version and 9.0.4527 for product version, and I'm using "FileVersion" in getfileversion rather than "ProductVersion." I did learn a lot. Thanks again! |
||||||||
|
|
|||||||
Lori, It is a decimal place thing.. If we look at this like a comma (or period) delimited file, it works this way. 9.0.4527 9.0.0.4527 1.2.3 1.2.3 So, the way that it is treating this is that in the "3" spot, the 4 is greater than 0. Does that help? - Kent [ 04 May 2002, 00:16: Message edited by: kdyer ] |
||||||||
|
|
|||||||
KENT, is this your birthday or what!?!?!? been waiting this whole day, THOUSAND POSTS! congrats! keep up the work. the slower one, |
||||||||
|
|
|||||||
Agreed, congrats Kent, your a valued member of this Bulletin Board, keep up the great work !!! code:___ _ |
||||||||
|
|
|||||||
See above - what the keck: code:___ _ |
||||||||
|
|
|||||||
pfffttt - pfffttt - testing ... 123 ... is this thing on ? ok - i'll quit while im ahead. you know what i mean right Kent ? -Shawn |
||||||||
|
|
|||||||
Shawn/Lonkero, Thanks for the recognition! I have been trying to do this for a while and have been trailing Doc as well. We should see it this way, if we give to the community that helps us we all benefit! BTW, Lonkero - You aren't too far behind to be in the limelight either!! (snicker) Thanks again guys! - Kent [ 04 May 2002, 00:55: Message edited by: kdyer ] |
||||||||
|
|
|||||||
Kent, CONGRATULATIONS and welcome to the Millenium club! You are a great resource and an asset to our KiX community. For that I (and I'm sure everyone else) thank you. Also thanks for explaining so eloquently to Lori what I tried and failed. When you lay it out on the page like that, it works. The next 1000 should be easier than the first. Heck, ask Shawn. I just hope I can make the second Millenuim before he enters the third. Shawn, Buddy, wait up for me EH! |
||||||||
|
|
|||||||
Dear Kent, Also big congratulations and up to the second Millenium. Specially thanks for great input on the FAQ forum, which you are moderating witrh Les. greetings. |