Author |
Message |
Travelcard
Joined: 11 Dec 2006 Posts: 77
|
Posted: Wed Aug 27, 2008 4:05 pm Post subject: Include VV version number in global.vbs |
|
|
Hi there,
We are using Vice Versa in many sites very successfully - it's a great product.
We have modified your global_end.vbs script too, to give us all the information we need - except one bit
We want to include the ViceVersa version number in the script. We know that it is a variable somewhere as it gets listed in the log file like this:
Version: ViceVersa PRO 2 Build 2014 (SN80)
How can we get this in our vbs script?
Thanks. |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8759
|
Posted: Thu Aug 28, 2008 4:01 am Post subject: |
|
|
Hello,
Currently not possible, but this seems something quite useful to add in a future version of ViceVersa PRO.
thanks _________________ --
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com |
|
Back to top |
|
|
Travelcard
Joined: 11 Dec 2006 Posts: 77
|
Posted: Tue Sep 02, 2008 8:45 am Post subject: |
|
|
Hi there
Just to let you know that we managed to query the exe and get the build number from that instead of getting it from the job.
Cheers |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8759
|
|
Back to top |
|
|
Travelcard
Joined: 11 Dec 2006 Posts: 77
|
Posted: Tue Sep 02, 2008 11:07 am Post subject: |
|
|
We added a few lines in the VBS.
Tell you what we'll do a swap
I've just emailed support about restoring a huge amount of files/folders from the archive. If you can respond with a quick solution to that problem I'll post up the code here.
Thanks |
|
Back to top |
|
|
Travelcard
Joined: 11 Dec 2006 Posts: 77
|
Posted: Fri Sep 05, 2008 8:33 am Post subject: |
|
|
Go on then.
The script assumes that VV is installed to the default location - it's pretty obvious what to change if yours is not.
This bit picks up the version number from the EXE
Code: | Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
("Select * from CIM_Datafile Where name = 'C:\\Program Files\\ViceVersa Pro 2\\ViceVersa.exe'")
For Each objFile in colFiles
' Wscript.Echo "Version: " & objFile.Version
VersionNumber = objFile.Version
Next |
This then removes commas, periods and spaces from the version number:
Code: | VersionNumber = Replace(VersionNumber, Chr(32), "")
VersionNumber = Replace(VersionNumber, Chr(44), "")
VersionNumber = Replace(VersionNumber, Chr(46), "") |
and then alter your message body line to include the VersionNumber variable:
Code: | objMessage.TextBody = exitcodedesc & vbCrLf & "Vice Versa: Build " & VersionNumber & ... |
|
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8759
|
|
Back to top |
|
|
Travelcard
Joined: 11 Dec 2006 Posts: 77
|
Posted: Fri Sep 05, 2008 1:45 pm Post subject: |
|
|
I ROCK!!! |
|
Back to top |
|
|
|