Showing posts with label cmd commands. Show all posts
Showing posts with label cmd commands. Show all posts

January 17, 2019

How to get the process id associated with process running on a specific port number

How to get the process id associated with process running on a specific port number

To get the process id use

netstat -ao | find "8080"



you will get a out put like this

  TCP    0.0.0.0:8080           Regional Manager-PC:0             LISTENING       2316


If you want to write the following out put to file 

append   >> c:\consumerfed.text to the above command



March 30, 2016

To get system details through a bat file

How to get all system details to text file

Last week i was informed by I T section kozhikode  +bithesh soubhagya  to develop a software to track the hardware and software details of old working system in kozhikode region to create a hardware register.


Here i am writing a code that can generate a text file with all needed system information. This can be used for diagnosis system issues. To find the serial number and model number of the system, the user details, the software details, medium access control address, ip configuration details, system information, routing table details, product details etc ... If you are looking for a tutorial about commands in operating system , just follow the link given below.

just copy and the paste the following code to a text file then save the file with an extension .bat

BAT FILE CREATION



MKDIR D:\ITDiagnosis
if not exist D:\ITDiagnosis\diagnosis.txt dir > D:\ITDiagnosis\diagnosis.txt
echo cfed tool run on %date% >> D:\ITDiagnosis\diagnosis.txt
wmic bios get serialnumber >> D:\ITDiagnosis\diagnosis.txt
wmic computersystem get model >> D:\ITDiagnosis\diagnosis.txt
echo checking units network issue >> D:\ITDiagnosis\diagnosis.txt
echo ===================== >> D:\ITDiagnosis\diagnosis.txt
net view >> D:\ITDiagnosis\diagnosis.txt

echo checking your internet >> D:\ITDiagnosis\diagnosis.txt
echo ================>> D:\ITDiagnosis\diagnosis.txt
ping www.google.co.in >> D:\ITDiagnosis\diagnosis.txt

echo checking ro ftp connection >> D:\ITDiagnosis\diagnosis.txt
echo ===================>> D:\ITDiagnosis\diagnosis.txt
ping 117.218.68.154 >> D:\ITDiagnosis\diagnosis.txt


echo ip address details >> D:\ITDiagnosis\diagnosis.txt
echo =============>> D:\ITDiagnosis\diagnosis.txt
ipconfig /all >> D:\ITDiagnosis\diagnosis.txt

getmac >> D:\ITDiagnosis\diagnosis.txt

echo Routing table >> D:\ITDiagnosis\diagnosis.txt
echo =========>> D:\ITDiagnosis\diagnosis.txt
route print >> D:\ITDiagnosis\diagnosis.txt


echo System Informations >> D:\ITDiagnosis\diagnosis.txt
echo ===============>> D:\ITDiagnosis\diagnosis.txt
systeminfo >> D:\ITDiagnosis\diagnosis.txt

echo User details >> D:\ITDiagnosis\diagnosis.txt
echo ===============>> D:\ITDiagnosis\diagnosis.txt
net user >> D:\ITDiagnosis\diagnosis.txt
wmic useraccount list brief >> D:\ITDiagnosis\diagnosis.txt

if not exist D:\ITDiagnosis\swlist.txt dir > D:\ITDiagnosis\swlist.txt
wmic product >> D:\ITDiagnosis\swlist.txt

echo The code is written by belazy.blogspot.in   >> D:\ITDiagnosis\diagnosis.txt


writing to a file










How to create a bat file ?

you can follow this link

windows commands

Similar posts

compare two strings using command prompt



Thanks to +Shimjith Kumar

Author : +belazy


The application is developed for consumerfed kozhikode region (for  +bithesh soubhagya )


http://javabelazy.blogspot.in/

March 22, 2016

How to get the list of users in network using java

How to get the list of computer users in the network




//List of users in the network

import java.io.*;

public class NetworkUsers
    {
static String all;
     public static void main(String[] args)
         {try {
        // Execute command
       
        Process child = Runtime.getRuntime().exec("net view");
        // Get the input stream and read from it
        InputStream in = child.getInputStream();
        int c;
        while ((c = in.read()) != -1)
        {
        char e=(char)c;
        System.out.println(e);
        //process((char)c);
        }
        in.close();
        } catch (IOException e) { }     }

private static void process(char c) {
// TODO Auto-generated method stub
System.out.print(c);
   //all  =String.valueOf(c) +all;
  // System.out.println(all);
}


         }

Program explanation

Inputstream implies that the program is getting input as a stream of bytes

Similar posts


How to get system details through a bat file



http://javabelazy.blogspot.in/

October 15, 2013

Web Browsers Tips and Tricks

How to remove or hide an address bar from a web browser

cómo quitar la barra de direcciones de un navegador web

كيفية إزالة شريط العنوان من مستعرض الويب

wie Adressleiste von einem Webbrowser entfernen

como remover barra de endereços do navegador de internet

как удалить адресную строку из веб-браузера

วิธีการเอาแถบที่อยู่จากเว็บเบราว์เซอร์

如何从Web浏览器中删除地址栏

How to remove address bar from Internet Explorer web browser

  • Open run (win + r) then type " regedit " to open registry editor
  • Navigate to HKEY_LOCAL_MACHINE >> software >> policies >> Microsoft , Right click then select New >> Key to create a subkey named " Internet Explorer " under " Microsoft "
  • Right click on "Internet Explorer" then select New >> Key to create another key named " Toolbars " under " Internet Explorer "
  • Right click on " Toolbars " then select New >> Key to create another key named " Restrictions " under " Toolbars "
  • The hierarchy looks as follows HKEY_LOCAL_MACHINE >> software >> policies >> Microsoft >> Internet Explorer >> Toolbars >> Restrictions
  • On the right side you can two columns name and type. right click in the open area select New >> DWORD value create the name " NoAddressBar "
  • Right click on " NoAddressBar " then select Modify and Enter the value 1 in the Textbox and click "OK"

How to remove address bar from Google chrome web browser

  • Type "about:flag" in the address bar of google chrome and hit enter
  • Scroll down to "compact navigation" and enable it
  • Once browser restarted, click on the tab and select " hide the tool bar " from context menu

+Vipin Cp

http://javabelazy.blogspot.in/

August 13, 2012

How to compare a string with a string in notepad using command prompt

To compare a string with a string in notepad using command prompt



http://belazy.blog.com/

Facebook comments