Posts Tagged ‘CMD’

EF stands for “Education First”. Founded in 1965 by entrepreneur Bertil Hult, EF is a privately-held company with 16 divisions that offer a range of educational programs from language training, educational travel, and academic degrees to cultural exchanges. With a mission to break down barriers in language, culture and geography, EF has helped people of all ages and nationalities become citizens of the world.

From Berlin to Beijing, Moscow to Mexico City, Dubai to Denver, EF operates 400 schools and offices in over 50 countries. EF’s global network includes 9,000 staff and 25,000 teachers and guides. To date, EF has helped over 15 million people to learn a new language, discover the world, or earn an academic degree.

“Education First” is more than our company name. It is our corporate passion.

EF’s mission is to break down the barriers of language, culture and geography that divide us.

The Official Website

 

About EF Bangalore

It all started with the idea that rather than outsourcing our systems development and maintenance, we could do it smarter and better ourselves – with our own people!

Just over a year and a half ago, a team of people therefore came to Bangalore, the Santa Barbara of India, interviewing hundreds and hundreds of people to find the most remarkable talent the market could offer. We started small, hiring only the best of the best, and began the journey from a very tiny temporary office.

 

As the number of highly skilled people grew, we also initiated the hunt for a bigger and more suitable workplace. After months of negotiations with landlords and architects, innumerous approval stamps, vanished construction workers and delayed furniture, we finally got everything in place and moved in to our new EF office on Cambridge Road on February 1st.

The office was built on the notion that you should feel at home, even when you are in the office; it should be a place where creativity and ideas spire, where you can feel the energy and power to achieve the impossible, and where your friends and colleagues inspire you to walk the extra mile.

We in Bangalore are very proud of our new office and would love for you to come and visit, maybe have a chai in our coffee lounge or enjoy the views from our roof terrace. And, we would of course take the opportunity to show you what we can and will achieve with technology!

Get IT right! Own IT!

Advertisements

Robocopy Command

Posted: March 25, 2011 in Bios, Commands
Tags: ,

To run the Robocopy command you need to be in any of the two Servers.

Then open the command prompt and run the below command:

robocopy “\\source servername\Parent Foldername\Foldername” “\\destination server name\Parent Foldername\Foldername” /e /r:20

 

 

Net Use Command:

 

To Add a Drive

net use (drive-name): \\Servername\Foldername :persistent

 

To Delete a Mapped Drive

net use (Drivename): /del                           or                                net use (Drivename): /delete

 

In case if you get any error while running the Net use command like : NET NOT RECOGNIZED AS A COMMAND

Then Follow the Below Steps:

Open Command Prompt> Go To “C” Drive> “Windows” Folder> “System 32″ Folder”

and then run the Net Use Command mentioned above.

Also check the below Value:

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path

I suspect it is a Reg_SZ value. It should be a Reg_Expand_SZ value

 

CHKDSK —  Creates and displays a status report for a hard disk and can correct errors on the disk if required. Used without any parameters, CHKDSK simply displays the status of the disk in the current drive. Used with parameters. CHKDSK can locate bad sectors, repair the disk and recover readable information.

To see a status report of the disk, at a command prompt, type, chkdsk and press ENTER. If errors are found, any error message will appear.

To repair errors with the disk, at the command prompt, type chkdsk /f/r and press ENTER. The parameter /f fixes errors on the disk, /r locates bad sectors and recovers readable information. If  you receive a message that chkdsk cannot run because the volume is in use by another process, this probably means that you are trying to fix errors  on the disk that you are currently using. You cannot do that but the computer can repair errors at startup, and you should schedule an autostart in the bootup.

There are several advanced Command Line tools, created and intended  for Network Administrators and advanced users, If interested, try with this command line prompts;

> Bootcfg — Use this command to configure, query or change the boot.ini file settings. Be careful about making changes here !!

>Gpresult — Use this command to test group policy and obtain general information about the operating system, the user and the computer including the build number and the service pack details, user name, domain name, profile type, security privileges, disk quota information and the last time the policy was applied.

>Recover — Use this command to recover readable information from a bad or defective disk.

> Schtasks — Use this command to schedule programs to run at a specific time or at specified intervals.

To see a complete list of available commands for Windows XP including the latest editions, check the Command Line Reference.

All mIRC Commands

Posted: June 19, 2010 in Commands, System Information
Tags:

/ Recalls the previous command entered in the current window.

/! Recalls the last command typed in any window.

/action {action text} Sends the specifed action to the active channel or query window.

/add [-apuce] {filename.ini} Loads aliases, popups, users, commands, and events.

/ame {action text} Sends the specifed action to all channels which you are currently on.

/amsg {text} Sends the specifed message to all channels which you are currently on.

/auser {level} {nick|address} Adds a user with the specified access level to the remote users

list.

/auto [on|off|nickname|address] Toggles auto-opping of a nick or address or sets it on or off

totally.

/away {away message} Sets you away leave a message explaining that you are not currently paying

attention to IRC.

/away Sets you being back.

/ban [#channel] {nickname} [type] Bans the specified nick from the curent or given channel.

/beep {number} {delay} Locally beeps ‘number’ times with ‘delay’ in between the beeps. /channel

Pops up the channel central window (only works in a channel).

/clear Clears the entire scrollback buffer of the current window.

/ctcp {nickname} {ping|finger|version|time|userinfo|clientinfo} Does the given ctcp request on

nickname.

/closemsg {nickname} Closes the query window you have open to the specified nick.

/creq [ask | auto | ignore] Sets your DCC ‘On Chat request’ settings in DCC/Options.

/dcc send {nickname} {file1} {file2} {file3} … {fileN} Sends the specified files to nick.

/dcc chat {nickname} Opens a dcc window and sends a dcc chat request to nickname.

/describe {#channel} {action text} Sends the specifed action to the specified channel window.

/dde [-r] {service} {topic} {item} [data] Allows DDE control between mIRC and other

applications.

/ddeserver [on [service name] | off] To turn on the DDE server mode, eventually with a given

service name.

/disable {#groupname} De-activates a group of commands or events.

/disconnect Forces a hard and immediate disconnect from your IRC server. Use it with care.

/dlevel {level} Changes the default user level in the remote section.

/dns {nickname | IP address | IP name} Uses your providers DNS to resolve an IP address.

/echo [nickname|#channel|status] {text} Displays the given text only to YOU on the given place

in color N.

/enable {#groupname} Activates a group of commands or events.

/events [on|off] Shows the remote events status or sets it to listening or not.

/exit Forces mIRC to closedown and exit.

/finger Does a finger on a users address.

/flood [{numberoflines} {seconds} {pausetime}] Sets a crude flood control method.

/fsend [on|off] Shows fsends status and allows you to turn dcc fast send on or off.

/fserve {nickname} {maxgets} {homedirectory} [welcome text file] Opens a fileserver.

/guser {level} {nick} [type] Adds the user to the user list with the specified level and

address type.

/help {keyword} Brings up the Basic IRC Commands section in the mIRC help file.

/ignore [on|off|nickname|address] Toggles ignoring of a nick or address or sets it on or off

totally.

/invite {nickname} {#channel} Invites another user to a channel.

/join {#channel} Makes you join the specified channel.

/kick {#channel} {nickname} Kicks nickname off a given channel.

/list [#string] [-min #] [-max #] Lists all currently available channels, evt. filtering for

parameters.

/log [on|off] Shows the logging status or sets it on or off for the current window.

/me {action text} Sends the specifed action to the active channel or query window.

/mode {#channel|nickname} [[+|-]modechars [parameters]] Sets channel or user modes.

/msg {nickname} {message} Send a private message to this user without opening a query window.

/names {#channel} Shows the nicks of all people on the given channel.

/nick {new nickname} Changes your nickname to whatever you like.

/notice {nick} {message} Send the specified notice message to the nick.

/notify [on|off|nickname] Toggles notifying you of a nick on IRC or sets it on or off totally.

/onotice [#channel] {message} Send the specified notice message to all channel ops.

/omsg [#channel] {message} Send the specified message to all ops on a channel.

/part {#channel} Makes you leave the specified channel.

/partall Makes you leave all channels you are on.

/ping {server address} Pings the given server. NOT a nickname.

/play [-c] {filename} [delay] Allows you to send text files to a window.

/pop {delay} [#channel] {nickname} Performs a randomly delayed +o on a not already opped nick.

/protect [on|off|nickname|address] Toggles protection of a nick or address or sets it on or off

totally.

/query {nickname} {message} Open a query window to this user and send them the private message.

/quit [reason] Disconnect you from IRC with the optional byebye message.

/raw {raw command} Sends any raw command you supply directly to the server. Use it with care!!

/remote [on|off] Shows the remote commands status or sets it to listening or not.

/rlevel {access level} Removes all users from the remote users list with the specified access

level.

/run {c:\path\program.exe} [parameters] Runs the specified program, evt. with parameters.

/ruser {nick[!]|address} [type] Removes the user from the remote users list.

/save {filename.ini} Saves remote sections into a specified INI file.

/say {text} Says whatever you want to the active window.

/server [server address [port] [password]] Reconnects to the previous server or a newly

specified one.

/sound [nickname|#channel] {filename.wav} {action text} Sends an action and a fitting sound.

/speak {text} Uses the external text to speech program Monologue to speak up the text.

/sreq [ask | auto | ignore] Sets your DCC ‘On Send request’ settings in DCC/Options.

/time Tells you the time on the server you use.

/timer[N] {repetitions} {interval in seconds} {command} [| {more commands}] Activates a timer.

/topic {#channel} {newtopic} Changes the topic for the specified channel.

/ulist [{|}]{level} Lists all users in the remote list with the specified access levels.

/url [-d] Opens the URL windows that allows you to surf the www parallel to IRC.

/uwho [nick] Pops up the user central with information about the specified user.

/who {#channel} Shows the nicks of all people on the given channel.

/who {*address.string*} Shows all people on IRC with a matching address.

/whois {nickname} Shows information about someone in the status window.

/whowas {nickname} Shows information about someone who -just- left IRC.

/wavplay {c:\path\sound.wav} Locally plays the specified wave file.

/write [-cidl] {filename} [text] To write the specified text to a .txt file.

Now that you know how to work with variables and form expressions, let’s look at something more advanced: selection statements used with the command line. When you want to control the flow of execution based upon conditions known only at run time, you’ll use

  • if to execute a statement when a condition is true, such as if the operating system is Windows 2000 or later. Otherwise, the statement is bypassed.
  • if not to execute a statement when a condition is false, such as if a system doesn’t have a C:\Windows directory. Otherwise, the statement is bypassed.
  • if…else to execute a statement if a condition is matched (true or false) and to otherwise execute the second statement.

Although some of the previous examples in this chapter have used conditional execution, we haven’t discussed the syntax for these statements or the associated comparison operators. If your background doesn’t include programming, you probably will be surprised by the power and flexibility of these statements.

Using If

The if statement is used for conditional branching. It can be used to route script execution through two different paths. Its basic syntax is

if condition (statement1) [else (statement2)]

Here each statement can be a single command or multiple commands chained, piped, or grouped within parentheses. The condition is any expression that returns a Boolean value of True or False when evaluated. The else clause is optional, meaning you can also use the syntax

if condition (statement)
Tip Technically, parentheses aren’t required, but using them is a good idea, especially if the condition includes an echo statement or a command with parameters. If you don’t use parentheses in these instances, everything that follows the statement on the current line will be interpreted as part of the statement, which usually results in an error.

The if statement works like this: If the condition is true, then statement1 is executed. Otherwise statement2 is executed (if it is provided). In no case will both the if and the else clauses be executed. Consider the following example:

if "%1"=="1" (echo is one) else (echo is not one)

Here if the first parameter passed to the script is 1, then “is one” is written to the output. Otherwise, “is not one” is written to the output.

The command shell expects only one statement after each condition. Typically, the statement is a single command to execute. If you want to execute multiple commands, you’ll need to use one of the command piping, chaining, or group techniques, as in this example:

if "%1"=="1" (hostname & ver & ipconfig /all) else (netstat -a)

Here all three commands between parentheses will execute if the first parameter value is 1.

Using If Not

When you want to execute a statement only if a condition is false, you can use if not. The basic syntax is

if not condition (statement1) [else (statement2)]

Here the command shell evaluates the condition. If it is false, the command shell executes the statement. Otherwise, the command doesn’t execute and the command shell proceeds to the next statement. The else clause is optional, meaning you can also use the syntax

if not condition (statement1)

Consider the following example:

if not errorlevel 0 (echo An error has occurred!) & (goto :EXIT)

Here you check for error conditions other than zero. If no error has occurred (meaning the error level is zero), the command shell continues to the next statement. Otherwise, the command shell writes “An error has occurred!” to the output and exits the script. (You’ll learn all about goto and subroutines later in the chapter.)

Using If Defined and If Not Defined

The final types of if statements you can use are if defined and if not defined. These statements are designed to help you check for the existence of variables, and their respective syntaxes are

if defined variable statement

and

if not defined variable statement

Both statements are useful in your shell scripts. In the first case, you execute a command if the specified variable exists. In the second case, you execute a command if the specified variable does not exist. Consider the following example:

if defined numServers (echo Servers: %numServers%)

Here, if the numServers variable is defined, the script writes output. Otherwise, the script continues to the next statement.

Nesting Ifs

A nested if is an if statement within an if statement. Nested ifs are very common in programming, and command-shell programming is no exception. When you nest if statements, pay attention to the following points:

  1. Use parentheses to define blocks of code and the @ symbol to designate the start of the nested if statement.
  2. Remember that an else statement always refers to the nearest if statement that is within the same block as the else statement and that is not already associated with another else statement.

Here is an example:

if "%1"=="1" (
@if "%2"=="2" (hostname & ver) else (ver)) else (hostname & ver & 
netstat -a)

The first else statement is associated with if “%2″==”2”. The final else statement is associated with if “%1″==”1”.

Making Comparisons in If Statements

Frequently, the expression used to control if statements will involve comparison operators as shown in previous examples. The most basic type of string comparison is when you compare two strings using the equality operator (=), such as

if stringA==stringB statement

Here, you are performing a literal comparison of the strings and if they are exactly identical, the command statement is executed. This syntax works for literal strings but is not ideal for scripts. Parameters and arguments may contain spaces or there may be no value at all for a variable. In this case, you may get an error if you perform literal comparisons. Instead, use double quotation marks to perform a string comparison and prevent most errors, such as

if "%varA%"=="%varB%" statement

or

if "%varA%"=="string" statement

String comparisons are always case-sensitive unless you specify otherwise with the /i switch. The /i switch tells the command shell to ignore the case in the comparison, and you can use it as follows:

if /I "%1"=="a" (echo A) else (echo is not A)

These operators are used in place of the standard equality operator, such as

if "%varA%" equ "%varB" (echo The values match!)

Group Command Sequences

Posted: June 13, 2010 in Commands, System Information
Tags: ,


When you combine multiple commands, you may need a way to group commands to prevent conflicts or to ensure that an exact order is followed. You group commands using a set of parentheses. To understand why grouping may be needed, consider the following example. Here, you want to write the host name, IP configuration, and network status to a file, so you use this statement:

hostname & ipconfig & netstat -a > current-config.log

When you examine the log file, however, you find that it contains only the network status. The reason for this is that the command line executes the commands in sequence as follows:

  1. hostname
  2. ipconfig
  3. netstat – a > current_config.log

Because the commands are executed in sequence, the system host name and IP configuration are written to the command line, and only the network status is written to the log file. To write the output of all the commands to the file, you would need to group the commands as follows:

(hostname & ipconfig & netstat -a) > current_config.log

Here, the output of all three commands is collected and then redirected to the log file. You can also use grouping with conditional success and failure. In the following example, both Command1 and Command2 must succeed for Command3 to execute:

(cd C:\working\data & xcopy n:\docs\*.*) && (hostname >
n:\runninglog.txt)


I’m sure you are familiar with the traditional way to kill or end a process in Windowsusing Task Manager.  This method is effective but not nearly as fun as killing a process in Command Prompt.  Additionally, killing processes in Command Prompt provides much more control and the ability to end multiple processes at once.

All of this is possible with the TaskKill command. First, let’s cover the basics.  You can kill a process by the process ID (PID) or by image name (EXE filename).

Open up an Administrative level Command Prompt and run tasklist to see all of the running processes:

C:\>tasklist

Image Name                     PID Session Name        Mem Usage
========================= ======== ================ ============
firefox.exe                  26356 Console             139,352 K
regedit.exe                  24244 Console               9,768 K
cmd.exe                      18664 Console               2,380 K
conhost.exe                   2528 Console               7,852 K
notepad.exe                  17364 Console               7,892 K
notepad.exe                  24696 Console              22,028 K
notepad.exe                  25304 Console               5,852 K
explorer.exe                  2864 Console              72,232 K

In the example above you can see the image name and the PID for each process. If you want to kill the firefox process run:

C:\>Taskkill /IM firefox.exe /F

or

C:\>Taskkill /PID 26356 /F

The /f flag is kills the process forcefully.  Failure to use the /F flag will result in nothing happening in some cases.  One example is whenever I want to kill the explorer.exe process I have to use the /F flag or else the process just does not terminate.

If you have multiple instances of an image open such as multiple firefox.exe processes, running the taskkill /IM firefox.exe command will kill all instances. When you specify the PID only the specific instane of firefox will be terminated.

The real power of taskkill are the filtering options that allow you to use the following variables and operators.

Variables:

  • STATUS
  • IMAGENAME
  • PID
  • SESSION
  • CPUTIME
  • MEMUSAGE
  • USERNAME
  • MODULES
  • SERVICES
  • WINDOWTITLE

Operators:

  • eq (equals)
  • ne (not equal)
  • gt (greater than)
  • lt (less than)
  • ge (greater than or equal)
  • le (less than or equal)

“*” is the wildcard.

You can use the variables and operators with the /FI filtering flag.  For example, let’s say you want to end all processes that have a window title that starts with “Internet”:

C:\>taskkill /FI “WINDOWTITLE eq Internet*” /F

How about killing all processes running under the Steve account:

C:\>taskkill /FI “USERNAME eq Ignited” /F

It is also possible to kill a process running on a remote computer with taskkill.  Just run the following to kill notepad.exe on a remote computer called IgnitedDesktop:

C:\>taskkill /S IgnitedDesktop /U RemoteAccountName /P RemoteAccountPassword /IM notepad.exe /F

To learn more about taskkill run it with the /? command just like any other Windows command.