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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OWC Update/Download script

Status
Not open for further replies.

Nogi

Technical User
Dec 10, 2004
132
BE
Hi all,

I have found this script on the net, and tried to impliment this to my project, but i can't seem to figure out why it's not working.

this script is set to check if OWC exists, and if so, what version. Depending on this info, it should display the related messagebox.

Code:
<script language="vbscript">

Sub CheckForOWC()

Dim objOWC

Dim retval

on error resume next

Dim downloadPath

downloadPath =
"[URL unfurl="true"]http://download.microsoft.com/download/OfficeXPStandard/owc10/10[/URL]
33/WIN98MeXP/EN-US/owc10.exe"

Set objOWC = CreateObject("OWC10.Chartspace")

if(objOWC is nothing) then

if msgbox ("O.W.C. v10 is a required component. Click YES to install it [8
megs appr. 5 - 10min]. If you don't have Office XP installed, you will not
be allowed to change values in the spreadsheet",3,"Critical component
missing!") = 6 then


window.navigate(downloadPath)

end if

else

if(objOWC.MajorVersion < 10) then

if msgbox ("O.W.C. v10 is a required component. Click YES to install it [8
megs appr. 5 - 10min]. If you don't have Office XP installed, you will not
be allowed to change values in the spreadsheet", 3, "Critical component
missing!") = 6 then

window.navigate(downloadPath)

end if

end if

end if

End Sub

</script>

I've put this script in the head of my first opening html-page, and it doesn't seem to load since i get no messagebox.
However, when i try to display an asp-page, i get the normal IE-error saying that they can't be viewed without download the owc first.

anyone have an idea of what i've done wrong?

I tried adding it to an .asp page to, but that didn't work ether.
 
How do you call this script? If it is to run automatically when page is loaded, remove "Sub CheckForOWC()" and "End Sub" lines.

combo
 

VBScript == forum329

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top