quinta-feira, 22 de novembro de 2012

Valores duplicados em planilha

Fómula para detectar valores duplicados em planilha do Excel ou Calc:

=SE(CONT.SE($A$1:A1;A1)>1;"Duplicado";"Único")



terça-feira, 6 de novembro de 2012

Tabela com borda fina usando CSS


Para criar uma tabela com a borda fina coloque border-collapse: collapse; no atributo style. Conforme o exemplo abaixo:

<table style="border-collapse: collapse;" border="1">
    <tr>
      <td>exemplo</td>
      <td></td>
    </tr>
    <tr>
      <td>borda</td>
      <td>fina</td>
    </tr>
</table>

Esse código exibirá a tabela assim:

exemplo
borda fina

segunda-feira, 22 de outubro de 2012

Localização das Pastas do Windows 7

Menu Iniciar de Todos os Usuários
C:\ProgramData\Microsoft\Windows\Start Menu

Desktop de Todos os Usuários
C:\Users\Public\Desktop

Temp do Usuário
C:\Users\<USUARIO>\AppData\Local\Temp

Local dos atalhos fixos na barra de tarefas
C:\Users\<USUARIO>\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar



quarta-feira, 17 de outubro de 2012

Como personalizar menu Enviar Para no Windows 7

Para personalizar o menu Enviar Para no Windows 7 acesse a pasta %APPDATA%\Microsoft\Windows\SendTo no Windows Explorer e cole o atalho do programa que você quer que apareça no menu.

sábado, 29 de setembro de 2012

Comandos para Desligar, Reiniciar, Fazer Logoff, Bloquear, Suspender, Hibernar o Windows 7

  • Desligar: Shutdown.exe -s -t 00
  • Reiniciar: Shutdown.exe -r -t 00
  • Logoff: Shutdown.exe -l -t 00
  • Bloquear: Rundll32.exe User32.dll,LockWorkStation
  • Hibernar: Rundll32.exe PowrProf.dll,SetSuspendState
  • Suspender: rundll32.exe PowrProf.dll,SetSuspendState 0,1,0 (Só funciona se a hibernação estiver desligada)

domingo, 9 de setembro de 2012

Backup da Ativação do Windows 7

Backup da Ativação do Windows 7

1. Copy and save or backup the following activation-related files to external storage medium such as USB flash drive or portable hard disk drive:

%SystemDrive%\Windows\ServiceProfiles\NetWorkService\AppData\Roaming\Microsoft\SoftwarePlatform\Tokens.dat

and,

%SystemDrive%\Windows\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms

Note: For 64-bit (x64) OS, %SystemDrive%\Windows\SysWOW64\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms have to be backed up too.

2. Retrieve and record the product key used to install and activate the current Windows 7 or Windows Server 2008 R2.

Tip: If you can’t remember the product key used, there is plenty of product key viewers available to help.

3. Reinstall Windows 7 or Windows Server 2008 R2. When installation wizard prompts for a product key for activation, leave it blank (do not enter anything).
   
4. In the newly installed Windows operating system, stop the Software Protection Service in Services.msc or with the following command (run in elevated command prompt):

net stop sppsvc

5. Navigate to the following folder:

%SystemDrive%\Windows\System32\spp\tokens\pkeyconfig\

Note: In 64-bit (x64) operating system, also perform the action in %SystemDrive%\Windows\SysWOW64\spp\tokens\pkeyconfig\ folder.
   
6. Take ownership and give user full control permissions (alternatively add grant full control right click menu item) to pkeyconfig.xrm-ms file.
   
7. Delete the original default pkeyconfig.xrm-ms file, and replace with the backup copy.
   
8. Navigate to the following folder:

%SystemDrive%\Windows\ServiceProfiles\NetWorkService\AppData\Roaming\Microsoft\SoftwarePlatform\
   
9. Take ownership and give user full control permissions (alternatively add grant full control right click menu item) to tokens.dat file.
   
10. Delete the original default tokens.dat file, and replace with the backup copy.
   
11. Restart the Software Protection Service in Services.msc or with the following command (run in elevated command prompt):

net start sppsvc
   
12. Register the product key for Windows 7 or Windows Server 2008 R2 with the following command (run in elevated command prompt):

slmgr.vbs -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

Replace xxxxx-xxxxx-xxxxx-xxxxx-xxxxx with the actual product key.
   
13. Windows will activated instantly, off-line. To check activation status, uses of of the following commands:

    slmgr.vbs -dlv
    slmgr.vbs -dli
    slmgr.vbs -ato

Note that the ability to backup and restore old activation status in order to pre-activate or ready-activate a machine after re-installation must be on the same hardware without any hardware change, else user will need to activate online again. Besides, the product key used must be the same serial code too. The hack also does not apply to OEM branded computer which has Windows pre-activated and KMS host activated Windows system.

quarta-feira, 25 de julho de 2012

Como Limpar Historico do Internet Explorer

■Limpar Arquivos temportários da Internet:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8

■Excluir os Cookies:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2

■Excluir o Histórico de navegação:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1

■Apagar dados de formulários memorizados:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16

■Apagar senhas memorizadas:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32

■Apagar tudo:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255

■Apagar tudo junto com a opção sem Add-ons:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351

Como Limpar a Pasta Temp do Windows

SET TARGETDIR=%TEMP%
DEL /F /S /Q "%TARGETDIR%\*.*"
FOR /D %%d IN ("%TARGETDIR%\*.*") DO RD /S /Q "%%d"

quarta-feira, 11 de julho de 2012

Windows Scripting

Comando echo
@echo off - oculta os comandos.
echo. - salta uma linha.

Comando IF
if not exist nomearquivo.ext echo O arquivo nao existe!
http://www.palomatica.info/juckar/microsoft/msdos/bat/if.html


Comando FOR
http://www.palomatica.info/juckar/microsoft/msdos/bat/for.html

Manipulando o registro do Windows
REG DELETE HKEY_CURRENT_USER\Teste /f - deleta a chave Teste.
REG DELETE HKEY_CURRENT_USER\Teste /f /v valor1 - deleta o valor valor1.

Como Limpar uma Pasta
SET TARGETDIR=%TEMP%\DIRNAME
DEL /F /S /Q "%TARGETDIR%\*.*"
FOR /D %%d IN ("%TARGETDIR%\*.*") DO RD /S /Q "%%d" 

OBS: esse FOR só funciona dentro de um script.

Parâmetros
%0 - nome do script
%1 - primeiro parâmetro

Solicitando digitação do usuário.
set /p palavra=Digite uma palavra:
echo Voce digitou: %palavra%

Comandos
echo
rem
cls
xcopy - copia arquivos e árvores de pastas.
tittle - define o título da janela.

Links
http://commandwindows.com/command3.htm

sábado, 16 de junho de 2012

Como Alterar a Página Inicial Firefox

cd "C:\Documents and Settings\Administrador\Dados de aplicativos\Mozilla\Firefox\Profiles\xb1xm5dy.default"
echo user_pref("browser.startup.homepage", "http://www.google.com.br"); >> "prefs.js"

sexta-feira, 8 de junho de 2012

Implantação Microsoft Office

Como integra um service pack no Microsoft Office
Office Customization Tool (OCT) - ferramenta para personalizar a instalação.