Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Add Linux boot option with bcdedit:
- 1. bcdedit /create /d "Linux" /application BOOTSECTOR
- 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.
- 3. bcdedit /set {Linux-ID} device partition=C:
- bcdedit /set {Linux-ID} path \boot-loader.bin
- bcdedit /displayorder {FreeBSD_ID} /addlast
- *Note: Get the BOOTSECTOR file from Linux using something like 'dd if=/dev/sda3 of=/mnt/share/linux.bin bs=512 count=1'.
- Add non default open option for given file type:
- 1. Browse to: 'HKEY_CLASSES_ROOT\*\shell\'.
- 2. Create a new Key say 'your custom app'. Set default value say 'Open with your custom app'.
- 3. Optionally set a String 'icon' with the icon e.g. "C:\\Windows\\notepad.exe,0".
- 4. Add String 'AppliesTo' with the extension e.g. '.nfo'.
- 5. Add a sub Key 'command'. Set default string to the application. e.g. 'C:\\Windows\\notepad.exe \"%1\"'.
- 6. If you want to apply that command to more than one extension for 'AppliesTo' use: 'System.FileName:\"*.nfo\" OR System.FileName:\"*.log\"'.
- REG file:
- Windows Registry Editor Version 5.00
- [HKEY_CLASSES_ROOT\*\shell\your custom app]
- @="Open with your custom app"
- "icon"="C:\\Windows\\notepad.exe,0"
- "AppliesTo"=".nfo"
- [HKEY_CLASSES_ROOT\*\shell\your custom app\command]
- @="C:\\Windows\\notepad.exe \"%1\""
- Add or edit file association:
- 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.
- 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.
- 3. Create another new key using the same name you picked in the previous step. Skip this too, if the key exists already.
- 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.
- 5. Right click the new key and create a subkey DefaultIcon.
- 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).
- 7. Create another new key next to DefaultIcon and call it shell.
- 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.
- 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.
- 10. Set the default value of the shell key to the name of the verb key you wish to be default.
- Edit 'Open with...' list for a file type:
- 1. Browse to the following key:
- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ Explorer\FileExts\
- 2. Here you'll see a list of all the file extensions that are registered on your computer.
- 3. Browse to the file extension you wish to edit, click the white triangle beside it to see the subfolders, and select OpenWithList.
- Enable Administrator Account During Installation:
- 1. During the installation, after being prompted to configure the new
- user account, you will be able to set the new account's password.
- 2. At that phase, press SHIFT and F10 keys together. A Command Prompt
- window will appear.
- 3. In the Command Prompt window, type:
- net user
- * Note how the Administrator account is there, yet the new user account
- has not been yet created.
- 4. To set the Administrator's account password:
- net user administrator *
- 5. Then enter the required password and confirm it.
- 6. To enable the Administrator's account:
- net user administrator /active:yes
- 7. Close the Command Prompt window and continue with the installation
- process.
- 8. If you log off you will now see the Administrator's account as a
- valid logon option.
- Fix 'This copy of Windows is not genuine':
- 1. Uninstall update KB971033.
- 2. Execute: C:\Windows\SysWOW64\slmgr.vbs /rearm
- Generating File Hash:
- CertUtil -hashfile [file] [Hash Algorithm]
- * Hash Algorithms: MD2 MD4 MD5 SHA1 SHA256 SHA384 SHA512
- Hide an Account:
- 1. Execute:
- regedit
- 2. In regedit go to 'HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\Winlogon'.
- 3. In the left panel, right click on 'Winlogon' and click 'New' and click
- 'Key'.
- 4. Type 'SpecialAccounts' and press 'Enter'.
- 5. In the left panel, right click on 'SpecialAccounts' and click 'New' and
- click 'Key'.
- 6. Type 'UserList' and press 'Enter'.
- 7. In right panel of 'UserList', right click on a empty area and click 'New'
- then click 'DWORD (32bit) Value'.
- 8. Type in the name of the user account that you want to hide and press
- 'Enter'.
- 9. In the right panel, right click on the user account name and click
- 'Modify'.
- 10. To hide the user account type '0' and click OK.
- 11. Whenever you want to use the account just unhide the it by typing '1' instead of zero.
- Install .MSU updates from command line:
- wusa.exe /norestart /quiet c:\path\to\update.msu
- * Note:
- 1. /norestart: Prevent system restart (ignored if used with '/quiet').
- 2. /quiet: quiet mode without user interaction.
- Make Perl scripts act like normal programs in Windows:
- * Note: Actions below require administrative privileges. For steps utilizing
- the command prompt it must be launched via "Run as administrator" on Windows
- Vista/7.
- 1. Associate *.pl files with perl. Run the following commands at a shell
- prompt:
- assoc .pl=PerlScript
- ftype PerlScript=C:\bin\perl.exe "%1" %*
- * Replace 'C:\Perl\bin\perl.exe' with the path to your Perl installation.
- This enables you to run myscript.pl instead of perl myscript.pl.
- 2. Add .PL to your PATHEXT environment variable. This makes Windows consider
- *.pl files to be executable when searching your PATH. It enables you to run
- myscript instead of myscript.pl. Execute:
- set PATHEXT=%PATHEXT%;.PL
- 3. To set it permanently (under Windows Vista or Windows 7)
- setx PATHEXT %PATHEXT%;.PL
- Require Username & Password for UAC:
- 1. Run 'gpedit.msc'.
- 2. Open 'Computer Configuration > Administrative Templates > Windows
- Components > Credential User Interface'.
- 3. Change the setting for "Enumerate administrator accounts on
- elevation" to "disabled".
- 4. Run 'secpol.msc'.
- 5. Open 'Local Policies > Security Options'.
- 6. Disabled the setting "User Account Control: Allow UIAccess applications
- to prompt for elevation without using the secure desktop".
- * This hides accounts but allows UAC to access them through the Secure
- Desktop.
- Resetting NTFS files security and permission in Windows:
- 1. Run "cmd" as Administrator.
- * Note: In MS Windows 8 and above, press the Win+X keys, then choose "Command
- Prompt (Admin)".
- 2. Go to the desired drive or folder.
- 3. To reset all the files permissions, type:
- icacls * /T /Q /C /RESET
- * Note:
- a. The above is irreversible. Make sure you backup the permissions before
- you proceed!
- b. It is possible that "icacls" might fail. For that try to take ownership
- of the files first. Just before step 3, execute:
- takeown /R /F *
Add Comment
Please, Sign In to add comment