views:

262

answers:

4

I would like to direct the user to an appropriate download link per case. Can I embed a clickable link in a vbs message box? Or, is there a cleaner way to solve this problem?

 select case FSO.GetFileVersion(strCorLib)
         Case "2.0.50727.42"
          strNETVersion = strNETVersion & " SP0 (not so good!)"
         Case "2.0.50727.1433"
          strNETVersion = strNETVersion & " SP1 (this will work)" 
         Case "2.0.50727.3053"
          strNETVersion = strNETVersion & " SP2 (this is good)"
         end select

         strNetVersion = strNETVersion & ", " & FSO.GetFile(strCorLib).DateLastModified
        else
         strNETVersion = ".NET 2.0 not installed"
        end if
        sayit strNetVersion
+2  A: 

It's not possible using a standard msgbox... you'd have to roll your own...

Check out this link for more info...

John Weldon
objShell.Run(http://www.alinktosendusertodownload.com) works well enough for me until I absolutely must come up with a cleaner solution. I will have to up-vote you for that, thanks.
jJack
A: 

Also check ShowModalDialog. It allows exactly what you want, but like the link from John it's an IE only solution.

C. Ross
A: 

use jQuery and a little markup to solve this problem. jQuery not even necessary, but saves coding.

Dustin Laine
A: 

When I code VBScript, I use something like that. IMO it's a cleaner way.

iRes = objShell.Popup("Something not found." & vbNewLIne & _
    "Without that the world wont be saved." & vbNewLIne & _
    "Download it now?",, "Required software is missing", 4+48)    ' 4=MB_YESNO, 48=MB_ICONEXCLAMATION
if iRes = 6 then     ' 6=IDYES
    objShell.Run("http://www.microsoft/com/...")
end if
Soonts