I have two batch files as below, and I want to merge them in to one btach file? (I don't want to run them seperately want to one click to run) First one delete and copy file, second one is opens chrome and login. These batch files working properly one by one when I clicked. But I need one batch file.
Thanks for your help..
First one is:
@echo off
del "C:\web.config"
copy "C:\\Web - New.config" "C:\web.config"
Second one one is:
@if (@CodeSection == @Batch) @then
@echo off
rem Use %SendKeys% to send keys to the keyboard buffer
set SendKeys=CScript //nologo //E:JScript "%~F0"
START CHROME "http://localhost:15000/"
rem the script only works if the application in question is the active window. Set a
timer to wait for it to load!
timeout /t 2
rem use the tab key to move the cursor to the login and password inputs. Most htmls
interact nicely with the tab key being pressed to access quick links.
rem %SendKeys% "{TAB}"
rem now you can have it send the actual username/password to input box
%SendKeys% "admin"
%SendKeys% "{TAB}"
%SendKeys% "1234"
%SendKeys% "{ENTER}"
goto :EOF
@end
// JScript section
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.SendKeys(WScript.Arguments(0));