Start EFS service command line

[ Tuesday, July 27, 2010 | 0 comments ]

Encrypting File Systems(EFS) service can be started from command line using the below command.

net start efs

Example:

C:\Users\Techblogger>net start efs
The Encrypting File System (EFS) service is starting.
The Encrypting File System (EFS) service was started successfully.

\

Open network connections from run window

[ Sunday, July 25, 2010 | 0 comments ]

Network connections window can be opened by opening propertes of 'My Network Places'.  There is also a more straightforward way to open network connections. Just run ncpa.cpl from run window.


Run window can be opened from start menu or by using the keyboard shortcut Win-R.

Run task manager command line

[ Wednesday, July 21, 2010 | 0 comments ]

We can open task manager by running the command taskmgr from command prompt.

c:\> taskmgr

Note that this command launches the task manager GUI. It does not provide task manager functionality in command prompt(CLI). In case if you are looking for some command line equivalent of task manager then tasklist is the right command for you.


C:\>tasklist

Image Name                   PID Session Name     Session#    Mem Usage
========================= ====== ================ ======== ============
System Idle Process            0 Console                 0         28 K
System                         4 Console                 0        248 K
smss.exe                    1292 Console                 0        428 K
csrss.exe                   1572 Console                 0      8,824 K
winlogon.exe                1600 Console                 0      8,672 K
services.exe                1644 Console                 0      5,300 K
lsass.exe                   1656 Console                 0      2,332 K
ibmpmsvc.exe                1840 Console                 0      1,660 K
svchost.exe                 1872 Console                 0      5,652 K
svchost.exe                 1920 Console                 0      5,460 K
svchost.exe                  292 Console                 0     33,208 K
S24EvMon.exe                 520 Console                 0     15,504 K
svchost.exe                  688 Console                 0      4,084 K
svchost.exe                  808 Console                 0      4,296 K
spoolsv.exe                 1236 Console                 0      7,432 K
TPHKSVC.exe                 1424 Console                 0      4,396 K
svchost.exe                 1476 Console                 0      3,532 K
CcmExec.exe                 1516 Console                 0     17,036 K
cvpnd.exe                   1660 Console                 0      5,532 K
tpnumlk.exe                 1956 Console                 0      2,896 K
DOZESVC.EXE                 2028 Console                 0      1,192 K
EvtEng.exe                   192 Console                 0     19,256 K
PresentationFontCache.exe    320 Console                 0      7,632 K
iPassPeriodicUpdateServic    432 Console                 0      4,620 K
iviRegMgr.exe                508 Console                 0      2,460 K
cammute.exe                  360 Console                 0      3,252 K
micmute.exe                  652 Console                 0      2,164 K
LMS.exe                      680 Console                 0      4,756 K
FrameworkService.exe         744 Console                 0     11,204 K
mcshield.exe                 932 Console                 0    174,120 K


Below are some Questiones asked by blog readers about taskmgr command.

How about some /switches to start in a particular tab?

unfortunately there's no such switch with taskmgr command..It always opens with the tab that was active when taskmgr was closed last time...


Thanks for that...How about open W7 Task Manager with "show process' for all users" active?

that's also not possible from command line as taskmgr.exe does not accept any kind of parameters. You may try tasklist.exe which is a non-gui equivalent of taskmgr.




Enable hibernation in the shutdown menu

[ Tuesday, July 20, 2010 | 0 comments ]

If you don't see the 'Hibernate' option in the shutdown menu then you can add it by enabling hibernation using the below command.

powercfg /hibernate on

Note that this should be run from elevated administrator command prompt. Otherwise you will get the error 'You do not have permission to enable or disable the Hibernate feature'.

Launch acrobat reader from Run

| 0 comments ]

We can launch acrobat reader application from Run window by executing the command acrord32.  Note that this does not work from command prompt.

Swap mouse buttons command line

| 0 comments ]

We can swap mouse buttons by editing the registry value SwapMouseButtons under the registry key HKEY_CURRENT_USER\Control Panel\Mouse. To swap mouse buttons we need to set its value to 1.
 Same thing can be done from command line using the below command.

reg add "HKEY_CURRENT_USER\Control Panel\Mouse" /v SwapMouseButtons /t REG_SZ /d 1


It requires a logoff or reboot to make the changes effective.

Shutdown Windows 7 sytem command line

[ Sunday, July 18, 2010 | 0 comments ]

We can shutdown a Windows 7 computer from command line using shutdown command. The exact command is given below.


Shutdown -s

Enable kernel debugging XP command line

| 0 comments ]

We can enable kernel debugging on a Windows XP machine by editing the boot entry in C:\boot.ini file. For this we need to add /debug switch along with com port number and baud rate. Same thing can be done from command line with the help of bootcfg, Windows in-built tool to configure system boot information.

To enable kernel debugging with com port 1 and baudrate - 115200 the command we need to run would be as follows.


 BOOTCFG /Debug ON /PORT COM1 /BAUD 115200 /ID1

ID specifies that these changes should be applied on the boot entry with the ID 1.

Find current power scheme command line

| 0 comments ]

We can find the current active power scheme info using powercfg command line utility.

C:\>powercfg /query

Field Description          Value
-----------------          -----
Name                       Maximum Performance
Numerical ID               6
Turn off monitor (AC)      Never
Turn off monitor (DC)      Never
Turn off hard disks (AC)   Never
Turn off hard disks (DC)   Never
System standby (AC)        Never
System standby (DC)        Never
System hibernates (AC)     Never
System hibernates (DC)     Never
Processor Throttle (AC)    NONE
Processor Throttle (DC)    NONE

C:\>

Change power scheme command line

| 0 comments ]

Windows OS provides a command line tool for configuring system power schemes, This tool is called powercfg.
Using this tool we can find what are the power schemes available on the system as well as switch on one of these configurations. See below to know how to use this tool.

To list the available power schemes you can run the below command.

powercfg /list

Example:

C:\>powercfg /list

Existing Power Schemes
----------------------
Power Source Optimized
Timers off (Presentation)
Maximum Battery Life
Maximum Performance
Max Battery
Minimal Power Management
Always On
Presentation
Video Playback
Portable/Laptop
Home/Office Desk

C:\>

To set active one of the power schemes we can run the below command.



powercfg /setactive powerschemename

Example: To set maximum performance scheme active we need to run the following.


c:\> powercfg /setactive "maximum performance" 
c:\>

Stop or disable server service command line

| 0 comments ]

We can stop Lanman server service from command line using the below command.

net stop lanmanserver

This stops the server service for current session, but when the system is rebooted it will start again. To not restart the service we need to disable it. We can do that from command line using the below command.

sc config lanmanserver start= diabled

Change windows wallpaper command line

[ Thursday, July 15, 2010 | 0 comments ]

To change windows desktop wallpaper what we normally do is right click on the desktop and go properties and so... But we can do the same by just running a command from command line. The command is given below.


reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d /f

For example to set the image E:\photos\image1.jpg as the wall paper we need to run the command as below.

reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d E:\photos\image1.jpg /f

Have a question on command line tips

| 3 comments ]

If you have any question for which you have not found satisfying answer in this blog please post it below in the comments box. You can expect a prompt answer from me. Thanks for visiting the blog.

Launch power point run window

[ Friday, July 2, 2010 | 0 comments ]

We can launch Microsoft Office Power point application from Run window using the command 'powerpnt'.
Just open Run from start button or by pressing Win+R key combination and then type powerpnt and press Enter. Power point application will be opened for you,

windows 7 command line switch drives

| 0 comments ]

In command prompt we can switch from one drive to another drive by just typing the drive letter name suffixed with the character ':'

For example if you are working in C: drive and if you want to switch to E: drive just type 'E:' at command prompt and press 'Enter'.

Example:

C:\Documents and Settings>E:

E:\>

If you want to switch and also move to some particular directory in the new drive then you can use 'cd' command with /D switch. For example to move to e:\dir1 from the above C: drive folder you need to run the below command.

cd /D E:\dir1
 
This will place you in E:\dir1 folder. Just doing cd without /D switch will not change the drive.

Find System locale systeminfo command

| 2 comments ]

We can find system locale using systeminfo command as shown below.


systeminfo | findstr /B /C:"System Locale" 

Example:


C:\>systeminfo | findstr /B /C:"System Locale" 
System Locale:             en-us;English (United States)