Fixing BAT file association records in Windows 7-All tortoisesvn

Source: Internet
Author: User
Tags tortoisesvn

When submitting a file using tortoisesvn, there is a bat file. If you want to open it in notepad, select the open method and open it in notepad,

In the future, double-click the BAT file and change it to notepad. The association fix mentioned on the Internet does not work at all, because even if the registry batfile and. Bat are deleted
The file association does not change, indicating that the registry project associated with the file is not under hkey_classes_root, but elsewhere.

How do you know what the problem is?
Create a new user and test whether test. bat is normal. Result: normal.
Log out and switch back to the original user.

Access the c: \ Users \ new user \ ntuser. dat file and perform the following operations [& regfile to reg file]

 
CMD/K Reg load HKLM \ 1 _ % filenames % & reg export HKLM \ 1 _ % filenames % 1 _ % filenames %. reg & reg unload HKLM \ 1 _ % filenames % &CMD/K

 

Replace % filenames %, because I use open ++, which is easy to set.

Export a reg file named 1_ntuser.dat.reg.

Open Search. bat

 

[HKEY_LOCAL_MACHINE \ 1_ntuser.dat \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ fileexts \.Bat] [HKEY_LOCAL_MACHINE \ Users ntuser.dat \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ fileexts \. BAT \ Openwithlist] [HKEY_LOCAL_MACHINE \ Users ntuser.dat \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ fileexts \. BAT \ Openwithprogids] "Batfile" = hex (0) : [HKEY_LOCAL_MACHINE \ Users ntuser.dat \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ fileexts \. TXT] [HKEY_LOCAL_MACHINE \ Users ntuser.dat \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ fileexts \. txt \ Openwithlist] "A" = "notepad1_.exe" "mrulist" = "" [HKEY_LOCAL_MACHINE \ Users ntuser.dat \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ fileexts \. txt \ Openwithprogids] "Notepad ++ _ file" = hex (0 ):

 

No. This is the user's file management Registry address. Instead of the preceding hkey_classes_root, hkey_classes_root is the Global Registry Key of the system.
The user is loaded to other places. The Registry here is useful, so if you change the user, the registry key is reloaded from ntuser. dat to the registry, and the results are different.

Now that you know where the problem is, go to the location of your registry and delete or modify the registry entry as shown above, then confirm that the file association under the system registry root is correct:

Windows Registry Editor Version 5.00[Hkey_classes_root\.Bat] @= "Batfile"[HKEY_LOCAL_MACHINE\ Software \ Classes \ batfile \Shell\ Open \Command] @= "\" % 1 \ "% *"[HKEY_LOCAL_MACHINE\ Software \ Classes \ batfile \Shell\ Edit \Command] @= Hex (2): 25, 00, 53,00, 79,00, 00, 6d, 00, 6f, 00, 6f, 25, \ 00, 5C,, 65, 00, 6d, 00, 5C, 00, 4E, 00, 4f, 00, \, 45, 00, 50, 00,, \ 00

 

In this way, the BAT file will be restored.

By the way, paste the problematic bat:

 Windows Registry Editor Version 5.00  [HKEY_CURRENT_USER  \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ fileexts \.  Bat] [HKEY_CURRENT_USER  \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ fileexts \. BAT \  openwithlist]  "A" = "notepad. EXE "" mrulist "=" cab "" B "=" depends 1.0.exe "" C "=" winrar.exe " [HKEY_CURRENT_USER  \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ fileexts \. BAT \  openwithprogids]  "batfile" = hex (0) :" audio file "= hex (0) :" bat_auto_file "= hex (0) : [HKEY_CURRENT_USER  \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ fileexts \. BAT \  userchoice]  "progid" = "applications \ cmd.exe" 

the above is a problem. Oh, userchoice is changed to cmd. No wonder it's not bat, but the Program

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.