Solved

batch file to install according to office version

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

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.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
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…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

786 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