Solved

batch file to install according to office version

Posted on 2006-11-02
5
287 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
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 fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

757 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

18 Experts available now in Live!

Get 1:1 Help Now