Showing posts with label COMMANDS. Show all posts
Showing posts with label COMMANDS. Show all posts

Monday, June 7, 2010

on Leave a Comment

Kill Processes from the Windows Command Line



Kill Processes from the Windows Command Line

If you are familiar with linux/unix, you will be very accustomed to the ability to kill (and start) processes from the command line. Linux gives you a very rich set of command line tools that simply don’t exist on Windows by default.

Enter the Command Line Process Viewer/Killer/Suspender utility from the Beyond Logic website. This is a simple command line utility that lets you perform a number of utilities including viewing a list of processes, killing processes, and even changing the priority of a process.

Syntax:

process -k “Process ID”

process -k “Process Name”

Example usage:

> process -k “notepad.exe”


Command Line Process Viewer/Killer/Suspender for Windows NT/2000/XP V2.03
Copyright(C) 2002-2003 Craig.Peacock@beyondlogic.org
Killing PID 2304 ‘notepad.exe’

OR:

> process -k 2192

Command Line Process Viewer/Killer/Suspender for Windows NT/2000/XP V2.03
Copyright(C) 2002-2003 Craig.Peacock@beyondlogic.org
Killing PID 2192 ‘notepad.exe’
on Leave a Comment

Generate a List of Installed Drivers from the Command Line

Generate a List of Installed Drivers from the Command Line

We’ve already covered how to take a quick look at the list of installed drivers using DriverView, but what if you are on a machine that doesn’t already have that software installed? There’s a command line utility that comes bundled with Windows Vista or XP that gives you similar output.

It’s also useful if you are a command line junkie and have cygwin installed… you can just pipe the command through grep and quickly see exactly what you are looking for.

Running the command with no parameters will give you the default output:



To get verbose output you can use the /v parameter:

driverquery /v

Or to output in list or csv format instead of the default table format, you can use the /FO switch

driverquery /FO [list, table, csv]

So for instance, if you ran the following command to give you verbose information in list format:

driverquery /FO list /v

You should see output similar to this:


If you have cygwin installed you could pipe this through grep, but you should be able to pipe the output into a file, for instance like this:

driveryquery > test.txt




Always useful to know how to use the command line!
on Leave a Comment

How to automate FTP uploads from the Windows Command Line

How to automate FTP uploads from the Windows Command Line

Windows has included batch files since before it existed… batch files are really old! Old or not, I still find myself frequently creating batch files to help me automate common tasks. One common task is uploading files to a remote FTP server. Here’s the way that I got around it.

First, you will have to create a file called fileup.bat in your windows directory, or at least inside some directory included in your path. You can use the “path” command to see what the current path is.

Inside the batch file, you will want to paste the following:

@echo off
echo user MyUserName> ftpcmd.dat
echo MyPassword>> ftpcmd.dat
echo bin>> ftpcmd.dat
echo put %1>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat SERVERNAME.COM
del ftpcmd.dat

You will want to replace the MyUserName, MyPassword and SERVERNAME.COM with the correct values for your ftp server. What this batch file is doing is scripting the ftp utility using the -s option for the command line utility.

The batch file uses the “echo” command to send text to the ftp server as if you had typed it. In the middle of the file you can add extra commands, potentionally a change directory command:

echo cd /pathname/>>ftpcmd.dat

In order to call this batch file, you will call the batchfile using the fileup.bat name that we gave it, and pass in the name of a file as the parameter. You don’t have to type the .bat part of the filename to make it work, either.

Example:

> fileup FileToUpload.zip

Connected to ftp.myserver.com.
220 Microsoft FTP Service
ftp> user myusername
331 Password required for myusername.

230 User myusername logged in.
ftp> bin
200 Type set to I.
ftp> put FileToUpload.zip
200 PORT command successful.
150 Opening BINARY mode data connection for FileToUpload.zip
226 Transfer complete.
ftp: 106 bytes sent in 0.01Seconds 7.07Kbytes/sec.
ftp> quit

And that’s all there is to it. Now your file should be sitting on the remote server.
on Leave a Comment

Display a list of Started Services from the Command Line (Windows)

Display a list of Started Services from the Command Line (Windows)

To interact with the services panel from the command line, Windows provides the Net utility. From the command prompt, you can use this utility to start, stop, pause and continue services. What most people don’t realize is that you can also use this to display a list of services that are running on your computer.

Syntax:

net start

Provides this output(will vary based on your machine):

These Windows services are started:

Adobe Active File Monitor
Adobe LM Service
Application Layer Gateway Service
Ati HotKey Poller
Automatic Updates
Background Intelligent Transfer Service
Bluetooth Service
Cisco Systems, Inc. VPN Service
COM+ Event System
Computer Browser
Cryptographic Services
DCOM Server Process Launcher
DHCP Client
Distributed Link Tracking Client
DNS Client
Error Reporting Service
Event Log
FTP Publishing
Help and Support
HID Input Service
HP WMI Interface
IIS Admin
Infrared Monitor
Logical Disk Manager
Machine Debug Manager
Microsoft Search
on Leave a Comment

Lock Folder in XP using DOS


The best way to hide a folder is using the cacls commands(locking)
it is very simple
for this u shud ve folder in NTFS drive. (say e:)
once it is done open run->cmd

for locking the folder
cacls e:\(name of the folder in drive f) /d everyone

for unlocking type
cacls e:\(name of the folder in drive f) /g everyone:f

once u hav locked a folder and if anyone tries opening it a message access is denied will be displayed. u dont hav to hide a folder after doing this.
on Leave a Comment

Command Prompt Tricks Tips & Hacks



There are lot of command prompt tricks and tips which many of us don't know about.Command prompt can be very useful if you know how to use.Just go to cmd and check the following cool commands

1. systeminfo

With this command, you can retrieve the following information:

Host Name
OS Name
OS Version
OS Manufacturer
OS Configuration
OS Build Type
Registered Owner etc




2. driverquery

Get Installed Driver Information

3. ipconfig /all

information about your network connection and IP address


4. subst W: C:\windows

Map A Drive Letter to a Folder

5. tasklist

List All Tasks Running On The Computer

6.taskkill /im programnames.exe /f

to Kill A Program

There are many other also will update soon

Sunday, May 23, 2010

on Leave a Comment

Command Prompt Disabled

Use this method to enable the Command Prompt.

There are three methods: (Or download file from bottom)

Method 1: (Run method)

1. Select Run from Start menu.
2. Type the following: (better copy and paste)

REG add HKCU\Software\Policies\Microsoft\Windows\System /v DisableCMD /t REG_DWORD /d 0 /f
and press Enter.(Click OK)

Method 2: (Registry Editor method)

1. Open Registry Editor.
2. Get to this key:
HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System

3. In the right pane, double click on DisableCMD and set it's data to 0.
4. Close Registry Editor.

Method 3: (Group Policy method)

1. From Start menu, select Run. Type gpedit.msc and press Enter.
Group Policy editor opens.
2. Get to:
User Configuration > Administrative Templates > System
3. From the right pane, double click open Prevent access to the command prompt.
4. Set Disable and click OK.
5. Exit Group Policy editor.

Sometimes, due to some viruses or worms, your system may disable the Right click context menu.
That is, nothing happens when we right click on any place.

Use this steps only after removing all viruses and bugs from your computer.Otherwise, this method may not work.

Steps to resolve:
on Leave a Comment

RUN Commands (including new 1s)

Windows logo key + R

Add/Remove Programs = appwiz.cpl
Administrative Tools = control admintools
Authorization Manager= azman.msc "New"

Calculator = calc
Certificate Manager = certmgr.msc
Character Map = charmap
Check Disk Utility = chkdsk
Control Panel = control "New"
Command Prompt = cmd.exe
Component Services = dcomcnfg
Computer Management = compmgmt.msc = CompMgmtLauncher "New"

Date and Time Properties = timedate.cpl
Downloads = Downloads "New"
Device Manager = devmgmt.msc
Direct X Troubleshooter = dxdiag
Disk Cleanup Utility = cleanmgr
Defragment User Interface = dfrgui "New"
Ditilizer Calibration Tool = tabcal "New"
Disk Management = diskmgmt.msc
Disk Parmelonion Manager = diskpart
Display Properties = control desktop or desk.cpl
DPI Scaling = dpiscaling "New"
Driver Package Installer = dpinst "New"
Driver Verifier Utility = verifier or /reset
DVD Player = dvdplay "New"

Encryption File System = rekeywiz "New"
Event Viewer = eventvwr.msc

Fax Cover Sheet Editor = fxscover "New"
File Signature Verification Tool = sigverif
Folders Properties = control folders
Fonts = control fonts
Free Cell Card Game = freecell

Group Policy Editor = gpedit.msc

Internet Explorer = iexplore
Iexpress Wizard = iexpress
Internet Properties = inetcpl.cpl
IP Configuration = ipconfig.exe
iSCSI Initiator = iscsicpl "New"

Keyboard Properties = control keyboard

Libraries = explorer or Windows key + E
Local Security Settings = secpol.msc
Local Users and Groups = lusrmgr.msc
Logs You Out Of Windows = logoff

Microsoft Support Diagnostic Tool = msdt "New"
Microsoft Paint = mspaint.exe
Mouse Properties = control mouse
Mouse Properties = main.cpl
Mobility Center (only on mobile) = mblctr or Windows key + X
Network Connections = control netconnections
Network Connections = ncpa.cpl
Notepad = notepad

ODBC Data Source Administrator = odbcad32 "New"
Optional Features Manager = optionalfeatures "New"
On Screen Keyboard = osk or Windows key + U

Performance Monitor = perfmon.msc
Phone and Modem Options = telephon.cpl
Power Configuration = powercfg.cpl
Printers and Faxes = control printers
Printer Migration = PrintBrmUi "New"
Private Character Editor = eudcedit

Regional Settings = intl.cpl
Registry Editor = regedit.exe
Remote Assistance = msra "New"
Remote Desktop = mstsc
Resultant Set of Policy = rsop.msc

Scheduled Tasks = control schedtasks
Security Center = wscui.cpl
Services = services.msc
Shared Folders/MMC = fsmgmt.msc
Shuts Down Windows = shutdown
Snipping Tool = snippingtool "New"
Sounds and Audio = mmsys.cpl
Sound Recorder = soundrecorder "New"
Sound Volume = sndvol "New"
Spider Solitare Card Game = spider
SQL Client Configuration = cliconfg
Stored User Names and Passwords = credwiz "New"
Sticky Note = StikyNot "New"
System Configuration Editor = sysedit
System Configuration Utility = msconfig
System File Checker Utility = sfc
System Information = msinfo32
System Properties = sysdm.cpl or Windows key + Pause/Break

Task Manager = taskmgr
Trusted Platform Module = TpmInit "New"

Utility Manager = utilman
User Accounts = netplwiz or control userpasswords2

Windows Activation = slui "New"
Windows Backup Utility = sdclt "New"
Windows Fax and Scan = wfs "New"
Windows Firewall = firewall.cpl
Windows Firewall with Advanced Security = wf.msc "New"
Windows Image Acquisition = wiaacmgr "New"
Windows Media Player = wmplayer
Windows Magnifier = magnify
Windows Management Infrastructure = wmimgmt.msc
Windows Update App Manager = wuapp "New"
Windows Standalong Update Manager = wusa "New'
Windows System Security Tool = syskey
Windows Share Creation Wizard = shrpubw "New"
Wordpad = write
Powered by Blogger.

Blogroll

SOFTWARES

About

mix

About

TRICKS