REM Script for creating a URL shortcut on the user's Programs menu REM Rename this file to have a .bat ending before trying to use it. REM Careersoft 2007 REM Stop code execution lines displaying to user @ECHO OFF REM Change the following lines for the URL and product name that works on your network REM If you want to go straight to the product, you can add HI (for Higher Ideas) REM or JED (for Job Explorer Database) to the URL SET URL=http://add-your-url-here:8082/ SET LINK_DISPLAY_NAME=Careersoft Applications REM We do this two different ways, for NT and non-NT systems REM We detect this with %HOMEDRIVE%, which only works on NT systems, and comes up blank on others IF "%HOMEDRIVE%" == "" GOTO NOTNT :NT REM Get the Programs folder for current user (NT only) SET ProgramsFolder=%HOMEDRIVE%%HOMEPATH%\Start Menu\Programs GOTO WRITEFILE :NOTNT REM There is only this one Program files folder in non-NT systems SET ProgramsFolder=%windir%\Start Menu\Programs GOTO WRITEFILE :WRITEFILE REM Get the file path, based on what we found for the Desktop folder REM The file name less the .url ending is the display name that the user sees SET FullPath=%ProgramsFolder%\%LINK_DISPLAY_NAME%.url REM We only do this the once - if the shortcut file exists already, we skip this next bit IF EXIST "%FullPath%" GOTO END REM Create our link file, a simple two-liner ECHO [InternetShortcut]>>"%FullPath%" ECHO URL=%URL%>>"%FullPath%" :END REM Clear the screen (on some systems the window will not self-close without this) CLS REM Job done EXIT