开发者

Windows: Execute Batch File for a Custom Context Menu Item

I am looking to add a new item in a right click context menu for a certain file type. I suppose it would be easiest to run a batch file with the full path of the file as an argument. I need to rename the file, unzip it, then rezip it, then rename it. I suppose winzip command line would be appropriate tool to help with that, unless someone else has a suggestion.

My questions are:

- How can I add a custom context menu item based on file type

- How can I pass the file name as an argument to the batch file from the context menu

- Finally this may go out to 2-3 people, and it might be easier to simply have an installer that sets this up for them. Anyone know of any free installers that could do this?

Some details about why 开发者_如何学PythonI am trying to do this:

I have a tool that is zipping things correctly, the program that is reading the zip files is not unzipping to standards it seems. It unzips in winzip legacy mode or something. Rather than fix a working program/investing time or attempt to do some ultra-fancy, crazy fix on a linux server for zipping into winzip legacy format a workaround seemed appropriate for now. These processes only really occur internally, but they are still painful/annoying to do.


  • 7zip is free, you might want to use that if you need to bundle the zip utility
  • Customizing a Shortcut Menu Using Static Verbs
  • %1 in the command string in the registry is replaced with the filename
  • Inno Setup, NSIS or WiX
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜