/
chocolateyinstall.ps1
31 lines (27 loc) · 1.2 KB
/
chocolateyinstall.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$toolsLocation = Get-ToolsLocation
$seleniumDir = "$toolsLocation\selenium"
$driverPath = "$seleniumDir\msedgedriver.exe"
$parameters = Get-PackageParameters
$packageArgs = @{
packageName = 'selenium-chromium-edge-driver'
url = 'https://msedgedriver.azureedge.net/108.0.1462.54/edgedriver_win32.zip'
url64 = 'https://msedgedriver.azureedge.net/108.0.1462.54/edgedriver_win64.zip'
checksum = 'ee2d62baefbe30edb680180e151fb7bb83d9a0f15c1a59c019a1b7360076cc9a'
checksum64 = '009e201cd3fe9af671a42cd0c3383fc2ff7f79d9c80e12442e640ae450b0e5a1'
checksumType = 'sha256'
checksumType64 = 'sha256'
unzipLocation = $seleniumDir
}
Install-ChocolateyZipPackage @packageArgs
Uninstall-BinFile -Name 'msedgedriver'
If ($parameters['SkipShim'] -ne 'true') {
Install-BinFile -Name 'msedgedriver' -Path $driverPath
}
$menuPrograms = [environment]::GetFolderPath([environment+specialfolder]::Programs)
$shortcutArgs = @{
shortcutFilePath = "$menuPrograms\Selenium\Selenium Chromium Edge Driver.lnk"
targetPath = $driverPath
iconLocation = "$toolsDir\icon.ico"
}
Install-ChocolateyShortcut @shortcutArgs