恢复Windows默认文件资源管理器(Files设置后,恢复亲测可用)

之前使用了Files作为默认的管理器,结果不能反向设置,卸载之后也存在问题,打不开文件夹。
下面是询问开发人员所得到的注册文件。

可以选择蓝奏云盘下载UnsetFilesAsDefault.reg

或者将下面内容保存到文本文件中,并且设置后缀名为.reg,双击运行即可。

Windows Registry Editor Version 5.00

; Revert Default
[HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell]
@=-

[-HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\openinfiles]

; Revert Win+E
[-HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{52205fd8-5dfb-447d-801a-d0b52f2e83e1}]

对应Github issue回复:https://github.com/files-community/Files/issues/7210

官方文件下载地址: https://raw.githubusercontent.com/files-community/files-community.github.io/main/data/SetFilesAsDefault.zip

官方文件内容
SetFilesAsDefault.reg

Windows Registry Editor Version 5.00

; Set Default
[HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell]
@="openinfiles"

[HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\openinfiles]
@="Open In Files"

[HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\openinfiles\command]
@=hex(2):22,00,25,00,4c,00,4f,00,43,00,41,00,4c,00,41,00,50,00,50,00,44,\
  00,41,00,54,00,41,00,25,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,\
  66,00,74,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,41,00,70,00,70,\
  00,73,00,5c,00,66,00,69,00,6c,00,65,00,73,00,2e,00,65,00,78,00,65,00,22,00,\
  20,00,22,00,25,00,31,00,22,00,00,00

; Set Win+E
[HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{52205fd8-5dfb-447d-801a-d0b52f2e83e1}\shell\opennewwindow\command]
@=hex(2):22,00,25,00,4c,00,4f,00,43,00,41,00,4c,00,41,00,50,00,50,00,44,\
  00,41,00,54,00,41,00,25,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,\
  66,00,74,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,41,00,70,00,70,\
  00,73,00,5c,00,66,00,69,00,6c,00,65,00,73,00,2e,00,65,00,78,00,65,00,22,00,\
  00,00
"DelegateExecute"=""

这个和上面是一样的
UnsetFilesAsDefault.reg

Windows Registry Editor Version 5.00

; Revert Default
[HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell]
@=-

[-HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\openinfiles]

; Revert Win+E
[-HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{52205fd8-5dfb-447d-801a-d0b52f2e83e1}]

  • 19
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 21
    评论
### 回答1: 首先,您需要了解Tkinter模块的基础知识,然后使用它来构建GUI,实现模仿Windows文件资源管理器的功能。您需要使用Tkinter创建菜单栏、工具栏、文件夹树和文件内容视图,以及添加动作,例如新建、复制、粘贴等。总而言之,您需要做的是使用Tkinter创建出仿照Windows文件资源管理器的功能,以及添加相应的行为。 ### 回答2: 使用Python的Tkinter模块开发一个仿制的Windows文件资源管理器是可行的。以下是一个简单实现的示例: ```python import os import tkinter as tk from tkinter import messagebox, filedialog root = tk.Tk() root.title("文件资源管理器") root.geometry("800x600") frame = tk.Frame(root) frame.pack(pady=20) # 显示当前目录路径 current_dir_label = tk.Label(frame, text="") current_dir_label.pack() # 显示当前目录下的文件文件夹 file_listbox = tk.Listbox(frame, width=100) file_listbox.pack(pady=10) # 刷新显示当前目录下的文件文件夹 def refresh_file_listbox(): current_dir = os.getcwd() current_dir_label.config(text="当前目录:" + current_dir) file_listbox.delete(0, tk.END) for file in os.listdir(current_dir): file_listbox.insert(tk.END, file) refresh_file_listbox() # 打开文件夹 def open_folder(): folder_selected = filedialog.askdirectory() if folder_selected: os.chdir(folder_selected) refresh_file_listbox() open_folder_button = tk.Button(root, text="打开文件夹", command=open_folder) open_folder_button.pack(pady=10) # 打开文件 def open_file(): selected_file = file_listbox.get(file_listbox.curselection()) if os.path.isfile(selected_file): os.startfile(selected_file) else: messagebox.showinfo("错误", "请选择一个文件!") open_file_button = tk.Button(root, text="打开文件", command=open_file) open_file_button.pack(pady=10) root.mainloop() ``` 此示例使用Tkinter模块创建了一个简单的文件资源管理器界面。通过打开文件夹按钮,使用`filedialog`模块选择指定文件夹作为当前目录,然后通过`os`模块中的相关函数获取并显示当前目录下的文件文件夹。用户可以选择打开文件夹或文件。需要注意的是,此示例仅是一个基本的框架,可以根据具体需求进行扩展和改进。 ### 回答3: 使用Python的tkinter模块可以创建一个类似于Windows文件资源管理器的应用程序。下面是一个简单的示例,其中包含一个文件资源管理器窗口、一个显示文件目录的列表框以及一些常见的操作按钮(例如打开、复制、粘贴、删除等): ```python import os import shutil import tkinter as tk from tkinter import filedialog, messagebox # 定义文件资源管理器类 class FileExplorer(tk.Tk): def __init__(self): super().__init__() self.title("文件资源管理器") self.geometry("500x300") # 创建文件目录列表框 self.listbox = tk.Listbox(self) self.listbox.pack(fill=tk.BOTH, expand=True) # 添加按钮 open_button = tk.Button(self, text="打开", command=self.open_file) open_button.pack(side=tk.LEFT) copy_button = tk.Button(self, text="复制", command=self.copy_file) copy_button.pack(side=tk.LEFT) paste_button = tk.Button(self, text="粘贴", command=self.paste_file) paste_button.pack(side=tk.LEFT) delete_button = tk.Button(self, text="删除", command=self.delete_file) delete_button.pack(side=tk.LEFT) # 显示文件目录 self.show_directory() # 打开文件 def open_file(self): file_path = filedialog.askopenfilename() if file_path: os.startfile(file_path) # 复制文件 def copy_file(self): file_path = self.listbox.get(self.listbox.curselection()) if file_path: self.clipboard = file_path # 粘贴文件 def paste_file(self): if hasattr(self, 'clipboard'): destination = os.getcwd() shutil.copy(self.clipboard, destination) self.show_directory() messagebox.showinfo("提示", "粘贴成功!") # 删除文件 def delete_file(self): file_path = self.listbox.get(self.listbox.curselection()) if file_path: os.remove(file_path) self.show_directory() messagebox.showinfo("提示", "删除成功!") # 显示文件目录 def show_directory(self): self.listbox.delete(0, tk.END) files = os.listdir(os.getcwd()) for file in files: self.listbox.insert(tk.END, file) # 实例化并运行文件资源管理器 file_explorer = FileExplorer() file_explorer.mainloop() ``` 这个示例程序创建了一个简单的文件资源管理器窗口。你可以在该窗口中浏览文件目录,打开文件、复制文件、粘贴文件以及删除文件。请确保在运行程序时,已安装好Python以及相应的tkinter模块。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 21
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值