| |
nukeboy
Posts: 10
Score: 0
Joined: 5/22/2001
From: USA
Status: offline
|
Here's some code I put together to do something similar. I have a page where the user can click a link (which has an id="startapp") and launch a local application. This may be different than what you're after since I'm looking for a specific app and not polling all installed apps. Sub startapp_OnClick Dim strAppPath, strTestPath Dim MyObj Dim fso, drives, drive strTestPath = ":\PROGRA~1\AppName\AppName.exe" Set fso = CreateObject("Scripting.FileSystemObject") Set drives = fso.Drives For Each drive In drives If Drive.DriveLetter <> "A" Then If fso.FileExists(Drive.DriveLetter&strTestPath) Then strAppPath = Drive.DriveLetter&strTestPath End If Next Set MyObj = CreateObject("WScript.Shell") If strAppPath <> "" Then MyObj.Run strAppPath Else MsgBox "Application could not be found on your system" End If Set MyObj = Nothing Set fso = Nothing End Sub Hope this helps.
|
|