Guest User

Untitled

a guest
Jul 21st, 2018
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.12 KB | None | 0 0
  1. Add Linux boot option with bcdedit:
  2. 1. bcdedit /create /d "Linux" /application BOOTSECTOR
  3. 2. bcdedit will return an ID for this entry (for example something like - {de50478b-bb21-11e1-837e-001d72ceba3a}) that we will call {Linux-ID} below.
  4. 3. bcdedit /set {Linux-ID} device partition=C:
  5. bcdedit /set {Linux-ID} path \boot-loader.bin
  6. bcdedit /displayorder {FreeBSD_ID} /addlast
  7. *Note: Get the BOOTSECTOR file from Linux using something like 'dd if=/dev/sda3 of=/mnt/share/linux.bin bs=512 count=1'.
  8.  
  9.  
  10. Add non default open option for given file type:
  11. 1. Browse to: 'HKEY_CLASSES_ROOT\*\shell\'.
  12. 2. Create a new Key say 'your custom app'. Set default value say 'Open with your custom app'.
  13. 3. Optionally set a String 'icon' with the icon e.g. "C:\\Windows\\notepad.exe,0".
  14. 4. Add String 'AppliesTo' with the extension e.g. '.nfo'.
  15. 5. Add a sub Key 'command'. Set default string to the application. e.g. 'C:\\Windows\\notepad.exe \"%1\"'.
  16. 6. If you want to apply that command to more than one extension for 'AppliesTo' use: 'System.FileName:\"*.nfo\" OR System.FileName:\"*.log\"'.
  17. REG file:
  18. Windows Registry Editor Version 5.00
  19.  
  20. [HKEY_CLASSES_ROOT\*\shell\your custom app]
  21. @="Open with your custom app"
  22. "icon"="C:\\Windows\\notepad.exe,0"
  23. "AppliesTo"=".nfo"
  24.  
  25. [HKEY_CLASSES_ROOT\*\shell\your custom app\command]
  26. @="C:\\Windows\\notepad.exe \"%1\""
  27.  
  28.  
  29. Add or edit file association:
  30. 1. Right click HKEY_CLASSES_ROOT and pick New, Key. Name it according to your desired file extension, e.g. .ext. If it exists already, you can skip this step.
  31. 2. Set the default value of the key you just created to some unique name that isn't used yet, e.g. MyFileType. Again, if it's set already, skip this step.
  32. 3. Create another new key using the same name you picked in the previous step. Skip this too, if the key exists already.
  33. 4. Set the default value of the new key to the name that should appear in Windows Explorer and other programs as the file type.
  34. 5. Right click the new key and create a subkey DefaultIcon.
  35. 6. Set the new key's default value to C:\Some\Path\To\Your\Icon\Ressource.ico,0 (the 0 is the index of the icon to be used; if there's only one icon in the ressource, it has to be 0).
  36. 7. Create another new key next to DefaultIcon and call it shell.
  37. 8. Now, for each verb/action you'd like to associate, create a new sub key with the desired name. Some verbs are preset and will automatically use localized names, e.g. open, edit or print.
  38. 9. For each verb create a sub key command and set its default value to the program to be run. Also make sure to include all parameters needed, adding quotes if there are spaces inside, e.g. "C:\My Path\My Program.exe" "%1". %1 will be replaced with the actual file name picked for this action.
  39. 10. Set the default value of the shell key to the name of the verb key you wish to be default.
  40.  
  41.  
  42. Edit 'Open with...' list for a file type:
  43. 1. Browse to the following key:
  44. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ Explorer\FileExts\
  45. 2. Here you'll see a list of all the file extensions that are registered on your computer.
  46. 3. Browse to the file extension you wish to edit, click the white triangle beside it to see the subfolders, and select OpenWithList.
  47.  
  48.  
  49. Enable Administrator Account During Installation:
  50. 1. During the installation, after being prompted to configure the new
  51. user account, you will be able to set the new account's password.
  52. 2. At that phase, press SHIFT and F10 keys together. A Command Prompt
  53. window will appear.
  54. 3. In the Command Prompt window, type:
  55. net user
  56. * Note how the Administrator account is there, yet the new user account
  57. has not been yet created.
  58. 4. To set the Administrator's account password:
  59. net user administrator *
  60. 5. Then enter the required password and confirm it.
  61. 6. To enable the Administrator's account:
  62. net user administrator /active:yes
  63. 7. Close the Command Prompt window and continue with the installation
  64. process.
  65. 8. If you log off you will now see the Administrator's account as a
  66. valid logon option.
  67.  
  68.  
  69. Fix 'This copy of Windows is not genuine':
  70. 1. Uninstall update KB971033.
  71. 2. Execute: C:\Windows\SysWOW64\slmgr.vbs /rearm
  72.  
  73.  
  74. Generating File Hash:
  75. CertUtil -hashfile [file] [Hash Algorithm]
  76. * Hash Algorithms: MD2 MD4 MD5 SHA1 SHA256 SHA384 SHA512
  77.  
  78.  
  79. Hide an Account:
  80. 1. Execute:
  81. regedit
  82. 2. In regedit go to 'HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\Winlogon'.
  83. 3. In the left panel, right click on 'Winlogon' and click 'New' and click
  84. 'Key'.
  85. 4. Type 'SpecialAccounts' and press 'Enter'.
  86. 5. In the left panel, right click on 'SpecialAccounts' and click 'New' and
  87. click 'Key'.
  88. 6. Type 'UserList' and press 'Enter'.
  89. 7. In right panel of 'UserList', right click on a empty area and click 'New'
  90. then click 'DWORD (32bit) Value'.
  91. 8. Type in the name of the user account that you want to hide and press
  92. 'Enter'.
  93. 9. In the right panel, right click on the user account name and click
  94. 'Modify'.
  95. 10. To hide the user account type '0' and click OK.
  96. 11. Whenever you want to use the account just unhide the it by typing '1' instead of zero.
  97.  
  98.  
  99. Install .MSU updates from command line:
  100. wusa.exe /norestart /quiet c:\path\to\update.msu
  101. * Note:
  102. 1. /norestart: Prevent system restart (ignored if used with '/quiet').
  103. 2. /quiet: quiet mode without user interaction.
  104.  
  105.  
  106. Make Perl scripts act like normal programs in Windows:
  107. * Note: Actions below require administrative privileges. For steps utilizing
  108. the command prompt it must be launched via "Run as administrator" on Windows
  109. Vista/7.
  110. 1. Associate *.pl files with perl. Run the following commands at a shell
  111. prompt:
  112. assoc .pl=PerlScript
  113. ftype PerlScript=C:\bin\perl.exe "%1" %*
  114. * Replace 'C:\Perl\bin\perl.exe' with the path to your Perl installation.
  115. This enables you to run myscript.pl instead of perl myscript.pl.
  116. 2. Add .PL to your PATHEXT environment variable. This makes Windows consider
  117. *.pl files to be executable when searching your PATH. It enables you to run
  118. myscript instead of myscript.pl. Execute:
  119. set PATHEXT=%PATHEXT%;.PL
  120. 3. To set it permanently (under Windows Vista or Windows 7)
  121. setx PATHEXT %PATHEXT%;.PL
  122.  
  123.  
  124. Require Username & Password for UAC:
  125. 1. Run 'gpedit.msc'.
  126. 2. Open 'Computer Configuration > Administrative Templates > Windows
  127. Components > Credential User Interface'.
  128. 3. Change the setting for "Enumerate administrator accounts on
  129. elevation" to "disabled".
  130. 4. Run 'secpol.msc'.
  131. 5. Open 'Local Policies > Security Options'.
  132. 6. Disabled the setting "User Account Control: Allow UIAccess applications
  133. to prompt for elevation without using the secure desktop".
  134. * This hides accounts but allows UAC to access them through the Secure
  135. Desktop.
  136.  
  137.  
  138. Resetting NTFS files security and permission in Windows:
  139. 1. Run "cmd" as Administrator.
  140. * Note: In MS Windows 8 and above, press the Win+X keys, then choose "Command
  141. Prompt (Admin)".
  142. 2. Go to the desired drive or folder.
  143. 3. To reset all the files permissions, type:
  144. icacls * /T /Q /C /RESET
  145. * Note:
  146. a. The above is irreversible. Make sure you backup the permissions before
  147. you proceed!
  148. b. It is possible that "icacls" might fail. For that try to take ownership
  149. of the files first. Just before step 3, execute:
  150. takeown /R /F *
Add Comment
Please, Sign In to add comment