On Error Resume Next
Set oShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
sCDisExe = "C:\oracle\product\11.1.1\as_1\bin\dis51usr.exe"
sDDisExe = "D:\oracle\product\11.1.1\as_1\bin\dis51usr.exe"
sDesktop = oShell.SpecialFolders("Desktop")
Set oCut = oShell.CreateShortcut(sDesktop + "\Oracle Discoverer 11g.lnk")
oCut.WindowStyle = 3
If(oFSO.FileExists(sDDisExe)) Then
oCut.TargetPath = sDDisExe
oCut.WorkingDirectory = "D:\oracle\product\11.1.1\as_1\bin\"
Else
oCut.TargetPath = sCDisExe
oCut.WorkingDirectory = "C:\oracle\product\11.1.1\as_1\bin\"
End If
oCut.Save