Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a vbs instead of bat file please

Status
Not open for further replies.

khaledocom

Technical User
Jan 25, 2011
3
QA
Hi all,

Since I had a lot of troubles with Excel 2007, and already I have 2003 on my machine I did the following batch and named it converter.bat

in this file:



"C:\Program Files\Microsoft Office\OFFICE12\excel.exe" /unregserver
"C:\Program Files\Microsoft Office\OFFICE11\excel.exe" /regserver


The problem it runs Excel 2007 and waits till I close it then starts executing second line.

Can this be done through a vb script file
 
You could try something like:

Code:
Option Explicit
Dim objFSO, objShell
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = WScript.CreateObject ("WScript.shell")
objShell.Run "cmd /c ""C:\Program Files\Microsoft Office\OFFICE12\excel.exe"" /unregserver && timeout /t 3 && tskill excel && ""C:\Program Files\Microsoft Office\OFFICE11\excel.exe"" /regserver",1,True
Set objFSO = Nothing
Set objShell = Nothing
wscript.quit
 
Thanks a lot brother, I'll test it and let you know the result.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top