How to kill processes on Windows backend


taskkill command is what you looking for;

first try with tasklist after

C:\Users\tunatore>tasklist

Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
System Idle Process 0 Services 0 24 K
System 4 Services 0 984 K
smss.exe 428 Services 0 68 K
wininit.exe 656 Services 0 116 K
services.exe 720 Services 0 7,768 K
lsm.exe 792 Services 0 3,136 K
Excel.exe 892 Services 0 93,136 K

After learning the process name just apply the following command
/im stands for image name “*” wildcards are also supported
/f stands for forcing
/t terminates child processes as well

C:\Users\tunatore>taskkill /f /im Excel.exe /t

more details

taskkill /?

How to import mySQL dumb file into database from command line Windows OS


Type the following command first to connect mySQL DB from command line;

C:\Users\tuna>mysql -u root -p
Enter password: type your db password here
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.5.25 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql>
mysql>source C:\file.sql

and after pressing enter, import will be started

How to create an invisible batch file running on Windows OS


To create an invisible batch file, I mean if you don’t want to see the terminal window then it could be achieved by writing basic VBScript file.
There are two easy ways to call it by clicking on it or defining it as a Scheduled task on Windows OS.

First create a VBScript file and name the extension –> VBScriptfile.vbs

runBatchInvisible.vbs

Set WshShell = CreateObject(“WScript.Shell”)
WshShell.Run chr(34) & “C:\batchfiles\invisibleBatch.bat” & Chr(34), 0
Set WshShell = Nothing

And save this script under the folder name C:\batchfiles\runBatchInvisible.vbs
Create a batch file named invisibleBatch.bat under the folder C:\batchfiles\invisibleBatch.bat

@ECHO OFF

ECHO INVISIBLE BATCH FILE WORKS >> LOG.TXT
DIR C:\WINDOWS  >> LOG.TXT
PAUSE

After clicking on runBatchInvisible.vbs file you can see the output of the batch file inside LOG.TXT

sample output;

INVISIBLE BATCH FILE WORKS
 Volume in drive C has no label.
 Volume Serial Number is

..

Directory of C:\WINDOWS

16.05.2011  19:49    <DIR>          .
16.05.2011  19:49    <DIR>          ..
06.05.2011  13:57    <DIR>          ….

  455 File(s)     41.581.527 bytes
              52 Dir(s)  87.602.921.472 bytes free

Download Program