Skip to content

Instantly share code, notes, and snippets.

@anteriovieira
Last active December 28, 2016 14:43
Show Gist options
  • Save anteriovieira/c2bfc3d2935d8c05881200b54ec7465d to your computer and use it in GitHub Desktop.
Save anteriovieira/c2bfc3d2935d8c05881200b54ec7465d to your computer and use it in GitHub Desktop.
' Create shortcut for GENERALI
Set WshShell = WScript.CreateObject("WScript.Shell")
ProgramFiles = WshShell.ExpandEnvironmentStrings("%ProgramFiles(x86)%")
' Function create shortcut
'
' @param string name
' @param string urlLink
' @param string browser
Function CreateShortcut(name, urlLink, browser)
strDesktop = WshShell.SpecialFolders("Desktop")
Set oUrlLink = WshShell.CreateShortcut(strDesktop & "\" & name & ".lnk")
oUrlLink.TargetPath = browser
oUrlLink.IconLocation = browser
oUrlLink.TargetPath = browser
oUrlLink.Arguments = urlLink
oUrlLink.Save
End Function
' Browsers
firefox = ProgramFiles & "\Mozilla Firefox\firefox.exe"
chrome = ProgramFiles & "\Google\Chrome\Application\chrome.exe"
' Create shortcuts
Call CreateShortcut("Novo Portal Generali", "http://portalcorretor1.generali.com.br/canalcorretor/Login.aspx", firefox)
call CreateShortcut("Google Test", "http://www.google.com.br", firefox)
call CreateShortcut("Google In Chrome", "http://www.google.com.br", chrome)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment