@@ -260,17 +260,17 @@ function probe_platform_engines!(;verbose::Bool = false)
260
260
\$ webclient.DownloadFile("$url ", "$path ")
261
261
"""
262
262
replace (webclient_code, " \n " => " " )
263
- return ` $psh_path -NoProfile -Command "$webclient_code "`
263
+ return ` $psh_path -Version 3 - NoProfile -Command "$webclient_code "`
264
264
end
265
265
end
266
266
267
267
# We want to search both the `PATH`, and the direct path for powershell
268
268
psh_path = " C:\\ Windows\\ System32\\ WindowsPowerShell\\ v1.0\\ powershell"
269
269
prepend! (download_engines, [
270
- (` $psh_path -Command ""` , psh_download (psh_path))
270
+ (` $psh_path -Version 3 -NoProfile -Command ""` , psh_download (psh_path))
271
271
])
272
272
prepend! (download_engines, [
273
- (` powershell -Command ""` , psh_download (` powershell` ))
273
+ (` powershell -Version 3 -NoProfile - Command ""` , psh_download (` powershell` ))
274
274
])
275
275
276
276
# We greatly prefer `7z` as a compression engine on Windows
@@ -385,7 +385,11 @@ function probe_platform_engines!(;verbose::Bool = false)
385
385
if ! download_found
386
386
errmsg *= " No download engines found. We looked for: "
387
387
errmsg *= join ([d[1 ]. exec[1 ] for d in download_engines], " , " )
388
- errmsg *= " . Install one and ensure it is available on the path.\n "
388
+ errmsg *= " . Install one and ensure it is available on the path.\n "
389
+ if Sys. iswindows ()
390
+ errmsg *= " Ensure Windows Management Framework 3.0 or later "
391
+ errmsg *= " is installed and that Windows PowerShell can be started.\n "
392
+ end
389
393
end
390
394
391
395
if ! compression_found
0 commit comments