Giter Site home page Giter Site logo

powershellscripts's Introduction

Some PowerShell Script

Chrome Downloader/Chrome一键下载

Make sure you have PowerShell V3 installed/请务必确认系统的PowerShell版本大于V3

可以在PowerShell中运行$PSVersionTable.PSVersion.Major以获取当前的PowerShell版本

# 1.Make a new folder and cd to this path/新建一个文件夹,然后进入该目录
# 2.Hold shift and right click, then click 'Open command window here' or 'Open PowerShell window here'/按住Shift单击滑鼠右键,点击'在此处打开PowerShell窗口'或者'在此处打开命令行窗口'
# 3.Run code/运行以下脚本

#If PowerShell:/如果你运行的是PowerShell:
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/TkYu/PowerShellScripts/master/ChromeDownload/Chrome.ps1'))

#If Command Line:/如果你运行的是Windows命令行:
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/TkYu/PowerShellScripts/master/ChromeDownload/Chrome.ps1'))"

If you want some mouse gestures, just change Chrome.ps1 to ChromeWithGreenChrome.ps1 如果你需要一些鼠标手势及高级功能,将脚本中的Chrome.ps1替换为ChromeWithGreenChrome.ps1以尝试GreenChrome

Enviroments/环境变量

  • $env:ggdir='D:\chrome' #Set install location/指定安装的目录,不指定将会默认当前文件夹,如果不存在将会尝试创建
  • $env:ggarch='x86' #Set install arch, x64 as x64,x86 as x86/指定下载的架构版本,默认和系统一致,x64代表64位,x86代表32位
  • $env:ggbranch='beta' #Set install branch, you can choose beta/dev/canary or leave null for stable/指定下载的分支,默认是正式版,也可以选填beta、dev、canary

Firefox Downloader/Firefox一键下载

Make sure you have PowerShell V3 installed/请务必确认系统的PowerShell版本大于V3/

可以在PowerShell中运行$PSVersionTable.PSVersion.Major以获取当前的PowerShell版本

# 1.Make a new folder and cd to this path/新建一个文件夹,然后进入该目录
# 2.Hold shift and right click, then click 'Open command window here' or 'Open PowerShell window here'/按住Shift单击滑鼠右键,点击'在此处打开PowerShell窗口'或者'在此处打开命令行窗口'
# 3.Run code/运行以下脚本

#If PowerShell:/如果你运行的是PowerShell:
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/TkYu/PowerShellScripts/master/FirefoxDownload/Firefox.ps1'))

#If Command Line:/如果你运行的是Windows命令行:
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/TkYu/PowerShellScripts/master/FirefoxDownload/Firefox.ps1'))"

If you want some mouse gestures, just change Firefox.ps1 to FirefoxWithFiredoge.ps1 如果你需要一些鼠标手势及高级功能,将脚本中的Firefox.ps1替换为FirefoxWithFiredoge.ps1以尝试Firedoge

Enviroments/环境变量

  • $env:ffdir='D:\firefox' #Set install location/指定安装的目录,不指定将会默认当前文件夹,如果不存在将会尝试创建
  • $env:ffloc='zh-CN' #Set install language/指定安装语言,如果不指定默认为当前系统语言
  • $env:ffarch='win64' #Set install arch, win64 for x64,win for x86 or leave null for same with system/指定下载的架构版本,默认和系统一致,win64代表64位,win代表32位
  • $env:ffbranch='beta' #Set install branch, you can choose beta/dev/nightly/esr or leave null for stable/指定下载的分支,默认是正常版,可以填beta、dev、nightly或者esr

PS

You can run two commands in one line in Windows CMD/Windows CMD中可以通过&&来并列运行语句

for example, I want install beta version chrome at D:\chrome:/举个例子,假如我想安装beta版本的chrome到D:\chrome下:

SET "ggbranch=beta" && SET "ggdir=D:\chrome" && @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/TkYu/PowerShellScripts/master/ChromeDownload/Chrome.ps1'))"

look this

powershellscripts's People

Contributors

tkyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

powershellscripts's Issues

怎么选择老大,全是,删除都不行

Online version is 81.0.4044.92, Local version is 81.0.4044.34, let`s update!
Extracting 81.0.4044.92_chrome_installer.exe
Extracting chrome.7z
Move-Item : 对路径“D:\software\Chrome\Chrome-bin\81.0.4044.92”的访问被拒绝。
所在位置 行:205 字符: 2

  • Move-Item "$installLocation\Chrome-bin\*" -Destination $installLo ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : WriteError: (D:\software\Chr...in\81.0.4044.92:DirectoryInfo) [Move-Item], IOException
    • FullyQualifiedErrorId : MoveDirectoryItemIOError,Microsoft.PowerShell.Commands.MoveItemCommand

Move-Item : 当文件已存在时,无法创建该文件。
所在位置 行:205 字符: 2

  • Move-Item "$installLocation\Chrome-bin\*" -Destination $installLo ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : WriteError: (D:\software\Chrome\Chrome-bin\chrome.exe:FileInfo) [Move-Item], IOException
    • FullyQualifiedErrorId : MoveFileInfoItemIOError,Microsoft.PowerShell.Commands.MoveItemCommand

Move-Item : 当文件已存在时,无法创建该文件。
所在位置 行:205 字符: 2

  • Move-Item "$installLocation\Chrome-bin\*" -Destination $installLo ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : WriteError: (D:\software\Chr...hrome_proxy.exe:FileInfo) [Move-Item], IOException
    • FullyQualifiedErrorId : MoveFileInfoItemIOError,Microsoft.PowerShell.Commands.MoveItemCommand

确认
D:\software\Chrome\Chrome-bin 处的项具有子项,并且未指定 Recurse
参数。如果继续,所有子项均将随该项删除。是否确实要继续?
[Y] 是(Y) [A] 全是(A) [N] 否(N) [L] 全否(L) [S] 暂停(S) [?] 帮助 (默认值为“Y”):

几个小问题

你好,
1.请问可以做一个脚本可以直接双击使用吗?或者以后用C#做一个图形界面出来。
2.下载的是64位的最新正式版好像,所以建议让用户选择,选择后下载相应的版本,比如正式版,beta版,nightly版等版本。最好把这些命令集成到图形界面就更好了,就好像你的GCsharp一样。
谢谢。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.