I've uploaded to the internet my batch file code. And I want to know if I can run this batch file (which is now on the internet) from my computer on the cmd. Is there a command to do this? I really don't know how I can do this.
Asked
Active
Viewed 577 times
2
-
Where did you upload your file? – IamK Dec 12 '16 at 11:42
2 Answers
0
you must first download it.You can use the winhttpjs.bat for that purpose:
call winhhtpjs.bat https://example.com/mybat.bat -saveTo "%cd%\mybat.bat"
call mybat.bat
or with bitsadmin (not every windows have it by default):
bitsadmin /transfer myDownloadJob /download /priority normal https://example.com/mybat.bat "%cd%\mybat.bat"
call mybat.bat
Here you can see more options on how you can download a file
0
You can download your file with powershell and batch and start it like this way :
@echo off
set "url=http://hackoo.alwaysdata.net/Matrix.mp3"
set "FileLocation=%userprofile%\Desktop\Matrix.mp3"
echo Please wait ... Downloding file is in progress ...
Call :PSDownload "%url%" "%FileLocation%"
start "" "%FileLocation%"
exit /b
::*********************************************************************************
:PSDownload <url> <File>
Powershell.exe -command "(New-Object System.Net.WebClient).DownloadFile('%1','%2')"
exit /b
::*********************************************************************************
Just change the URL and FileLocation variables to yours and test it ;)

Hackoo
- 18,337
- 3
- 40
- 70