Monday, 1 May 2017

how to run localhost server from cmd shortcut bat file



so this is the method of how you can start localhost any server with any port using bat file shortcut having cmd commands

1) first of all create a text file and change its extention to .bat





2) well, i have three scenario's means i have three different apps that's run on different ports and have
different commands to run their servers so i will go through to all different scenarios

3) open .bat file in txt editor as i did so i am going to run a php laravel app which runs on port 8000
well, i hava my laraval project in directory "C:/lv/newone" so first i need to enter in the directory using cmd command "cd c:\lv\newone"then i need command to open browser and spacific port for which i have command like (start "" "c:\program files (x86)\google\chrome\application\chrome.exe" --new-window "http://localhost:8000/" ) without brackets which start chrome's new window tab with address localhost:8000



4) then simply write command to run app like for nodejs i have "php artisan serve" place cmd /k before last command that will keep cmd window open
Example's:


angular js app


nodejs app



even you can also start any of your desired program like i also used to start my IDE that had my project lastly opened like










so this is the solution you can start any localhost server and command using .bat shortcut instead of opening cmd then opening directory then browser and port .

<iframe width="560" height="315" src="https://www.youtube.com/embed/7_YSsw1kwUY" frameborder="0" allowfullscreen></iframe>


visit my youtube channel  ☺☻and other blogs for more such trciks

Saturday, 15 April 2017

full permession rights on folder and files using cmd with screen shots step by step


1) So the problem is i did't have ownership rights over folder or files so i can't be able to perform any action like :







2) First of all open cmd by pressing (winkey + R )  then typing "cmd"  OR open command prompt by searching "cmd"

3) Open the directory in which the folder or file is located in mine case folder is "tmep" having two files located in "D" drive 


4) After opening simply type command "takeown /f <foldername> /r /d y" well if the target is the file try simply "takeown /f <filename>" the /f is for full control




5) this wil give you the ownership of file and folder as shown then you have to run command "icacls <foldername> /grant user-name:F /T" put your current username and hit enter  this will display:




6) The /T means icacls will be applied on all files inside that folder.
if some file is giving problem put that command "icacls * /T /Q /C /RESET" to rest permissions inside folder directory as:



7) To know the complete usage information for Takeown.exe and ICacls.exe, run these commands from a Command Prompt window
"takeown /?"
"icacls /?
. . .
refer video for this


how to run localhost server from cmd shortcut bat file

so this is the method of how you can start localhost any server with any port using bat file shortcut having cmd commands 1) first of al...