Hi, I need a batch file that opens a hidden window with a website and also downloads and opens a PDF. I have this:
But it doesn't do anything. It worked once and now it only opens the cmd, closes itself and nothing happens. I tried this on a different computer and the same thing happened - nothing. What might be the problem? Thank you
Code
@echo off
set files='url1','url2'
powershell "(%files%)|foreach{$fileName='%TEMP%'+(Split-Path -Path $_ -Leaf);(new-object System.Net.WebClient).DownloadFile($_,$fileName);Invoke-Item $fileName;}"But it doesn't do anything. It worked once and now it only opens the cmd, closes itself and nothing happens. I tried this on a different computer and the same thing happened - nothing. What might be the problem? Thank you

