I changed my code to this and now I get an error.
Code:' Make sure variables are declared. option explicit ' Program starts running here. call CreateShortCut() sub CreateShortCut() dim objShell, strEnvironment, objLink set objShell = CreateObject("WScript.Shell") strEnvironment = objShell.ExpandEnvironmentStrings("%USERPROFILE%\Start Menu\Programs\Accessories") CurrentDirectory = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".") set objLink = objShell.CreateShortcut(strEnvironment & "\downIt.lnk") objLink.Description = "Shortcut to downIt" TargetPath = CurrentDirectory & "\downIt.bat" objLink.WindowStyle = 1 WorkingDirectory = CurrentDirectory objLink.Hotkey = "CTRL+SHIFT+ALT+U" objLink.Description = "This will update the scanner from the internet." objLink.Save end sub




Reply With Quote