Showing posts with label Command Prompt. Show all posts
Showing posts with label Command Prompt. Show all posts

Thursday, December 25, 2014

bench3

How To Copy Text From And Paste Into The Command Prompt

You can copy text from and paste text into the Command Prompt window. The process is a little different depending on how the QuickEdit Mode option is configured.
You configure QuickEdit Mode on the Options tab of the Command Prompt Properties window, shown in Figure 1-6. You can access this window by right-clicking the title bar
of the Command Prompt window and choosing Properties.
The QuickEdit Mode option changes the way that you can cut text from and paste text into the command line. The Insert Mode option below it works just like the Insert key of the keyboard. It allows you to insert characters into the command line when enabled, or overwrite characters in the command line when disabled.
If you want your changes to the Options tab to apply any time the Command Prompt window is open instead of applying only to the current session, right-click the title bar of the Command Prompt window, click Defaults, and then click the Options tab (if it’s not already displayed) and make your changes.
imageFigure: Options Tab of Command Prompt Properties Window
Copy from the Command Prompt Window
How you copy text from the command prompt window depends on whether QuickEdit Mode is enabled or disabled.
If QuickEdit Mode is enabled (checked): Use the mouse to select text, and then press Enter to copy the selected text.
If QuickEdit Mode is not enabled (unchecked): Right-click in the Command Prompt window and click Mark. Use the mouse to select text, and then press Enter to copy the selected text.
Both of these methods copy the text to the Clipboard. You can then paste the text into any other application, such as Notepad or Microsoft Word.
Paste Text into the Command Prompt Window You can paste any text that is on the Clipboard into the command line.
If QuickEdit Mode is enabled (checked): Right-click in the Command Prompt window and the data is pasted where you clicked. Caution: If the pasted data includes a new line from the Enter key, you’ll execute the command as soon as you paste it.
If QuickEdit Mode is not enabled (unchecked): Right-click in the Command Prompt window and click Paste.
If you copy the carriage return with the command, the carriage return will be pasted into the Command Prompt window. In other words, when you paste the command, it will execute.
Read More

Saturday, June 9, 2012

bench3

How To Use CMD When Its Blocked

CMD, which developed from the original command.com is the command interpreter for MS-DOS and is required for the majority of Microsoft's operating systems. Without command.com the computer running a Microsoft operating system would be unable to boot.

When running Windows NT, 2000, XP, or future operating systems there are two versions of the command interpreter, command.com and cmd.exe. Cmd offers additional environment variables than command.com; however, it is recommend if you are attempting to run a MS-DOS utility that you utilize the command.com. To use command.com, click Start, Run, and type command

You can use this trick to enable the command prompt "cmd.exe" when the same is blocked on your PC due to a virus attack or by some privilege. Do you know, cmd is blocked at school /library/Office or just need to nav faster it very easy to use

Method 1(if you want to do something with the CMD, do it here):

  • 1. Open a notepad
  • 2. do what ever command you want to put into CMD
  • 3. Save it as a .bat file
  • 4. launch it!
    Method 2:

Or if you want open CMD, follow these steps

  • 1.open notepad, and type cmd.exe
  • 2.save it as anyname here .bat
  • 3. click that bat file you have CMD.

Done now you cam play with CMD when it is blocked on Computer

Read More

Thursday, March 29, 2012

bench3

Different Ways Of Launching the Command Prompt In Windows 7

Command Prompt (executable name cmd.exe) is the Microsoft-supplied command-line interpreter on OS/2, Windows CE and on Windows NT-based operating systems (including Windows 2000, Windows XP, Vista, Windows 7, Windows Server 2003 and Server 2008). It is the analog of COMMAND.COM in MS-DOS and Windows 9x (where it is called MS-DOS Prompt) systems, or of the Unix shells used on Unix-like systems.

There are several ways you can launch the command prompt within Windows 7:

Click Start, type cmd in the Start Search box, and press Enter.

Choose Start, All Programs, Accessories, Command Prompt.

If Command Prompt is on the Start menu, choose Start, Command Prompt.

The command prompt opens and looks similar to the below screen shot.

Different Ways Of Launching the Command Prompt In Windows 7

Figure: The Command Prompt Window On Windows 7

Read More

Monday, January 16, 2012

bench3

Advantage Of Command Line Interface

Command Line Interface is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks. This text-only interface contrasts with the use of a mouse pointer with a graphical user interface (GUI) to click on options, or menus on a text user interface (TUI) to select options.

This method of instructing a computer to perform a given task is referred to as "entering" a command: the system waits for the user to conclude the submitting of the text command by pressing the "Enter" key (a descendant of the "carriage return" key of a typewriter keyboard).

A command-line interpreter then receives, parses, and executes the requested user command. The command-line interpreter may be run in a text terminal or in a terminal emulator window as a remote shell client such as PuTTY. Upon completion, the command usually returns output to the user in the form of text lines on the CLI. This output may be an answer if the command was a question, or otherwise a summary of the operation.

Advantage Of Command Line Interface:

Have you ever noticed in the movies when the “super hacker”—you know, the guy who can break into the ultra-secure military computer in under 30 seconds—sits down at the computer, he never touches a mouse? It’s because movie makers realize that we, as human beings, instinctively know the only way to really get anything done on a computer is by typing on a keyboard.

Advantage Of Command Line Interface2

Most computer users today are familiar with only the graphical user interface (GUI) and have been taught by vendors and pundits that the command line interface (CLI) is a terrifying thing of the past. This is unfortunate, because a good command line interface is a marvelously expressive way of communicating with a computer in much the same way the written word is for human beings. It’s been said that “graphical user interfaces make easy tasks easy, while command line interfaces make difficult tasks possible,” and this is still very true today.

Advantage Of Command Line Interface

Since Linux is modeled after the Unix family of operating systems, it shares the same rich heritage of command line tools as Unix. Unix came into prominence during the early 1980s (although it was first developed a decade earlier), before the widespread adoption of the graphical user interface and, as a result, developed an extensive command line interface instead. In fact, one of the strongest reasons early adopters of Linux chose it over, say, Windows NT was the powerful command line interface, which made the “difficult tasks possible.”

Currently Microsoft released Windows PowerShell, which combined features of traditional Unix shells with their object-oriented .NET Framework.

Advantage Of Command Line Interface

Aldo the latest versions of the Macintosh operating system are based on a variation of Unix called Darwin. On these computers, users can access a Unix-like command-line interface called Terminal found in the Applications Utilities folder.

Read More

Thursday, June 2, 2011

bench3

Does The Command Prompt In Windows Uses DOS Function

Why is this largely DOS oriented file naming convention still in place even in Windows 7. Why not go the UNIX route and avoid tree-corruption in Windows based system by copying of a file with an invalid name.

Well, i f your doubt is what stated above, then you are wrong. Its not the right or  proper terminology. 

First of all, there is no DOS in NT derived versions of Windows.   Nor is it likely that there will ever be a "next version of DOS," at least not from Microsoft.

The Windows command prompt and batch scripting language may resemble DOS but there is no actual DOS code or DOS function calls involved.

When Microsoft enabled long file names in Windows 95 it was done in such a way as to allow backward compatibility with the existing FAT based file system and, to a certain extent, command line syntax.

I would suggest that if you want to use long file names, you need to put them in quotes at the DOS prompt. i.e.- copy “C:\my long filename.txt” C:\filename.txt

Quotes are needed as the command processor would not otherwise be able to tell if a space is part of the file name or a a break preceding (or possibly following) a command line parameter.

It is possible that a future file system could eliminate the underlying 8.3 name and change the command line to assume all characters are part of a file name until a specific delimiter is found, but it seems unlikely.

Read More

Friday, December 31, 2010

bench3

Enable System Protection From Command Line

Swtiched my PC on, and found it wouldn't boot, crashing during bootup, with a brief flash of a blue-screen message. Is there a way to enable the system protection of the drive C (where the OS is instalated), from the command prompt option, that is available under the system recovery.?
My real problem is that when I start the system restore option, just after the selection of the restore selection point, when Its the time to confirm the disk to restore, it says "You must enable system restore protection on this drive"!!! and I cannot do it!!
Now, how do we activate the system protection. And how can we do it from a command line? Just its not even possible to boot in safe mode. As booting in safemode also crashes on startup.

Solution:
Put the following commands into Powershell file and add Powershell task at the end, if you use Microsoft Deployment Toolkit (MDT).

enable-computerrestore -drive "c:\"
vssadmin resize shadowstorage /on=c: /for=c: /maxsize=5%
checkpoint-computer -description "Done"

Note:
PS is PowerShell.
MDT is Microsoft Deployment Toolkit 2010.
Read More

Friday, December 24, 2010

bench3

0x8002801c How To Register OCX Files in Windows 7 And Vista

Registering MSCOMCT2.OCX (Microsoft DatePicker) (with the aim of using this control on any of your development / application) may take you to an error code 0x8002801c.
The c:\windows\sysWOW64\mscomct2.ocx module has been loaded, but the call to DllRegisterServer has failed, with the error code 0x8002801c"
Registering OCX Files In Windows 7 and Windows Vista:
Note: You need to copy the MSCOMCT2.OCX file to c:\windows\sysWOW64 not c:\windows\system32. You then can register it by running from the command prompt or run in the start menu regsvr32 c:\windows\sysWOW64\mscomct2.ocx and it should register although make sure that you run regsvr32 with administrator privileges.
Copy MSCOMCT2.OCX to the C:\windows\SysWOW64 directory. Please note that when you are using Windows 64Bit, you need to copy to SYSWOM64 Folder in Windows. And incase if you are using 32 Bit Windows, you wont find any folder like SYSWOW64. So, you need to copy the OCX file to Windows / System.

How to Register .OCX File From Command Prompt in Administrative Mode
  1. Click the Start button, then in the "Start Search" box, type CMD but DO NOT press Enter yet.
  2. In the list above, under "Programs" right-click on CMD that appears above and choose "Run as Administrator" and click "Continue".
  3. In the open window, type the following command and press Enter:
regsvr32 c:\windows\sysWOW64\mscomct2.ocx
Hope, this will help. The above method is explained to register MSCOMCT2.OCX File, you can register any OCX File using the above method. The only thing is, you need to copy the file to the SYSwow64 folder and then use the command prompt in Administration Mode and give the folloing command.
regsvr32 c:\windows\sysWOW64\filename.ocx
Note: File name can be substituded with the OCX file you need to register.
Read More

Monday, November 29, 2010

bench3

Create Service Under LocalSystem Account In Windows 7

To create windows service one must provide an username and it's password. It will cause problem if you don't want to run it as windows user, because when you create windows user for service, people can login as the user which is not good.  if there any way u want to create a service without creating a new user account. 

There is one solution that we can run the service using Arbitrary User Account. You can create and assign the service using an arbitrary user account (this account can be disabled or removed later) and then later go into services.msc and modify the assigned account that will run the service

In services.msc you can specify in the Log On tab which account or 'use Local System account' for this newly created service, this ought to do the trick.

You can also create a new service from the command prompt in Windows. The command sc create is itself enough to create the service with local system account. To do so, just run the command prompt with administration privilege and type the following line and hit enter
sc create myservice binPath="C:\to\my bin\path\app.exe"
If you know a better solution, please leave a comment in this post.  
Read More

Saturday, October 30, 2010

bench3

Enable Or Disable Run Menu From Start Menu

By default windows PC will have a run option in Start Menu. And in any case if you find it missing. Just press Windows Key + 'R' to see if run command opens. If you cant find Run command, Only two reasons are possible.
  1. You or any of your computer user have desiabled Run prompt from your start menu.
  2. A spyware or a malware attack on your computer has removed it.
Clean up your spyware or malware. Even after cleaning, if the Run command was missing from the Start Menu, then follow these steps...
  • Browse through C:\Windows\System32\
  • Open gpedit.msc
  • Go To User configuration - Adminstrative template - Start Menu And Task Bar.
  • Set “Remove Run Menu From Start Menu” To “Disabled”
 
  • Exit gpedit.msc
  • Restart your machine for the changes to take effect.
Read More

Thursday, October 28, 2010

bench3

Solve Internal Error 2738

Error 2738 is related with VBScript.DLL. when the DLL is not registered With Windows. Then you will have to face some problems.

This error indicates that the VBScript DLL is not properly registered on the Windows machine. You should be able to fix it it running the command
regsvr32 vbscript.dll
from a command prompt. Please let us know if this fixes the problem

If you dont run the command in administrator mode, you will get to come another error code..
[Window Title]
RegSvr32
[Content]
The module "vbscript.dll" was loaded but the call to DllRegisterServer failed with error code 0x80004005.
For more information about this problem, search online using the error code as a search term.
[OK]
So, make sure you right click on the command prompt icon and select "run as administrator" before you attempt to run the command: regsvr32 vbscript.dll

Try START - ALL PROGRAMS - ACCESSORIES - COMMAND PROMPT and right-click on command prompt. That should give you the option to run as admin. on Windows 7 and Windows Vista.
Read More

Thursday, August 19, 2010

bench3

Quickly Get To Commant Promt From Windows Explorer Or My Computer

If you find yourself using the Command Prompt frequently, you’ll probably benefit from the following solution. Instead of having to use the cd command to change to a given folder, you can simply open a Command Prompt window on the fly in Explorer, already rooted in the selected folder. 
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, How to back up and restore the registry in Windows -  Backing Up And Restoring Individual Registry Entries In Registry Editor
  • Open the Registry Editor.
  • Expand the branches to HKEY_CLASSES_ROOT\Directory\shell.
  • Create a new key by going to Edit – New - Key, and type cmd for the name of this new key.
  • Double-click the (default) value in the new cmd key, and type the following for its contents: Open Command &Prompt Here
  • Next, create a new key here by going to Edit – New - Key, and type command for the name of the new key.
  • Double-click the (default) value in the new command key, and type the following for its contents: cmd.exe /k "cd %1 && ver" This line launches the cmd.exe application, and then, using the /k parameter, instructs it to carry out these two commands:
        cd %1
        ver
which change the working directory to the folder that has been right clicked, and then displays the Windows version, respectively.
  • Close the Registry Editor when you’re done; the change will take effect immediately. Just right-click any folder and select Open Command Prompt Here to open a Command Prompt window at the selected folder.
A simpler and somewhat slicker solution is to use Creative Element Power Tools. Once you turn on the Open a Command Prompt in any folder option, you can right-click any folder icon or the background of any open folder window (or the desktop), and select Command Prompt to open a new Command Prompt window rooted at the selected folder. The tool supports Administrator mode (for UAC) and can also be configured to open the Windows PowerShell (covered next) or any third-party Command Prompt application.
Read More

Sunday, August 15, 2010

bench3

Using The Run Dialog Box In Windows 7 | Getting More From Run Dialog Box

Open Any Program or Document
Using the Run dialog box is handy for opening favorite applications, because it requires so few keystrokes. But you can also use the Run dialog box to open any file on the computer.
Note: If you cant find the run option in your windows 7, click on "Windows Key + R" and u will get the Windows Run dialog box. 
Also Read:
How To Use Windows Start Menu Search

The trick here is to type in the entire path of the program or document you want. For example, to open the family budget spreadsheet that’s in Haja’s Documents folder, you might type C:\Users\Haja\Documents\familybudget.xls.

Of course, you probably wouldn’t actually have to type all that, since the AutoComplete pop-up menu offers to complete each folder name as you start to type it.
Tip: Typing the path in this way is also useful for opening applications that don’t appear in the Start - All Programs menu. (If a program doesn’t appear there, you must type its entire pathname—or click Browse to hunt for its icon yourself.)
For example: some advanced Windows utilities (including the Registry Editor, an advanced diagnostic program) are accessible only through the command line. You also need to use the Run command to open some older command-line programs that don’t come with a listing in the All Programs menu.

Open a Drive Window
When you click Computer in your Start menu, you see that Windows assigns a letter of the alphabet to each disk drive attached to your machine—the hard drive, the DVD drive, the floppy drive, and so on. The floppy drive is A:, the hard drive is usually C:, and so on. (There hasn’t been a B: drive since the demise of the two-floppy computer.) By typing a drive letter followed by a colon (for example, C:) into the Run box and pressing Enter, you make a window pop open, showing what’s on that drive.

Open a Folder Window
You can also use the Run dialog box to open the window for any folder on your machine. To do so, type a backslash followed by the name of a folder.

You’ll encounter file paths when using several important Windows features. The Run dialog box described in this section is one. 
The address bar at the top of every Explorer window is another, although Microsoft has made addresses easier to read by displaying triangle separators in the address bar instead of slashes. (That is, you now see Users Haja instead of Users\Haja.)
Try not to be confused by the fact that Web addresses use forward slashes (/) instead of backslashes (\)!
Read More

Thursday, August 12, 2010

bench3

Start System Restore Using The Command Prompt

You must be logged on to Windows with a user account that is a computer administrator to complete these steps. 
To verify that you are logged on to Windows with a user account that is a computer administrator, visit the following Web site: http://www.bench3.com/2010/08/determine-whether-you-are-logged-on-to.html
If a new program has made your computer behave unpredictably, and uninstalling the new program did not help, you can try the Windows XP System Restore tool.

Important If you have not previously set a restore point in System Restore, you cannot restore your computer to a previous state. If you are not sure, or if you have not previously set a restore point, contact Support.

To start System Restore using the Command prompt, follow these steps:
  1. Restart your computer, and then press and hold F8 during the initial startup to start your computer in safe mode with a Command prompt.
  2. Use the arrow keys to select the Safe mode with a Command prompt option.
  3. If you are prompted to select an operating system, use the arrow keys to select the appropriate operating system for your computer, and then press ENTER.
  4. Log on as an administrator or with an account that has administrator credentials.
  5. At the command prompt, type %systemroot%\system32\restore\rstrui.exe, and then press ENTER.
  6. Follow the instructions that appear on the screen to restore your computer to a functional state.
Note: To start the System Restore tool using another safe mode option, visit the Microsoft Help and Support Web site and see the article "A description of the Safe Mode Boot options in Windows XP." For additional information about the Safe mode with a command prompt, click the following article number to view the article in the Microsoft Knowledge Base: 315222  ( http://support.microsoft.com/kb/315222/ ) A description of the Safe mode boot options in Windows XP
If these methods did not resolve your issue, you may want to ask someone you know for help, or you may want to contact your ISP service or network administrator for help. You can also use the Microsoft Customer Support Services Web site to find other solutions to your problem. Some services that the Microsoft Customer Support Services Web site provides include the following:
Read More

Friday, August 14, 2009

bench3

How To Shutdown Your PC Using Command Prompt | Various Shutdown Commands

How to shutdown, restart, logoff using the command prompt. Caution: Shutdown will logoff the current user. So, dont forget to save all your work before you try with shutdown command.

You can shutdown restart and do many other similar tasks using the Windows Command Prompt. This will come to use many a times if you are using batch files a lot. And would like to automate some Windows tasks.
Reach Command Prompt : 
There are many ways in which you can reach the command prompt... they are,
  • Click Start - All Programs - Accessories - Command Prompt.
  • Type CMD and enter in the run prompt.
  • Click Windows Key Along With R (run prompt) and Type cmd and enter.
  • In windows Vista and Windows 7 - Just click on start menu and type cmd and enter. Read more about How To Use Windows Start Menu Search.
Various Shutdown Commands:
1. shutdown /? This displays the help for the shutdown command.
2. shutdown -s this command will SHUTDOWN the system.
3. shutdown -r This command RESTARTs the system.
4. shutdown -a This command aborts (cancel) any shutdown process in progress including those initiated by your system administrator.

This is a quick reference to most frequently used parameters for shutdown command. 

Here is the original help information on Microsoft...

Allows you to shut down or restart a local or remote computer. Used without parameters.

Syntax :
shutdown [{-l|-s|-r|-a}] [-f] [-m [\\ComputerName]] [-t xx] [-c "message"] [-d[u][p]:xx:yy]Parameters

-l : Logs off the current user, this is also the default.
-m : ComputerName takes precedence.
-s : Shuts down the local computer.
-r : Reboots after shutdown.
-a : Aborts shutdown. Ignores other parameters, except -l and ComputerName. You can only use -a during the time-out period.
-f : Forces running applications to close.
-m [\\ComputerName] : Specifies the computer that you want to shut down.
-t xx : Sets the timer for system shutdown in xx seconds. The default is 20 seconds.
-c “message” : Specifies a message to be displayed in the Message area of the System Shutdown window. You can use a maximum of 127 characters. You must enclose the message in quotation marks.
-d [u][p]:xx:yy : Lists the reason code for the shutdown. The following table lists the different values.
Value Description
u - Indicates a user code.
p - Indicates a planned shutdown code.
xx - Specifies the major reason code (0-255).
yy - Specifies the minor reason code (0-65536).
In the command prompt type shutdown /? this brings the Help for shutdown command in windows. And If you have some doubts about command prompt feel free to post a comment.
Read More