Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Tuesday, May 7, 2024

 Re-add "New Text Document" to Windows 11 Explorer "New" context menu.

Windows Registry Editor Version 5.00
; Text Document
[-HKEY_CLASSES_ROOT\.txt\ShellNew]
[HKEY_CLASSES_ROOT\.txt\ShellNew]
"ItemName"=hex(2):40,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,6e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,2c,00,\
  2d,00,34,00,37,00,30,00,00,00
"NullFile"=""

[-HKEY_CLASSES_ROOT\.txt]
[HKEY_CLASSES_ROOT\.txt]
@="txtfile"
"Content Type"="text/plain"
"PerceivedType"="text"
[HKEY_CLASSES_ROOT\.txt\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"
[HKEY_CLASSES_ROOT\.txt\ShellNew]
"ItemName"=hex(2):40,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,6e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,2c,00,\
  2d,00,34,00,37,00,30,00,00,00
"NullFile"=""
[-HKEY_CLASSES_ROOT\SystemFileAssociations\.txt]
[HKEY_CLASSES_ROOT\SystemFileAssociations\.txt]
"PerceivedType"="document"
[-HKEY_CLASSES_ROOT\txtfile]
[HKEY_CLASSES_ROOT\txtfile]
@="Text Document"
"EditFlags"=dword:00210000
"FriendlyTypeName"=hex(2):40,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,6e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,\
  00,2c,00,2d,00,34,00,36,00,39,00,00,00
[HKEY_CLASSES_ROOT\txtfile\DefaultIcon]
@=hex(2):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,69,00,6d,00,\
  61,00,67,00,65,00,72,00,65,00,73,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,31,\
  00,30,00,32,00,00,00
[HKEY_CLASSES_ROOT\txtfile\shell\open\command]
@=hex(2):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,4e,00,4f,00,\
  54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,25,00,31,00,00,\
  00
[HKEY_CLASSES_ROOT\txtfile\shell\print\command]
@=hex(2):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,4e,00,4f,00,\
  54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,2f,00,70,00,20,\
  00,25,00,31,00,00,00
[HKEY_CLASSES_ROOT\txtfile\shell\printto\command]
@=hex(2):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,6e,00,6f,00,\
  74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,20,00,2f,00,70,00,74,\
  00,20,00,22,00,25,00,31,00,22,00,20,00,22,00,25,00,32,00,22,00,20,00,22,00,\
  25,00,33,00,22,00,20,00,22,00,25,00,34,00,22,00,00,00
[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt]
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\OpenWithList]
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\OpenWithProgids]
"txtfile"=hex(0):
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\UserChoice]
"Hash"="hyXk/CpboWw="
"ProgId"="txtfile"
[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Roaming\OpenWith\FileExts\.txt]
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Roaming\OpenWith\FileExts\.txt\UserChoice]
"Hash"="FvJcqeZpmOE="
"ProgId"="txtfile"

Tuesday, March 8, 2016

External NTP sync for Domain Controllers (refresh)

Waaaay back in 2012, I etched a note on how to sync Domain Controllers to an External NTP source.

Now, back to the future (not so near... 2013), it got *A LOT* simpler...

w32tm.exe /config /manualpeerlist:"0.#country_code#.pool.ntp.org 1.#country_code#.pool.ntp.org" /syncfromflags:manual /reliable:YES /update

And that's all, folks!

[ trackback ]

Thursday, October 25, 2012

External NTP sync for Domain Controllers

Long time, no see.

One more for the road :-)

This is to be done on the PDC emulator, usually your 1st DC.

1. Set registry values 

HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\NtpServer [STRING] = "1st.fqdn.or.ip,0x1 2nd.fqdn.or.ip,0x1"
(space separated string, with ',0x1' after each entry) 

HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\ReliableTimeSource [DWORD] = 1
(if this doesn't exist, don't create it) 

HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\LocalNTP [DWORD] = 0
(if this doesn't exist, don't create it) 

HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config\AnnounceFlags [DWORD] = 5

2. Restart w32time

net stop w32time && net start w32time

3. Resync the time service

w32tm /resync /rediscover

4. Verify sync

w32tm /query /status

[ trackback ]

Friday, August 10, 2007

Windows XP Single to MultiProcessor patch

To switch to Multiprocessor support need to modify some system files.
There are three files involved in this in your \Windows\system32 directory:
  • HAL.DLL
  • ntoskrnl.exe
  • ntkrnlpa.exe
The versions you need may be found in \Windows\ServicePackFiles\i386:
  • halmacpi.dll
  • ntkrnlmp.exe
  • ntkrpamp.exe
[ backtrack ]

Tuesday, June 13, 2006

Windows :: Disable the Shutdown Event Tracker in Windows 2003

If the event tracker is of no use to you then you can disable it. To do this, open the Group Policy Object Editor Console. Go to Start > Run…, type gpedit.msc and press OK.

Navigate to Computer Configuration > Administrative Templates > System and in the right hand pane, select the “Display Shutdown Event Tracker” setting.

Double Click this setting to open the Properties page. You are now given the option to leave it in a default state of Not Configured, set it to Always Enabled, Enabled for Servers/Workstations (Windows XP Pro) or Disabled completely.

After you make the change to the Group Policy, open the Command Prompt and run the gpupdate /force command to refresh the policy and have your settings be applied straight away. Alternatively you can just restart the machine.

When you next attempt to shutdown or restart the machine, the Shutdown event tracker will no longer be visible and the normal shutdown prompt will appear.

[ trackback ]

Windows :: Disable DNS dynamic updates

Disable DNS dynamic updates

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

By default, dynamic updates are configured on Windows Server 2003-based clients. To disable dynamic updates for all network interfaces, follow these steps:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
  3. On the Edit menu, point to New, and then click DWORD value.
  4. Type DisableDynamicUpdate, and then press ENTER two times.
  5. In Edit DWORD Value, type 1 in the Value data box, and then click OK.
  6. Quit Registry Editor.
To disable dynamic updates for a specific interface, follow these steps:

  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\interface - Note interface is the device ID of the network adaptor for the interface that you want to disable dynamic update for.
  3. On the Edit menu, point to New, and then click DWORD value.
  4. Type DisableDynamicUpdate, and then press ENTER two times.
  5. In Edit DWORD Value, type 1 in the Value data box, and then click OK.
  6. Quit Registry Editor.
[ trackback ]

Friday, June 24, 2005

DOS shell command output to %VAR%

In Linux its quite easy to get the output of a command into a variable for future use. In Windows..., well, no quite so easy.

FOR /F %%B IN ('d:\utils\date +%%Y%%m%%d-%%H%%M') DO SET DATE=%%B

The 'date' command in this examples is the Win32 GNU port of the equivalent Linux command.

For use in CMD or BAT scripts in Windows.

Thursday, February 24, 2005

Windows OpenSSH home directory

Look in your /etc/passwd file.
You should see entries that look something like this:
depriest::43363:513:DePriest, Jason R,U-:/home/depriest:/bin/b
ash

You can edit the file manually and change the '/home/' entry to be whatever you wish. For instance, if I created a directory called C:\MyDirectory and wanted that to be my home directory, the same line would now read:

depriest::43363:513:DePriest, Jason R,U-:/cygdrive/c/MyDirectory:/bin/bash

[ trackback ]

Tuesday, January 11, 2005

Change the Logon Screen Wallpaper (All Windows)

Change the Logon Screen Wallpaper (All Windows) at Registry Guide for Windows
  • [HKEY_USERS\.DEFAULT\Control Panel\Desktop]
[ trackback ]