powershell Google Firefox
$firefox = @{
DisplayName = "Mozilla Firefox";
filename = "Firefox Setup 68.0b7.msi"
Url = "\\10.63.32.243\Share\Browsers\Firefox Setup 68.0b7.msi"
}
$Chrome = @{
DisplayName = "Google Chrome";
filename = "GoogleChromeStandaloneEnterprise64.msi"
Url = "\\10.63.32.243\Share\Browsers\GoogleChromeStandaloneEnterprise64.msi"
}
function Test-Installation {
Param([Parameter(Position = 0, Mandatory = $true)] [String] $DisplayName)
$key1 = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*"
$key2 = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
$installed1 = Get-ItemProperty -Path $key1 | Select-Object DisplayName | Where-Object { $_.DisplayName -and $_.DisplayName.Contains($DisplayName) }
$installed2 = Get-ItemProperty -Path $key2 | Select-Object DisplayName | Where-Object { $_.DisplayName -and $_.DisplayName.Contains($DisplayName) }
if (($null -eq $installed1) -and ($null -eq $installed2)) { return $false } else { return $true }
}
Write-Host "Step 1. Install firefox" -ForegroundColor Cyan
if (Test-Installation -DisplayName $firefox.DisplayName) {
Write-Host "firefox has been installed!" -ForegroundColor Green
} else {
Start-BitsTransfer $firefox.url "$env:temp\$filename"
$destination = "$env:temp"
msiexec /i "$destination\Firefox Setup 68.0b7.msi" /norestart INSTALLSERVICE=1 /QUIET |out-null
Write-Host "firefox installed success!"
}
Write-Host "Step 2. Install chrome" -ForegroundColor Cyan
if (Test-Installation -DisplayName $chrome.DisplayName) {
Write-Host "chrome has been installed!" -ForegroundColor Green
} else {
Start-BitsTransfer $chrome.url "$env:temp\$filename"
$destination = "$env:temp"
msiexec /i "$destination\GoogleChromeStandaloneEnterprise64.msi" /norestart INSTALLSERVICE=1 /QUIET |out-null
Write-Host "chrome installed success!"
}
powershell Google Firefox的更多相关文章
- 关闭 Visual Studio 2013 的 Browser Link 功能
最近公司弄新项目需要用 MVC,就把 IDE 升级到了 Visual Studio 2013,在开发的时候发现有好多请求一个本地49925的端口 . 很奇怪,一开始以为是 Visual Studio ...
- PHP(1)——学习之前做点啥准备
工欲善其事必先利其器,当然是先准备工具咯.首先硬件条件就是双核CPU以及8G内存的电脑一台,操作系统环境:windows(64bit)7+.Mac OSX 10.10+.Linux 64bit.软件环 ...
- Visual Studio 2013 Web开发、新增功能:“Browser Link”
微软正式发布Visual Studio 2013 RTM版,微软还发布了Visual Studio 2013的最终版本..NET 4.5.1以及Team Foundation Server 2013. ...
- jquery层居中,点击小图查看大图,弹出层居中代码,顶部层固定不动,滚动条滚动情况
jquery层居中,点击小图查看大图,弹出层居中代码 http://www.cnblogs.com/simpledev/p/3566280.html 见第一版,发现一个情况,如果页面内容多出一屏的情况 ...
- [bug]Syntax error, unrecognized expression: input#ctl00$ContentPlaceHolder1$Pager_input
1.在ie10上浏览页面的时候,突然发现在使用Aspnetpager的页面会有一个bug. 2. 3.查了很多解决方案,最后将vs2013中, 将该勾取消,再次浏览,你会发现就正常了,虽然该功能很强大 ...
- parseInt引发的血案
今天做了个专题活动,页面头上有个倒计时 专题做完后上线了,没发现有什么问题,结果,运营MM突然和我说:技术哥哥出问题了,360浏览器在秒数从10到09的时候直接变成 00 了! 一看我去真的,该死的3 ...
- Visual Studio 2013 Web开发、新增功能:“Browser Link”
微软正式发布Visual Studio 2013 RTM版,微软还发布了Visual Studio 2013的最终版本..NET 4.5.1以及Team Foundation Server 2013. ...
- Visual Studio 2013 的 Browser Link 功能
Visual Studio 2013 的 Browser Link 功能 最近公司弄新项目需要用 MVC,就把 IDE 升级到了 Visual Studio 2013,在开发的时候发现有好多请求一个本 ...
- Visual Studio 2013中的“Browser Link”
前几天,参加了,VS13的新特性的讲座,回来便试了一下, 默认Html会引用如下脚本: <!-- Visual Studio Browser Link --> <script typ ...
随机推荐
- H3C查看、删除已经保存配置文件--用户图示(console)以上
<H3C>display saved-configuration //显示已经保存的内容 <H3C>reset saved-configuration //删除 ...
- Yet Another Array Queries Problem CodeForces - 863D (暴力/思维)
You are given an array a of size n, and q queries to it. There are queries of two types: 1 li ri — p ...
- WCF 服务应用程序
1. 创建 WCF 服务程序和客户端程序,参考如下: https://docs.microsoft.com/zh-cn/dotnet/framework/wcf/getting-started-tut ...
- 37.html
转载:https://www.cnblogs.com/yuanchenqi/articles/5976755.html 前端概述 import socket def main(): sock = so ...
- 力扣90——子集 II
原题 给定一个可能包含重复元素的整数数组 nums,返回该数组所有可能的子集(幂集). 说明:解集不能包含重复的子集. 示例: 输入: [1,2,2] 输出: [ [2], [1], [1,2,2], ...
- HTTP中GET与POST的区别 99%的错误认识
@[TOC本篇文章分两部分,第一部分可以列为初为新人的装逼失败模式,第二部分列为修炼低调模式. 装逼失败模式:99%的人对GET和POST的认识 修炼低调模式:1%不知道的进阶认识 GET和POST, ...
- 【转载】JavaScript术语:shim 和 polyfill
在学习和使用 JavaScript 的时候,我们会经常碰到两个术语:shim 和 polyfill.它们有许多定义和解释,意思相近又有差异. Shim Shim 指的是在一个旧的环境中模拟出一个新 A ...
- python+selenium+Chrome options参数
python+selenium+Chrome options参数 Chrome Options常用的行为一般有以下几种: 禁止图片和视频的加载:提升网页加载速度. 添加代理:用于翻墙访问某些页面,或者 ...
- CSS单行文字超出省略
.ellipsis { white-space:nowrap overflow:hidden text-overflow:ellipsis }
- Theia APIs——Preferences
上一篇:Theia APIs——命令和快捷键 Preferences Theia有一个preference service,模块可以通过它来获取preference的值,提供默认的preference ...