Jump to content
Sign in to follow this  
Belini

Mudar a resolução e outras configurações do desktop..

Recommended Posts

Estou usando no XP eu detesto o WIN7, veja as alterações que vou fazer:

 

 

Local $sStruc = DllStructCreate("int"); desativa proteção de tela
_WinAPI_SystemParametersInfo($SPI_GETSCREENSAVEACTIVE, 0, DllStructGetPtr($sStruc), 0); desativa proteção de tela
If DllStructGetData($sStruc, 1) Then; desativa proteção de tela
    _WinAPI_SystemParametersInfo($SPI_SETSCREENSAVEACTIVE, 0, 0, $SPIF_UPDATEALL); desativa proteção de tela
EndIf
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "ScreenSaverIsSecure", "REG_SZ", "0"); desativa proteção de tela
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "ScreenSaveActive", "REG_SZ", "0"); desativa proteção de tela
$sStruc = 0; desativa proteção de tela
RegWrite("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultUserName", "REG_SZ", @UserName); auto login
RegWrite("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultPassword", "REG_SZ", ""); auto login sem senha
RegWrite("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "AutoAdminLogon", "REG_SZ", 1); auto login
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "AllowMultipleTSSessions", "REG_SZ", "0"); auto-login
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "WallpaperStyle", "REG_SZ", "2"); troca modo do papel de parede
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "Wallpaper", "REG_SZ", "C:\WINDOWS\boot_fundo.bmp"); novo papel de parede
_WinAPI_SystemParametersInfo($SPI_SETDESKWALLPAPER, 0, "C:\WINDOWS\boot_fundo.bmp", $SPIF_UPDATEALL); papel de parede
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "LegalNoticeCaption", "REG_SZ", ""); desativa mensagem logon e logof
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "LegalNoticeText", "REG_SZ", ""); desativa mensagem logon e logof
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "LogonPrompt", "REG_SZ", ""); desativa mensagem logon e logof
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server", "fAllowToGetHelp", "REG_DWORD", "0x00000000"); Desabilita assistência e área de trabalho remotas
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server", "fDenyTSConnections", "REG_DWORD", "0x00000001"); Desabilita assistência e área de trabalho remotas
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\CleanupWiz", "NoRun", "REG_DWORD", "0x00000001"); O assistente de limpeza da área do desktop
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoLowDiskSpaceChecks", "REG_DWORD", "0x00000001"); desabilita aviso de HD com pouco espaço
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting", "DoReport", "REG_DWORD", "0x00000000"); desabilita as notificações de erros do sistema
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoSharedDocuments", "REG_DWORD", "0x00000001"); desabilita a pasta de documentos compartilhados
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\DelegateFolders\{59031a47-3f72-44a7-89c5-5595fe6b30ee}"); desabilita a pasta de documentos
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore", "DisableSR", "REG_DWORD", "0x00000001"); desabilita a restauração do sistema
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "LogonType", "REG_DWORD", "0x00000000"); desabilita a tela de bem-vindo
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management", "DisablePagingExecutive", "REG_DWORD", "0x00000001"); desabilita o arquivo de paginação
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System","DisableTaskMgr", "REG_DWORD", "0x00000001"); remove o gerenciador de tarefas
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\PriorityControl","Win32PrioritySeparation", "REG_DWORD", "2"); melhora o desempenho do windows
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem","ContigFileAllocSize", "REG_DWORD", "200"); melhora o desempenho do windows
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters", "EnablePrefetcher", "REG_DWORD","0x00000001"); melhora o desempenho do windows
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer", "AlwaysUnloadDLL", "REG_DWORD", "0x00000001"); melhora o desempenho do windows
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced","DisableThumbnailCache", "REG_DWORD", "0x00000001"); melhora o desempenho do windows
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem","NtfsMftZoneReservation", "REG_DWORD", "0x00000001"); melhora o desempenho do windows
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control","WaitToKillServiceTimeout", "REG_DWORD", "1000"); melhora o desempenho do windows
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop","HungAppTimeout", "REG_DWORD", "5000"); melhora o desempenho do windows
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop","WaitToKillAppTimeout", "REG_DWORD", "1000"); melhora o desempenho do windows

 

Share this post


Link to post
Share on other sites

Beleza, eu tenho Microsoft Windows XP SP2 em uma máquina virtual (VMware) e farei testes pra ver os resultados!

 

Abraços,

 

João Carlos.

Share this post


Link to post
Share on other sites

@belini

 

queria fazer um script para troca de resoluçao rapida,o que pretendo é o seguinte, clicar no script e mudar a resolução para 640x480,32 bits,60 mhz, claro que para fazer efeito terei que reiniciar,sera que tem algum comando para fazer isso no autoit?

 

usando arquivo .reg tem como fazer mas quando clico nele ele pede para confirmar , e isso não pode acontecer, tenho que clicar e reiniciar para funcionar

Share this post


Link to post
Share on other sites

:blink: Tá pedindo por favor?

...Tive a impressão que tinha lido a palavra... :bonk:

 

Pode usar um script feito pelo MrYonG:

 

 

;SCRIPT STARTS HERE
;~ ;AUTOR: ................................................ MrYonG
;~ ;..............................................................
;~ ;I WANT TO SAVE THE CURRENT SCREEN RESOLUTION  FREQUENCY HERE
;~ ;..............................................................
;~ ;..............................................................
;~ ;CHANGING RESOLUTION SO SENDKEY SCRIPT WORKS
; Define screen resolution

_ChangeScreenRes(640, 480, 32, 60); muda a resolução para 640 X 480
sleep(2000)
_ChangeScreenRes(1024, 768, 32, 60); muda a resolução para 1024 X 768

Func _ChangeScreenRes($i_Width = @DesktopWidth, $i_Height = @DesktopHeight, $i_BitsPP = @DesktopDepth, $i_RefreshRate = @DesktopRefresh)
Local Const $DM_PELSWIDTH = 0x00080000
Local Const $DM_PELSHEIGHT = 0x00100000
Local Const $DM_BITSPERPEL = 0x00040000
Local Const $DM_DISPLAYFREQUENCY = 0x00400000
Local Const $CDS_TEST = 0x00000002
Local Const $CDS_UPDATEREGISTRY = 0x00000001
Local Const $DISP_CHANGE_RESTART = 1
Local Const $DISP_CHANGE_SUCCESSFUL = 0
Local Const $HWND_BROADCAST = 0xffff
Local Const $WM_DISPLAYCHANGE = 0x007E
If $i_Width = "" Or $i_Width = -1 Then $i_Width = @DesktopWidth ; default to current setting
If $i_Height = "" Or $i_Height = -1 Then $i_Height = @DesktopHeight ; default to current setting
If $i_BitsPP = "" Or $i_BitsPP = -1 Then $i_BitsPP = @DesktopDepth ; default to current setting
If $i_RefreshRate = "" Or $i_RefreshRate = -1 Then $i_RefreshRate = @DesktopRefresh ; default to current setting
Local $DEVMODE = DllStructCreate("byte[32];int[10];byte[32];int[6]")
Local $B = DllCall("user32.dll", "int", "EnumDisplaySettings", "ptr", 0, "long", 0, "ptr", DllStructGetPtr($DEVMODE))
If @error Then
$B = 0
SetError(1)
Return $B
Else
$B = $B[0]
EndIf
If $B <> 0 Then
DllStructSetData($DEVMODE, 2, BitOR($DM_PELSWIDTH, $DM_PELSHEIGHT, $DM_BITSPERPEL, $DM_DISPLAYFREQUENCY), 5)
DllStructSetData($DEVMODE, 4, $i_Width, 2)
DllStructSetData($DEVMODE, 4, $i_Height, 3)
DllStructSetData($DEVMODE, 4, $i_BitsPP, 1)
DllStructSetData($DEVMODE, 4, $i_RefreshRate, 5)
$B = DllCall("user32.dll", "int", "ChangeDisplaySettings", "ptr", DllStructGetPtr($DEVMODE), "int", $CDS_TEST)
If @error Then
$B = -1
Else
$B = $B[0]
EndIf
Select
Case $B = $DISP_CHANGE_RESTART
$DEVMODE = ""
Return 2
Case $B = $DISP_CHANGE_SUCCESSFUL
DllCall("user32.dll", "int", "ChangeDisplaySettings", "ptr", DllStructGetPtr($DEVMODE), "int", $CDS_UPDATEREGISTRY)
DllCall("user32.dll", "int", "SendMessage", "hwnd", $HWND_BROADCAST, "int", $WM_DISPLAYCHANGE, _
"int", $i_BitsPP, "int", $i_Height * 2 ^ 16 + $i_Width)
$DEVMODE = ""
Return 1
Case Else
$DEVMODE = ""
SetError(1)
Return $B
EndSelect
EndIf
EndFunc
Edited by Belini
  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×