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 ...
随机推荐
- P1000 A+B Problem
题目描述 给定两个整数\(a,b\),输出它们的和. 输入格式 输入两个整数,表示\(a,b(1 \le a,b \le 10^9)\). 输出格式 输出一个整数,表示答案. 样例输入 20 30 样 ...
- activeMQ的两个默认端口8161和61616的区别
activeMQ默认配置下启动会启动8161和61616两个端口,其中8161是mq自带的管理后台的端口,61616是mq服务默认端口 . 8161是后台管理系统,61616是给java用的tcp端口 ...
- 2019-8-31-C#-控制台使用-UAC-权限
title author date CreateTime categories C# 控制台使用 UAC 权限 lindexi 2019-08-31 16:55:58 +0800 2018-07-05 ...
- 【Bad Blood】翻译0
(一)作者注 本书基于对超过150人以上的上百个采访,包括60多个Theranos的职工而著成.叙述中出现的人物大多数都是他们的真实姓名,也有些人希望我隐藏身份信息,他们有些害怕公司的惩罚,有些担心会 ...
- 1134 最长上升子序列 (序列型 DP)
思路: 由于一般的动态规划时间复杂度是O(n^2)(哈哈哈哈 第一次用的就是这个!)用在这里由于n最大为50000 所以会超时 到这里我们可以用一个数组来动态维护这个最长上升的子序列,将你要输入的子序 ...
- 圆角效果 border-radius——阴影 box-shadow——为边框应用图片 border-image
1.圆角效果 border-radius border-radius: 5px 4px 3px 2px; /* 四个半径值分别是左上角.右上角.右下角和左下角,顺时针 */ 不要以为border-ra ...
- dotnet 判断程序当前使用管理员运行降低权使用普通权限运行
有一些程序是不想通过管理员权限运行的,因为在很多文件的读写,如果用了管理员权限程序写入的程序,其他普通权限的程序是无法直接访问的.本文告诉大家如何判断当前的程序是通过管理员权限运行,然后通过资源管理器 ...
- [POJ2528]Mayor's posters(离散化+线段树)
Mayor's posters Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 70365 Accepted: 20306 ...
- 定位、识别;目标检测,FasterRCNN
定位: 针对分类利用softmax损失函数,针对定位利用L2损失函数(或L1.回归损失等) 人关节点检测 针对连续变量和离散变量需要采用不同种类的损失函数. 识别: 解决方案: 1.利用滑动窗口,框的 ...
- Python之time模块和datatime模块
import time time.sleep(5) #休眠 time.time() #返回系统时间戳 utc时间秒数 time.ctime() #返回字符串时间格式,也可以传入参数转换为字符串时间ti ...