I want to be able to make a .bat or .vbs file that opens a certain website and closes it after a set period of time. I'm trying to get the website to be unclosable until it's manually closed (through task manager) or after a timer of like a minute. Thanks.
You have to open a website in a browsers so you gab to call your browser with a command line argument (in this case the url of the website)
I only know how to do that with Firefox but it should be the same with chrome or IE.
start "" "path to browser" [url or other argument]
^ Title of your window!
Since it's a browser you can only close it manually!
Related
#echo off
start iexplore http://path/generateInfo.php?orderNum=%1
This is my extremely basic batch file. The issue is that it can be ran 20 different times on one button click, and I want it to create 20 tabs in IE. This currently creates 20 different IE windows. Any help would be great.
Each run would have a different parameter for my php page.
If you try to set the IE browser as a default browser then with the use of the following code you can open the tab in the existing instance of the IE browser.
#echo off
start /d "" www.microsoft.com
Output:
How can I run an internet browser with an url, any url I want, and it opens but it opens in background without showing a window?
It should be like a background media player. And if you know how to do that please tell me and tell me how I can mute the browser once starting. I am trying to do this with a batch file.
You can open a hidden window with powershell. You can use powershell commands within cmd or in a .bat file as well. Here's an example:
powershell saps 'https://stackoverflow.com/questions/44642194' -wi hidden
That opens a hidden window of your default browser with the specified link.
I have this simple batch script that opens up a firefox profile
#echo off
start firefox.exe -P default -no-remote
sometimes the profile is already opened and i get this popup.
Is there anyway to check if the popup appeared and click the close firefox button? Or maybe theres a piece of code where i can close the firefox profile and play that in the begining of the batch file so that i know for sure its closed and dont get that popup. Thanks for your help.
Try with sendkeys.bat:
call sendkeys.bat "Close Firefox" "{LEFT}{ENTER}"
Is there a possibility to just open and close one single tab in a already running chrome browser session? I dont want to start a whole new browser like the command
start chrome.exe http://stackoverflow.com/
does it. Does someone have an idea how i could realize this?
I now found a way for opening a new tab on a already running browser:
start "webpage name" "http://stackoverflow.com/"
But I still don't know what the command for closing a single tab in a browser is.
Open Tab:
start "www.Discord.com"
or
start "https://Discord.com"
I still dont have any type of command that closes a tab on browser...
I have a small angularjs app, that reads data from a json file and shows it on the screen. I wanted to share this via dropbox to multiple people, so that they double click on the html file and open it on their browser.
Chrome will not allow you to run javascript from the file system and it needs to be started with
--allow-file-access-from-files --disable-web-security --allow-file-access
in order for the app to run.
Firefox and Safari both run the app without any issue.
I was wondering, since I am targeting windows systems predominantly, is there a way I can force the index.html file to be opened via firefox if the user has it installed, if not after asking the user's permission download it for him and then open the index.html file? Can I make an 'easy to understand and launch' exe file that does this for the user?
Being a java programmer, I am not sure how to go about doing this..