Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic software auditing

Status
Not open for further replies.

emozley

Technical User
Jan 14, 2003
769
GB
I am thinking about making a basic software auditing app. The idea is to have a table of applications that I want to check for - this would contain 3 columns - a unique identifier, the name of the application eg 'Microsoft Word' and finally the path of the executable.

When the script is run the idea is to have a table with columns UniqueID, HostName, ProductID (which would tie in with the table described above), VersionNumber.

Is it possible in classic ASP to check for the existence of a file over the network? Picking up the host name and username is straightforward so it should be easy to build s string with the client PC - eg "\\pc100\c$\" & rs("FilePath")

Also is it possible in classic ASP to detect the version number of a file? I have had a look round but not spotted anything that looks suitable.

Any basic pointers much appreciated.

cheers

 
sorry a second after typing this I found this the FileExists function which solves the first part - what about detecting the version number?

cheers
 
Played around a bit more and have found that the following works:

Set fso = CreateObject("Scripting.FileSystemObject")
fileVersion = fso.GetFileVersion("\\myserver\files\AcroRd32.exe")
Response.Write ("Adobe Acrobat is version number : ") & fileVersion
Set fso = Nothing

However if I change the path to "\\mypc\c$\files\acrord32.exe" it doesn't work. The script does not error it just doesn't show anything...

Would this be because the script does not have access to C$? If so is there a way round this?

cheers
 
Try disabling anonymous access for this page so that it runs under the security context of the user.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top