Last active
December 27, 2015 18:19
-
-
Save jsakamoto/7369469 to your computer and use it in GitHub Desktop.
This file contains 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
@powershell -nop -ex unrestricted -c "iex ((new-object net.webclient).DownloadString('http://goo.gl/2JUSZU'))" |
This file contains 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
function Download-File { | |
param ( | |
[string]$url, | |
[string]$file | |
) | |
Write-Host "Downloading $url to $file" | |
$downloader = new-object System.Net.WebClient | |
$downloader.DownloadFile($url, $file) | |
} | |
function Expand-ZipFile { | |
param ( | |
[string]$file, | |
[string]$destination | |
) | |
$shell = New-Object -ComObject shell.application | |
$zip = $shell.NameSpace($file) | |
foreach($item in $zip.items()) | |
{ | |
$shell.Namespace($destination).copyhere($item) | |
} | |
} | |
$tagname = "1.0" | |
$zipname = "markdown-presenter-$tagname.zip" | |
$zippath = Join-Path (pwd).Path $zipname | |
Download-File -url "https://github.com/jsakamoto/MarkdownPresenter/releases/download/v.$tagname/$zipname" -file $zippath | |
Expand-ZipFile -file $zippath -destination (pwd).Path | |
sleep -Seconds 1 | |
del $zippath | |
.\start-presenter-for-windows.bat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment