User Tools

Site Tools


dev:tricks:windows

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
dev:tricks:windows [2013/08/17 14:43] – created hackerzhoudev:tricks:windows [2020/06/06 23:32] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Tricks in Windows ======+====== Windows Tricks ====== 
 + 
 +====Disk =====
  
-===== IO ===== 
 ==== Fast create big file ==== ==== Fast create big file ====
-<sxh>+ 
 +<code>
 fsutil file createnew C:\large_file.tmp 1024000000 fsutil file createnew C:\large_file.tmp 1024000000
-</sxh>+</code>
  
 ==== Fast wipe disk securely ==== ==== Fast wipe disk securely ====
-<sxh>+ 
 +<code>
 cipher /w:<drive_letter>:\ cipher /w:<drive_letter>:\
-</sxh>+</code>
  
 ===== Activation ===== ===== Activation =====
 +
 ==== Windows 7/2008 R2 KMS Activation ==== ==== Windows 7/2008 R2 KMS Activation ====
-<sxh>+ 
 +<code>
 slmgr.vbs /skms KMS_SERVER:1688 slmgr.vbs /skms KMS_SERVER:1688
 slmgr.vbs /ipk 33PXH-7Y6KF-2VJC9-XBBR8-HVTHH slmgr.vbs /ipk 33PXH-7Y6KF-2VJC9-XBBR8-HVTHH
 # Can be found at http://technet.microsoft.com/en-us/library/ff793421.aspx # Can be found at http://technet.microsoft.com/en-us/library/ff793421.aspx
 slmgr.vbs /ato slmgr.vbs /ato
-</sxh>+</code>
  
 ==== Office 2010 KMS Activation ==== ==== Office 2010 KMS Activation ====
-<sxh>+ 
 +<code>
 cd "C:\Program Files (x86)\Microsoft Office\Office14" cd "C:\Program Files (x86)\Microsoft Office\Office14"
 cscript ospp.vbs /sethst:KMS_SERVER cscript ospp.vbs /sethst:KMS_SERVER
 cscript ospp.vbs /act cscript ospp.vbs /act
-</sxh>+</code>
  
 ===== Network ===== ===== Network =====
 +
 ==== Windows 7 Deny/Accept Ping ==== ==== Windows 7 Deny/Accept Ping ====
-<sxh>+ 
 +<code>
 Deny ping:netsh firewall set icmpsetting 8 Deny ping:netsh firewall set icmpsetting 8
 Accept ping:netsh firewall set icmpsetting 8 disable Accept ping:netsh firewall set icmpsetting 8 disable
-</sxh>+</code>
  
 ==== Set Nic MTU ==== ==== Set Nic MTU ====
-<sxh>+ 
 +<code>
 netsh interface ipv4 set subinterface "##YOUR_INTERFACE##" mtu=1436 store=persistent netsh interface ipv4 set subinterface "##YOUR_INTERFACE##" mtu=1436 store=persistent
 netsh interface ipv4 show subinterface netsh interface ipv4 show subinterface
-</sxh>+</code>
  
 ==== Telnet Server ==== ==== Telnet Server ====
-<sxh>+ 
 +<code>
 Modify port:tlntadmn config port=23 Modify port:tlntadmn config port=23
 Remove NTLM authentication:tlntadmn localhost config sec = -NTLM Remove NTLM authentication:tlntadmn localhost config sec = -NTLM
-</sxh>+</code>
  
-==== Share LAN network via WLAN on Windows 7 ==== +==== Share LAN Network via WLAN on Windows 7 ==== 
-<sxh>+ 
 +<code>
 netsh wlan set hostednetwork ssid=##YOUR_SSID## key=##YOUR_PASSWORD## mode=allow netsh wlan set hostednetwork ssid=##YOUR_SSID## key=##YOUR_PASSWORD## mode=allow
 netsh wlan start hostednetwork netsh wlan start hostednetwork
 netsh wlan stop hostednetwork netsh wlan stop hostednetwork
-</sxh>+</code> 
 + 
 +===== Office ===== 
 + 
 +==== Outlook Cannot Open Default Folder ==== 
 + 
 +<code> 
 +cd "C:\Program Files (x86)\Microsoft Office\Office14" 
 +outlook /importprf .\.prf 
 +</code> 
 + 
 +===== System ===== 
 +==== Add "Open Powershell Here" to explorer context menu ==== 
 +<file reg open_powershell_here.reg> 
 +Windows Registry Editor Version 5.00 
 + 
 +[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Open PowerShell Here\command] 
 +@=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,
 +  00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,57,00,
 +  69,00,6e,00,64,00,6f,00,77,00,73,00,50,00,6f,00,77,00,65,00,72,00,53,00,68,
 +  00,65,00,6c,00,6c,00,5c,00,76,00,31,00,2e,00,30,00,5c,00,70,00,6f,00,77,00,
 +  65,00,72,00,73,00,68,00,65,00,6c,00,6c,00,2e,00,65,00,78,00,65,00,22,00,20,
 +  00,2d,00,4e,00,6f,00,45,00,78,00,69,00,74,00,20,00,2d,00,57,00,69,00,6e,00,
 +  64,00,6f,00,77,00,53,00,74,00,79,00,6c,00,65,00,20,00,4d,00,61,00,78,00,69,
 +  00,6d,00,69,00,7a,00,65,00,64,00,20,00,2d,00,43,00,6f,00,6d,00,6d,00,61,00,
 +  6e,00,64,00,20,00,22,00,63,00,64,00,20,00,27,00,25,00,31,00,27,00,22,00,00,
 +  00 
 +</file> 
 +==== Cleanup Winsxs folder ==== 
 +<code> 
 +DISM /online /Cleanup-Image /SpSuperseded 
 +</code> 
 +==== Add a new administrator ==== 
 + 
 +<code> 
 +net user hackerzhou xxxxxx /add 
 +net localgroup administrators hackerzhou /add 
 +net user administrator /active:yes 
 +</code> 
 + 
 +==== Turn off hibernation on Windows 7 ==== 
 + 
 +<code> 
 +powercfg -h off 
 +</code> 
 + 
 +==== Remove Shortcut's Arrows ==== 
 + 
 +<file reg shortcut.reg> 
 +Windows Registry Editor Version 5.00 
 + 
 +[HKEY_CLASSES_ROOT\lnkfile] 
 +"IsShortcut"=- 
 +[HKEY_CLASSES_ROOT\Piffile] 
 +"IsShortcut"=- 
 +</file> 
 + 
 +===== Application ===== 
 +==== PuTTY configuration ==== 
 + 
 +<file reg putty.reg> 
 +Windows Registry Editor Version 5.00 
 + 
 +[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default Settings] 
 +"Compression"=dword:00000001 
 +"Font"="新宋体" 
 +"FontIsBold"=dword:00000000 
 +"FontCharSet"=dword:00000000 
 +"FontHeight"=dword:0000000c 
 +"FontVTMode"=dword:00000004 
 +"Colour0"="217,230,242" 
 +"Colour1"="217,230,242" 
 +"Colour2"="14,27,48" 
 +"Colour3"="14,27,48" 
 +"Colour4"="14,27,48" 
 +"Colour5"="217,230,242" 
 +"Colour6"="0,0,0" 
 +"Colour7"="46,46,46" 
 +"Colour8"="215,49,64" 
 +"Colour9"="223,100,112" 
 +"Colour10"="80,194,54" 
 +"Colour11"="128,202,105" 
 +"Colour12"="215,184,54" 
 +"Colour13"="223,194,105" 
 +"Colour14"="58,91,199" 
 +"Colour15"="97,127,204" 
 +"Colour16"="206,49,199" 
 +"Colour17"="216,100,207" 
 +"Colour18"="71,194,189" 
 +"Colour19"="122,202,200" 
 +"Colour20"="211,211,211" 
 +"Colour21"="255,255,255" 
 +"LineCodePage"="UTF-8" 
 +"ScrollbackLines"=dword:00004e20 
 +"RekeyTime"=dword:0000003c 
 +"CloseOnExit"=dword:00000002 
 +"WarnOnClose"=dword:00000000 
 +</file> 
 + 
 +===== Other =====
dev/tricks/windows.1376750599.txt.gz · Last modified: 2020/06/06 23:32 (external edit)