Page 1 of 1 1
Topic Options
#152126 - 2005-11-23 06:17 PM Script who gives the version of winword
Guido_Bellens Offline
Lurker

Registered: 2005-11-23
Posts: 1
Hi,
I'm brandnew user of kiXtart and i'm searching of an script who gives me the version of winword installed on 600 Windows98 PC's in an NT-domain.
Can i get this using an loginscript?

Top
#152127 - 2005-11-23 06:26 PM Re: Script who gives the version of winword
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
There are several software inventory scripts posted that would do it for you or you could easily create a small script to get just the WinWord version. Pull the location from "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths" and the use GetFileVersion(). Write the results to a file an Bob's your uncle.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#152128 - 2005-11-23 06:45 PM Re: Script who gives the version of winword
StarwarsKid Offline
Seasoned Scripter
*****

Registered: 2005-06-15
Posts: 506
Loc: Oregon, USA
Yes you can. You can use a built-in function of KiXtart called GETFILEVERSION. It is described in the manual.

Here is the syntax.
Code:
 GETFILEVERSION ("file name","versionfield") 



You will then probably want to dump the output of the GETFILEVERSION command to a text file for you to view after running the script. I'm not sure how to do that part. Someone else can help with that information.

On the other hand, you can check for a file version and then based on the version, run other stuff.
_________________________
let the wise listen and add to their learning,
and let the discerning get guidance- Proverbs 1:5

Top
#152129 - 2005-11-23 08:27 PM Re: Script who gives the version of winword
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Would come to something like this.

Code:

$key = ReadValue("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinWord.exe", "Path")
$fullversion = GetFileVersion ($key + "\winword.exe", "ProductVersion")
$cleanversion = SubStr ($fullversion, 1, 2)
?$cleanversion
Sleep 3



Version 11 is Office 2003
Version 10 is Office XP aka Office 2002
Version 9 is Office 2000
And so on......
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.059 seconds in which 0.032 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org