Created
May 31, 2018 07:52
-
-
Save csarron/196c52f392bc47a731fc0833fcdb4e73 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit } | |
if (!(Get-Command choco -errorAction SilentlyContinue)) | |
{ | |
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned -Confirm:$false | |
"choco not exists or not installed, begin installing chocolatey..." | |
$script = New-Object Net.WebClient | |
$script | Get-Member | |
$script.DownloadString("https://chocolatey.org/install.ps1") | |
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex | |
} | |
choco install -y python googlechrome chromedriver | |
$env:Path += ";C:\Python36" | |
refreshenv | |
python -V | |
python -m pip install --upgrade pip | |
pip install selenium | |
$py_script = Join-Path $PSScriptRoot taobao_rename.py | |
python $py_script | |
Pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment