Set WshShell = CreateObject("Wscript.Shell")
Set oFS = CreateObject("Scripting.FileSystemObject")

' Default File Location
strFileLocation = "c:\windows\"

' ERunAs .eras name
strERAS = "notepad.eras"

' Name you want displayed under the shortcut Icon
strProduct = "Notepad"

' Add the full path to the application containing the icon you wish to display, ie c:\windows\notepad.exe, leave blank for default icon
strIconLocation = "c:\windows\notepad.exe"

'Copy the files from the current directory to the c:\windows
oFS.CopyFile "ERunAs.exe", strFileLocation
oFS.CopyFile strERAS, strFileLocation
Set oFS = Nothing

' You can replace StartMenu with 'Desktop' or "StartMenu'
strLink = WshShell.SpecialFolders("Desktop") + "\" & strProduct & ".lnk"

Set WshShortcut = WshShell.CreateShortcut(strlink)
WshShortcut.Description = strProduct
WshShortcut.TargetPath = strFileLocation & "ERunAs.exe"
WshShortcut.Arguments = strFileLocation & strERAS

'Only add icon if user specifies a path
if strIconLocation<>"" then
	WshShortcut.IconLocation =strIconLocation
end if

WshShortcut.WindowStyle = 1
WshShortcut.WorkingDirectory = strFileLocation
WshShortcut.Save

msgbox "Finished"
