Mostrar mensagens com a etiqueta linha de comandos. Mostrar todas as mensagens
Mostrar mensagens com a etiqueta linha de comandos. Mostrar todas as mensagens

quarta-feira, 23 de março de 2011

Todos os atalhos do Windows....

Desmontando o Windows!!!!

Quando o caminho normal não funciona que tal testar o atalho????


Abaixo estão listados todos os atalhos que poderão ser importantes no caso de ter algum problema de acesso aos utilitários do Windows. Nesta listagem seguem algumas formas de acesso directas a aplicações internas do Windows através do comando "Run", comandos do DOS outros atalhos do Windows.


Vamos então conhecê-los:

Comandos "Run"
----------------------------------------------------------
compmgmt.msc – Computer management
devmgmt.msc – Device manager
diskmgmt.msc – Disk management
dfrg.msc – Disk defrag
eventvwr.msc – Event viewer
fsmgmt.msc – Shared folders
gpedit.msc – Group policies
lusrmgr.msc – Local users and groups
perfmon.msc – Performance monitor
rsop.msc – Resultant set of policies
secpol.msc – Local security settings
services.msc – Various Services
msconfig – System Configuration Utility
regedit – Registry Editor
msinfo32 _ System Information
sysedit _ System Edit
win.ini _ windows loading information(also system.ini)
winver _ Shows current version of windows
mailto: _ Opens default email client
command _ Opens command prompt
----------------------------------------------------------


Comandos "Run"para acesso ao painel de controlo
----------------------------------------------------------
Add/Remove Programs control -> appwiz.cpl
Date/Time Properties control -> timedate.cpl
Display Properties control -> desk.cpl
FindFast control -> findfast.cpl
Fonts Folder control -> fonts
Internet Properties control -> inetcpl.cpl
Keyboard Properties control -> main.cpl
Mouse Properties control -> main.cpl
Multimedia Properties control -> mmsys.cpl
Network Properties control -> netcpl.cpl
Password Properties control -> password.cpl
Printers Folder control -> printers
Sound Properties control -> mmsys.cpl
System Properties control -> sysdm.cpl
----------------------------------------------------------


Linha de Comandos DOS
----------------------------------------------------------
ANSI.SYS – Defines functions that change display graphics, control cursor movement, and reassign keys.
APPEND – Causes MS-DOS to look in other directories when editing a file or running a command.
ARP – Displays, adds, and removes arp information from network devices.
ASSIGN – Assign a drive letter to an alternate letter.
ASSOC – View the file associations.
AT – Schedule a time to execute commands or programs.
ATMADM – Lists connections and addresses seen by Windows ATM call manager.
ATTRIB – Display and change file attributes.
BATCH – Recovery console command that executes a series of commands in a file.
BOOTCFG – Recovery console command that allows a user to view, modify, and rebuild the boot.ini
BREAK – Enable / disable CTRL + C feature.
CACLS – View and modify file ACL’s.
CALL – Calls a batch file from another batch file.
CD – Changes directories.
CHCP – Supplement the International keyboard and character set information.
CHDIR – Changes directories.
CHKDSK – Check the hard disk drive running FAT for errors.
CHKNTFS – Check the hard disk drive running NTFS for errors.
CHOICE – Specify a listing of multiple options within a batch file.
CLS – Clears the screen.
CMD – Opens the command interpreter.
COLOR – Easily change the foreground and background color of the MS-DOS window.
COMP – Compares files.
COMPACT – Compresses and uncompress files.
CONTROL – Open control panel icons from the MS-DOS prompt.
CONVERT – Convert FAT to NTFS.
COPY – Copy one or more files to an alternate location.
CTTY – Change the computers input/output devices.
DATE – View or change the systems date.
DEBUG – Debug utility to create assembly programs to modify hardware settings.
DEFRAG – Re-arrange the hard disk drive to help with loading programs.
DEL – Deletes one or more files.
DELETE – Recovery console command that deletes a file.
DELTREE – Deletes one or more files and/or directories.
DIR – List the contents of one or more directory.
DISABLE – Recovery console command that disables Windows system services or drivers.
DISKCOMP – Compare a disk with another disk.
DISKCOPY – Copy the contents of one disk and place them on another disk.
DOSKEY – Command to view and execute commands that have been run in the past.
DOSSHELL – A GUI to help with early MS-DOS users.
DRIVPARM – Enables overwrite of original device drivers.
ECHO – Displays messages and enables and disables echo.
EDIT – View and edit files.
EDLIN – View and edit files.
EMM386 – Load extended Memory Manager.
ENABLE – Recovery console command to enable a disable service or driver.
ENDLOCAL – Stops the localization of the environment changes enabled by the setlocal command.
ERASE – Erase files from computer.
EXIT – Exit from the command interpreter.
EXPAND – Expand a M*cros*ft Windows file back to it’s original format.
EXTRACT – Extract files from the M*cros*ft Windows cabinets.
FASTHELP – Displays a listing of MS-DOS commands and information about them.
FC – Compare files.
FDISK – Utility used to create partitions on the hard disk drive.
FIND – Search for text within a file.
FINDSTR – Searches for a string of text within a file.
FIXBOOT – Writes a new boot sector.
FIXMBR – Writes a new boot record to a disk drive.
FOR – Boolean used in batch files.
FORMAT – Command to erase and prepare a disk drive.
FTP – Command to connect and operate on a FTP server.
FTYPE – Displays or modifies file types used in file extension associations.
GOTO – Moves a batch file to a specific label or location.
GRAFTABL – Show extended characters in graphics mode.
HELP – Display a listing of commands and brief explanation.
IF – Allows for batch files to perform conditional processing.
IFSHLP.SYS – 32-bit file manager.
IPCONFIG – Network command to view network adapter settings and assigned values.
KEYB – Change layout of keyboard.
LABEL – Change the label of a disk drive.
LH – Load a device driver in to high memory.
LISTSVC – Recovery console command that displays the services and drivers.
LOADFIX – Load a program above the first 64k.
LOADHIGH – Load a device driver in to high memory.
LOCK – Lock the hard disk drive.
LOGON – Recovery console command to list installations and enable administrator login.
MAP – Displays the device name of a drive.
MD – Command to create a new directory.
MEM – Display memory on system.
MKDIR – Command to create a new directory.
MODE – Modify the port or display settings.
MORE – Display one page at a time.
MOVE – Move one or more files from one directory to another directory.
MSAV – Early M*cros*ft Virus scanner.
MSD – Diagnostics utility.
MSCDEX – Utility used to load and provide access to the CD-ROM.
NBTSTAT – Displays protocol statistics and current TCP/IP connections using NBT
NET – Update, fix, or view the network or network settings
NETSH – Configure dynamic and static network information from MS-DOS.
NETSTAT – Display the TCP/IP network protocol statistics and information.
NLSFUNC – Load country specific information.
NSLOOKUP – Look up an IP address of a domain or host on a network.
PATH – View and modify the computers path location.
PATHPING – View and locate locations of network latency.
PAUSE – Command used in batch files to stop the processing of a command.
PING – Test / send information to another network computer or network device.
POPD – Changes to the directory or network path stored by the pushd command.
POWER – Conserve power with computer portables.
PRINT – Prints data to a printer port.
PROMPT – View and change the MS-DOS prompt.
PUSHD – Stores a directory or network path in memory so it can be returned to at any time.
QBASIC – Open the QBasic.
RD – Removes an empty directory.
REN – Renames a file or directory.
RENAME – Renames a file or directory.
RMDIR – Removes an empty directory.
ROUTE – View and configure windows network route tables.
RUNAS – Enables a user to execute a program on another computer.
SCANDISK – Run the scandisk utility.
SCANREG – Scan registry and recover registry from errors.
SET – Change one variable or string to another.
SETLOCAL – Enables local environments to be changed without affecting anything else.
SETVER – Change MS-DOS version to trick older MS-DOS programs.
SHARE – Installs support for file sharing and locking capabilities.
SHIFT – Changes the position of replaceable parameters in a batch program.
SHUTDOWN – Shutdown the computer from the MS-DOS prompt.
SMARTDRV – Create a disk cache in conventional memory or extended memory.
SORT – Sorts the input and displays the output to the screen.
START – Start a separate window in Windows from the MS-DOS prompt.
SUBST – Substitute a folder on your computer for another drive letter.
SWITCHES – Remove add functions from MS-DOS.
SYS – Transfer system files to disk drive.
TELNET – Telnet to another computer / device from the prompt.
TIME – View or modify the system time.
TITLE – Change the title of their MS-DOS window.
TRACERT – Visually view a network packets route across a network.
TREE – View a visual tree of the hard disk drive.
TYPE – Display the contents of a file.
UNDELETE – Undelete a file that has been deleted.
UNFORMAT – Unformat a hard disk drive.
UNLOCK – Unlock a disk drive.
VER – Display the version information.
VERIFY – Enables or disables the feature to determine if files have been written properly.
VOL – Displays the volume information about the designated drive.
XCOPY – Copy multiple files, directories, and/or drives from one location to another.
TRUENAME – When placed before a file, will display the whole directory in which it exists
TASKKILL – It allows you to kill those unneeded or locked up applications
----------------------------------------------------------


Atalhos de teclado
----------------------------------------------------------
ALT+- (ALT+hyphen) – Displays the Multiple Document Interface (MDI) child window’s System menu
ALT+ENTER – View properties for the selected item
ALT+ESC – Cycle through items in the order they were opened
ALT+F4 – Close the active item, or quit the active program
ALT+SPACEBAR – Display the System menu for the active window
ALT+TAB – Switch between open items
ALT+Underlined letter – Display the corresponding menu
BACKSPACE – View the folder one level up in My Computer or Windows Explorer
CTRL+A – Select all
CTRL+B – Bold
CTRL+C – Copy
CTRL+I – Italics
CTRL+O – Open an item
CTRL+U – Underline
CTRL+V – Paste
CTRL+X – Cut
CTRL+Z – Undo
CTRL+F4 – Close the active document
CTRL while dragging – Copy selected item
CTRL+SHIFT while dragging – Create shortcut to selected iteM
CTRL+RIGHT ARROW – Move the insertion point to the beginning of the next word
CTRL+LEFT ARROW – Move the insertion point to the beginning of the previous word
CTRL+DOWN ARROW – Move the insertion point to the beginning of the next paragraph
CTRL+UP ARROW – Move the insertion point to the beginning of the previous paragraph
SHIFT+DELETE – Delete selected item permanently without placing the item in the Recycle Bin
ESC – Cancel the current task
F1 – Displays Help
F2 – Rename selected item
F3 – Search for a file or folder
F4 – Display the Address bar list in My Computer or Windows Explorer
F5 – Refresh the active window
F6 – Cycle through screen elements in a window or on the desktop
F10 – Activate the menu bar in the active program
SHIFT+F10 – Display the shortcut menu for the selected item
CTRL+ESC – Display the Start menu
SHIFT+CTRL+ESC – Launches Task Manager
SHIFT when you insert a CD – Prevent the CD from automatically playing
WIN – Display or hide the Start menu
WIN+BREAK – Display the System Properties dialog box
WIN+D – Minimizes all Windows and shows the Desktop
WIN+E – Open Windows Explorer
WIN+F – Search for a file or folder
WIN+F+CTRL – Search for computers
WIN+L – Locks the desktop
WIN+M – Minimize or restore all windows
WIN+R – Open the Run dialog box
WIN+TAB – Switch between open items
----------------------------------------------------------



Atalhos "Windows Explorer"
----------------------------------------------------------
ALT+SPACEBAR – Display the current window’s system menu
SHIFT+F10 – Display the item’s context menu
CTRL+ESC – Display the Start menu
ALT+TAB – Switch to the window you last used
ALT+F4 – Close the current window or quit
CTRL+A – Select all items
CTRL+X – Cut selected item(s)
CTRL+C – Copy selected item(s)
CTRL+V – Paste item(s)
CTRL+Z – Undo last action
CTRL+(+) – Automatically resize the columns in the right hand pane
TAB – Move forward through options
ALT+RIGHT ARROW – Move forward to a previous view
ALT+LEFT ARROW – Move backward to a previous view
SHIFT+DELETE – Delete an item immediately
BACKSPACE – View the folder one level up
ALT+ENTER – View an item’s properties
F10 – Activate the menu bar in programs
F6 – Switch between left and right panes
F5 – Refresh window contents
F3 – Display Find application
F2 – Rename selected item
Internet Explorer Shortcuts:
Quote:CTRL+A – Select all items on the current page
CTRL+D – Add the current page to your Favorites
CTRL+E – Open the Search bar
CTRL+F – Find on this page
CTRL+H – Open the History bar
CTRL+I – Open the Favorites bar
CTRL+N – Open a new window
CTRL+O – Go to a new location
CTRL+P – Print the current page or active frame
CTRL+S – Save the current page
CTRL+W – Close current browser window
CTRL+ENTER – Adds the http://www. (url) .com
SHIFT+CLICK – Open link in new window
BACKSPACE – Go to the previous page
ALT+HOME – Go to your Home page
HOME – Move to the beginning of a document
TAB – Move forward through items on a page
END – Move to the end of a document
ESC – Stop downloading a page
F11 – Toggle full-screen view
F5 – Refresh the current page
F4 – Display list of typed addresses
F6 – Change Address bar and page focus
ALT+RIGHT ARROW – Go to the next page
SHIFT+CTRL+TAB – Move back between frames
SHIFT+F10 – Display a shortcut menu for a link
SHIFT+TAB – Move back through the items on a page
CTRL+TAB – Move forward between frames
CTRL+C – Copy selected items to the clipboard
CTRL+V – Insert contents of the clipboard
ENTER – Activate a selected link
HOME – Move to the beginning of a document
END – Move to the end of a document
F1 – Display Internet Explorer Help


Referência: Microsoft/Wiki

sábado, 19 de março de 2011

Utilitário de Linha de Comandos Netsh

Utilitário de linha de comandos Netsh

O Netsh é um utilitário de linha de comandos e de scripts para componentes de rede para computadores locais ou remotos. O utilitário Netsh pode também guardar um script de configuração num ficheiro de texto para efeitos de arquivo ou para configurar outros servidores.

O utilitário Netsh é uma shell que pode suportar múltiplos componentes através da adição de DLL do programa auxiliar do Netsh. Uma DLL do programa auxiliar do Netsh alarga a funcionalidade do Netsh fornecendo comandos adicionais para monitorizar ou configurar um componente de rede específico. Cada DLL do programa auxiliar do Netsh fornece um contexto, um grupo de comandos para um componente de rede específico. Em cada contexto, podem existir subcontextos. Por exemplo, no contexto de encaminhamento, o subcontexto ip existe para agrupar os comandos de encaminhamento IP.

As opções da linha de comandos Netsh incluem o seguinte:

* -a FicheiroAlias
Especifica que é utilizado um ficheiro alias. Um ficheiro alias contém uma lista de comandos netsh e uma versão alias para que possa utilizar a linha de comandos alias em vez do comando netsh. Pode utilizar ficheiros alias para mapear comandos que podem ser mais familiares noutras plataformas para o comando netsh apropriado.
* -c Contexto
Especifica o contexto do comando que corresponde a uma DLL do programa auxiliar instalado.
* Comando
Especifica o comando netsh a ser executado.
* -f FicheiroScript
Especifica que todos os comandos netsh no ficheiro FicheiroScript são executados.
* -r ComputadorRemoto
Especifica que os comandos netsh são executados num computador remoto especificado pelo nome ou endereço IP.

Pode abreviar comandos para a cadeia não ambígua mais pequena. Por exemplo, emitir o comando sh ip int é equivalente a emitir show ip interface. Os comandos Netsh podem ser globais ou específicos para cada contexto. Os comandos globais podem ser emitidos em qualquer contexto e são utilizados para funções do utilitário Netsh gerais. Os comandos específicos para cada contexto variam consoante o contexto. Pode registar comandos emitidos para um ficheiro de registo para criar um registo de auditoria de uma sessão do comando netsh.


A seguinte tabela lista os comandos netsh globais.

Comando

Descrição

..

Move para cima um nível de contexto.

? ou help

Mostra a linha de comandos do Help.

show version

Mostra a versão actual do Windows e do utilitário Netsh.

show netdlls

Mostra a versão actual da DDL do programa auxiliar do Netsh instalada.

add helper

Adiciona uma DLL do programa auxiliar do Netsh.

delete helper

Remove uma DLL do programa auxiliar do Netsh.

show helper

Mostra a DLL do programa auxiliar do Netsh instalada.

cmd

Cria uma janela de comandos.

online

Define o modo actual como online.

offline

Define o modo actual como offline.

set mode

Define o modo actual como online ou offline.

show mode

Apresenta o modo actual.

flush

Rejeita quaisquer alterações no modo offline.

commit

Confirma alterações feitas no modo offline.

set audit-logging

Activa e desactiva a funcionalidade de registo.

show audit-logging

Mostra as definições de registo de auditorias actuais.

set loglevel

Define o nível das informações de registo.

show loglevel

Mostra o nível das informações de registo.

set machine

Configura o computador onde os comandos netsh são executados.

show machine

Mostra o computador onde os comandos netsh são executados.

exec

Executa um ficheiro de script que contém comandos netsh.

quit, bye ou exit

Sai do utilitário Netsh.

add alias

Adiciona um alias a um comando existente.

delete alias

Elimina um alias de um comando existente.

show alias

Mostra todos os alias definidos.

dump

Escreve a configuração num ficheiro de texto.

popd

Um comando de scripts que tira um contexto da pilha.

pushd

Um comando de scripts que coloca o contexto actual na pilha.


O utilitário Netsh possui os seguintes modos de comandos:

* Online
No modo online, os comandos emitidos numa linha de comandos Netsh são executados imediatamente.
* Offline
No modo offline, os comandos emitidos numa linha de comandos Netsh são acumulados e executados como um batch emitindo o comando global commit. Pode rejeitar os comandos acumulados emitindo o comando global flush.
* Script
Com a opção da linha de comandos -f ou emitindo o comando global exec na linha de comandos Netsh , todos os comandos netsh no ficheiro especificado são executados.

Para criar um script da configuração actual, utilize o comando global dump. O comando dump mostra a configuração a ser executada actualmente em termos de comandos netsh. Pode utilizar o script criado por este comando para configurar um novo servidor ou para reconfigurar o servidor existente. Se estiver a efectuar alterações extensas à configuração de um componente, recomenda-se que inicie a sessão de configuração com o comando dump, caso necessite restaurar a configuração antes das alterações serem efectuadas.


TUTORIAL

Definir endereço de IP

Abaixo está a sintaxe para configurar o endereço IP para conexão sem fio e acrescentando aos servidores DNS. Note que você pode obter o nome da sua interface de configuração do IP de comando.

>> netsh interface ip set address name="Wireless Network Connection 3" static [ip] [netmask] [gw]
>> netsh interface ip set dns "Wireless Network Connection 3" static [dns server ip]
>> netsh interface ip add dns "Wireless Network Connection 3" [dns server ip] index=2


Salvar e importar uma configuração

Exportaruma configuração

>> netsh -c interface dump > c:\location1.txt

Importar uma configuração

>> netsh -f interface dump > c:\location1.txt


Firewall do Windows

O prósimo comando mostra a sintaxe para abrir uma porta, mostrando o seu estado de firewall e desctivando-a

>> netsh firewall set portopening tcp 445 smb enable
>> netsh firewall show state
>> netsh firewall set opmode disable


Interface gráfica

Sintaxe para a interface gráfica

>> netsh diag GUI


Diagnósticos

Abaixo pode ver-se o comando para um contactar o servidor de correio electrónico para entrada e saída, desligando a conexão logo a seguir . É fácil para os clientes criar uma ligação telnet para as portas do servidor de correio electrónico.

>> netsh diag connect mail

Redefinir todas as configurações na interface do protocolo IP e enviar o resultado para um arquivo de log.

>> netsh int ipv4 reset resetlog.txt

Fonte: Microsoft