English 中文(简体)
有可能将档案类型与立案卷联系起来,以便在双重点击时把档案作为论点发送。
原标题:Is it possible to associate a file type with a .cmd file so it sends that file as an argument when double clicked

i uff。 细微的卷宗,其中涉及一个论点,例如:

filepath_to_command_to_run %1

如果我打上手铐,则命令就会被罚款。

Is it even remotely possible to get it so that I can associate that file type with my dostuff.cmd so that if I double click a file the .cmd will get it as an argument? Right now I ve associated the file type with it, but when I double click it runs the stuff in the .cmd without getting the file as an argument.

最佳回答

右上点——> Open With -> Choose Default Program -> Browse to和选择贵重档案。 (选择检查箱,如果你想要的话,总是使用这种记录。)

现在双点击案卷将打开。

或者,你可以将其直接放在<代码>上。

问题回答

Once I have achieved the correct way of FILE ASSOCIATION using these cmd commands. this is just an example:

REG ADD "HKEY_CLASSES_ROOTApplications
otepad++.exeshellopencommand" /v @ /t REG_SZ /d ""C:\Program Files\Noteepad++\notepad++.exe" "%1"" /f
REG ADD "HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerFileExts.txt" /v "Application" /t REG_SZ /d "notepad++.exe" /f
REG ADD "HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerFileExts.txtOpenWithList" /v "g" /t REG_SZ /d "notepad++.exe" /f

assoc .txt=MyCustomType
ftype MyCustomType="C:Program FilesNoteepad++
otepad++.exe" "%1"

(最好将其列入批号档案)





相关问题
Modify Windows Command Prompt History from a Program?

Is there an API to add to the a windows command prompt history? I writing a console program and it would be handy to pop some commands into the history buffer under certain (limited) conditions.

How to send backspace using sendmessage(C#) to cmd.exe

I am trying to send keystrokes to cmd.exe that I launch from my app. In doing so, I am able to send all the keyboard characters, but if I try to send Backspace, it doesnt seem to take effect. The ...

Development Environment in Windows [closed]

What are your recommendations for setting up a development environment in Windows, especially when not using an IDE. I am attempting to familiarize myself with Windows, and I feel a bit lost. What ...

热门标签