Commit 9c35575e authored by Jean-Francois Rey's avatar Jean-Francois Rey
Browse files

update provisioning

parent 32daf244
......@@ -13,25 +13,24 @@ $wcR.DownloadFile($url, $output)
Write-Output "Download completed $url"
Write-Output "unzip"
Expand-Archive -LiteralPath $output -DestinationPath 'C:\Windows\Temp\' InvoiceUnzipped
Expand-Archive -LiteralPath $output -DestinationPath 'C:\Windows\Temp\' -Force
Write-Output "Download repository"
miktexsetup --verbose --local-package-repository=C:\Windows\Temp\miktex --package-set=complete download
C:\Windows\Temp\miktexsetup.exe --verbose --local-package-repository=C:\Windows\Temp\miktex --package-set=complete download
Write-Output "Install "
C:\Windows\Temp\miktex\miktexsetup.exe --quiet --local-package-repository=C:\Windows\Temp\miktex --package-set=basic --shared=yes --common-install='C:\miktex' install
C:\Windows\Temp\miktexsetup.exe --quiet --local-package-repository=C:\Windows\Temp\miktex --package-set=basic --shared=yes --common-install='C:\miktex' install
Write-Output "MiKTeX installed into C:\miktex"
#if ( Test-Path "HKLM:\Software\R-core\Rtools" ) {
# $Rtoolsver = (Get-ItemProperty -Path "HKLM:\Software\R-core\Rtools")."Current Version"
# Write-Output "Rtools version $Rtoolsver installed"
#else {
# throw "ERROR: Can't install R $urlRtools"
if ( Test-Path "HKLM:\Software\\MiKTeX" ) {
Write-Output "MiKTeX installed"
else {
throw "ERROR: Can't install MiKTeX"
# Add miktex to PATH
# Add miktex to PATH <- done at install
#$oldpath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path
#$newPath = "$oldpath;C:\miktek\bin"
#$newPath = "$oldpath;C:\miktek\miktex\bin\x64"
#Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $newPath
......@@ -14,9 +14,9 @@ Write-Output "Download completed $url"
$pandocDir = 'C:\pandoc\'
Write-Output "Install $output into $pandocDir"
Expand-Archive -LiteralPath $output -DestinationPath $pandocDir InvoiceUnzipped
Expand-Archive -LiteralPath $output -DestinationPath $pandocDir -Force
if (Test-Path 'C:\pandoc\pandoc.exe')
if (Test-Path 'C:\pandoc\pandoc-2.10.1\pandoc.exe')
Write-Output "pandoc installed"
......@@ -26,5 +26,5 @@ else
# Add pandoc to PATH
$oldpath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path
$newPath = "$oldpath;C:\pandoc"
$newPath = "$oldpath;C:\pandoc\pandoc-2.10.1\\"
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $newPath
......@@ -77,6 +77,10 @@
remote_src: no
- name: Install Pandoc
win_command: powershell.exe -File C:\Windows\Temp\install-pandoc.ps1
- name: Clean
win_command: powershell.exe -
stdin: Remove-Item 'C:\Windows\Temp\' -Recurse
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment