home *** CD-ROM | disk | FTP | other *** search
- ' INSTALL A SHORTCUT LINK TO SHARPDEVELOP AND HELP FILE ON DESKTOP
-
- Option Explicit
-
- ' Declare all variables used
- Dim WshShell, strDesktop, strWorkingDir, nPos, strShortcut,oShellLink
-
- ' Initialize all constants
- Const cShortcutlink = "\SharpDevelop .80.lnk"
- Const cDescription = "A free .NET development environment"
- Const cExecutable = "SharpDevelop.exe"
- Const cHelpShortcut = "\SharpDevelop Help.lnk"
- Const cHelpLocation = "doc\Program\SharpDevelop.chm"
- Const cHelpDescription = "Help for SharpDevelop"
-
- Set WshShell = WScript.CreateObject("WScript.Shell")
- strDesktop = WshShell.SpecialFolders("Desktop")
-
- strWorkingDir = WScript.ScriptFullName
- nPos = InstrRev(strWorkingDir, "\")
- strWorkingDir = Left(strWorkingDir, nPos)
- strShortcut = strWorkingDir & cExecutable
-
- Set oShellLink = WshShell.CreateShortcut(strDesktop & cShortcutlink)
- oShellLink.TargetPath = strShortcut
- oShellLink.WindowStyle = 1
- oShellLink.Description = cDescription
- oShellLink.WorkingDirectory = strWorkingDir
- oShellLink.Save
-
- Set oShellLink = WshShell.CreateShortcut(strDesktop & cHelpShortcut)
- oShellLink.TargetPath = strWorkingDir & cHelpLocation
- oShellLink.WindowStyle = 1
- oShellLink.Description = cHelpDescription
- oShellLink.WorkingDirectory = strWorkingDir
- oShellLink.Save
-