Forum Index  ViceVersa HOME         FAQ and Knowledge Base

 FAQForum FAQ   SearchSearch Forum  RegisterRegister 
 ProfileProfile   Log inLog in 

Include VV version number in global.vbs

 
Post new topic   Reply to topic     Forum Index -> Support
Author Message
Travelcard



Joined: 11 Dec 2006
Posts: 77

PostPosted: Wed Aug 27, 2008 4:05 pm    Post subject: Include VV version number in global.vbs Reply with quote

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 Smile

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: 8763

PostPosted: Thu Aug 28, 2008 4:01 am    Post subject: Reply with quote

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

PostPosted: Tue Sep 02, 2008 8:45 am    Post subject: Reply with quote

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: 8763

PostPosted: Tue Sep 02, 2008 11:04 am    Post subject: Reply with quote

Cool

Did you write software for that or is there a command available to use in a batch?
thanks
_________________
--
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com
Back to top
Travelcard



Joined: 11 Dec 2006
Posts: 77

PostPosted: Tue Sep 02, 2008 11:07 am    Post subject: Reply with quote

We added a few lines in the VBS.

Tell you what we'll do a swap Smile

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. Cool

Thanks
Back to top
Travelcard



Joined: 11 Dec 2006
Posts: 77

PostPosted: Fri Sep 05, 2008 8:33 am    Post subject: Reply with quote

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: 8763

PostPosted: Fri Sep 05, 2008 1:40 pm    Post subject: Reply with quote

nice! Cool
_________________
--
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com
Back to top
Travelcard



Joined: 11 Dec 2006
Posts: 77

PostPosted: Fri Sep 05, 2008 1:45 pm    Post subject: Reply with quote

I ROCK!!!
Back to top
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Support All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group
Copyright © TGRMN Software. TGRMN Software products: