Click here to Skip to main content
11,490,543 members (32,887 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Windows batch
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
Posted 11-Mar-13 7:16am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 520
1 Andy Lanng 233
2 Sascha Lefèvre 210
3 OriginalGriff 188
4 Maciej Los 160
0 Sergey Alexandrovich Kryukov 9,713
1 OriginalGriff 8,475
2 Sascha Lefèvre 3,544
3 Maciej Los 3,106
4 Richard Deeming 2,370


Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 11 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100