软件更新 - 批处理文件 [英] Software Update - Batch File
本文介绍了软件更新 - 批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为了方便软件更新,我创建了一个简单的批处理文件,它使用来自预定文件夹路径的新DLL更新程序文件目录中的DLL。
示例:
复制C:\ Temp \ MyNewDLL.dll C:\Program Files \ MySoftware \ bin \>
如何使用批处理文件打包新DLL,以便用户不必先将它们移动到特定文件夹?是否可以将所有内容打包到一个用户只需双击的文件中?谢谢!
Matt
To facilitate a software update, I have created a simple batch file that is updating a DLL in the program files directory with a new DLL from a predetermined folder path.
Example:
"copy C:\Temp\MyNewDLL.dll C:\Program Files\MySoftware\bin\"
How would I go about packaging the new DLL''s with the batch file so the user does not have to move them to a specific folder first? Is it possible to package everything into one file that the user can just double click? Thanks!
Matt
推荐答案
有几种方法,我可能会注意到你在做什么是一个天使可能会害怕的地方。无论如何:
- 将更新的DLL放在一个zip文件中(你仍然需要解压缩并执行一些东西 - 这对用户来说是两步)。
- 写一个安装程序(最强大的方法,但需要你最多的工作)。
我也建议使用''xcopy''(不同的开关)而不是像你在这里做的那样复制。例如,如果用户尝试执行两次脚本会发生什么? [xcopy将解决该问题]
There are several ways, and I might note that what you are doing is a place where angels might fear to tread. At any rate:
- Put the updated DLLs in a zip file (you still will need to unpack it and execute something - this would be 2 steps for the user).
- Write an installer (the most robust method but requires the most work from you).
Also I would recommend the use of ''xcopy'' (with different switches) rather than ''copy'' as you have done here. What happens if the user tries to execute your script twice for example? [xcopy would fix that problem]
这篇关于软件更新 - 批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文