Solved

batch file to install according to office version

Posted on 2006-11-02
5
288 Views
Last Modified: 2010-04-16
I want a batch file to do the following.

I have the install section of it working, I just need the if statement.

It should go as follows:

IF office = 2000 then run

start /w \\UNCPath\Templates.exe /s
start /w \\UNCPath\PowerPoint_Addin_Office_2000.exe /s
start /w \\UNCPath\Image_Library.exe /s

IF office = 2003 then run

start /w \\UNCPath\Templates.exe /s
start /w \\UNCPath\PowerPoint_Addin_Office_2003.exe /s
start /w \\UNCPath\Image_Library.exe /s

How can I achieve this?

Thanks
0
Comment
Question by:Priscilla_Hora
5 Comments
 
LVL 9

Accepted Solution

by:
crawfordits earned 125 total points
ID: 17863677
You can always check the reg key
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\xx.x
xx.x = 10.0 ~ Office XP
xx.x = 11.0 ~ Office 2003
0
 
LVL 7

Assisted Solution

by:yotamsher
yotamsher earned 125 total points
ID: 17866569
if you can use a vbscript, then here is a script returning office ver:
http://groups.google.com/group/microsoft.public.scripting.vbscript/browse_frm/thread/933a9c0e69e7a480/e800e6e0cbe1970#e800e6e0cbe1970

I think it would be easier to execute some commands through vbscript, then reading registry through batch code

Yotam
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
A short article about problems I had with the new location API and permissions in Marshmallow
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now