简体   繁体   English

Windows-文件扩展名操作

[英]Windows - file extensions manipulations

Im trying to do 2 simple things using the command line. 我试图使用命令行做2件简单的事情。 I want to create a batch file that runs cmd commands and does the following: 我想创建一个运行cmd命令并执行以下操作的批处理文件:

a) Confirm open after download option to certain types of file (.pdf,.doc etc). a)确认对某些类型的文件(.pdf,.doc等)的下载后打开选项。

b) Always show extension option to certain types of file (.pdf,.doc etc). b)始终显示某些文件类型(.pdf,.doc等)的扩展名选项。

I can't find the way of doing it, Thank you for your help. 我找不到解决方法,谢谢您的帮助。 Ben

You can use the reg command to change these settings in the registry. 您可以使用reg命令在注册表中更改这些设置。 However, it won't take effect until the user logs out and in again. 但是,它只有在用户注销并再次登录后才会生效。

a) The Internet Explorer "Always ask before opening this type of file" options are stored under: a)Internet Explorer“始终在打开此类文件之前询问”选项存储在以下位置:

HKCU\\Software\\Microsoft\\Windows\\Shell\\AttachmentExecute\\{0002DF01-0000-0000-C000-000000000046} HKCU \\软件\\ Microsoft \\ Windows \\ Shell \\ AttachmentExecute \\ {0002DF01-0000-0000-C000-000000000046}

See http://support.microsoft.com/kb/905703 请参阅http://support.microsoft.com/kb/905703

b) I don't think you can control showing extensions for individual file types. b)我认为您无法控制显示单个文件类型的扩展名。 You can only control whether extensions for all known file types are shown or not, using: 您只能使用以下方法控制是否显示所有已知文件类型的扩展名:

HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\HideFileExt HKCU \\软件\\ Microsoft \\ Windows \\ CurrentVersion \\ Explorer \\ Advanced \\ HideFileExt

See the following stackoverflow question. 请参阅以下stackoverflow问题。 The answer happens to have an example of the reg command with this exact registry setting: Batch File: If registry key's data is equal to 答案恰好有一个具有此确切注册表设置的reg命令示例: 批处理文件:如果注册表项的数据等于

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM