net start Apache2.2
wampmanager
chrome --new-window "http://localhost:8090/form.html"
This is the batch file that I am using to start the apache server, wampserver and then open the url in a new chrome window.
But when I run this the command window gets stuck on wampmanager and hence does not proceed with opening the html page.
What should I do ?
try
start wampmanager
Not that I know - or want to know - what wampmanager is. This should cure the problem.
Related
I'm just exploring batch files to avoid unnecessary typing. First, I set up the localhost server, then attempt to open the browser to access the local server. The batch file opens and starts the server, but then stops there. (it doesn't perform the open browser command) batch file looks like this:
cd C:\directory
py -m http.server
start /max http://localhost:8000
what am i missing?
The Problem
The problem is that once you start the python server, it keeps running, not stopping to run the open browser command.
The Solution
So you have to run the open browser command before the python server command.
Example
Like this:
cd C:\directory
start /max http://localhost:8000
py -m http.server
I'm trying to create a batch script to activate a conda environment and start an application within it (which has been previously installed).
But for whatever reason, the application doesn't start but the batch script itself restarts again and again.
I'm using the following script:
#ECHO OFF
ECHO Activate Environment ...
call activate ENV
ECHO Start application ...
ApplicationName
PAUSE
The output if I start the batch script by doubleclicking it is:
Activate Environment ...
Start application ...
Activate Environment ...
Start application ...
Activate Environment ...
Start application ...
I also tried with call ApplicationName and start ApplicationName but this doesn't work either. The application I would like to start is an own application which can be installed via pip (Python application, entrypoint specified in setup.py).
The normal use is to open a cmd or the Anaconda prompt, activate the environment manually and enter the command ApplicationName on the command line. After this the application triggers a browser window to open a login screen. When I use the application like that the command line window stays open during the execution of my application and prints debug messages.
I just don't understand why the commands are repeated again and again instead of that the application is started.
Do you know what causes the behaviour?
Thank you in advance for an answer!
Best Regards
Your batch file has the same name as your undisclosed ApplicationName.
Therefore the batch file will restart ApplicationName.bat instead of ApplicationName.exe
I wrote a batch file with the intention of launching Opera and VSCode (on a workspace) with one click, it looks like this:
It runs just fine. Opera starts, then VSCode does as well. The problem is, that when I close the CMD window, VSCode also shuts itself down. I wanted the CMD window to automatically close after execution in the first place, so I tried putting an "&& exit" and "exit" at the end of the code (not at the same time), but it didn't work.
I assume that you have opera.exe added to the PATH.
#echo off
start opera
cd C:\Users\louis\Desktop\Development\Projects\JS
"C:\Program Files\Microsoft VS Code\bin\code.cmd" JS.code-workspace
or
#echo off
start opera
"C:\Program Files\Microsoft VS Code\bin\code.cmd" C:\Users\louis\Desktop\Development\Projects\JS\JS.code-workspace
The issue
I am trying to create a batch file that will execute the following two commands:
cd /some/path
dotnet run
that produces the following output:
It starts my localhost server.
Trying To Accomplish
What I would like to do is, put those two commands in a batch file and automatically open Chrome to the server address, HOWEVER, the dotnet command takes some time to finish. So somehow, I would have to keep monitoring localhost to see if it is available.
Any help would be appreciated. Although opening a CMD window, typing those 2 commands, and waiting a minute isn't all that much of a problem, it sure would be nice to just click on a batch file.
Thank you.
You can create a batch file like this code :
#echo off
Set "ApplicationPath=%UserProfile%\source\repos\PruttPos\PruttPosSystem\"
CD /D "%ApplicationPath%"
dotnet run
Start "Chrome" Chrome.exe "http://localhost:5000"
pause
So I created this program to launch overwatch and chrome when i open it.
#echo off
start Overwatch.exe
start Chrome.exe www.youtube.com
timeout 2 > exit
Can I somehow make it run automatically after turning on my pc?
Here's the site you might want to look at:
https://www.computerhope.com/issues/ch000322.htm
Basically you want
Run a batch file at boot in Windows 8 and 10 users
Create a shortcut to the batch file.
Once the shortcut has been created, right-click the file and select Cut.
Press the Start button and type Run and press enter.
In the Run window, type shell:startup to open the Startup folder.
Once the Startup folder has been opened, click the Home tab at the top of the folder and select Paste to paste the shortcut into the folder.