(imported topic written by samuel7791)
Hi, I want to distribute a .exe(overwrite) to a fixed folder in c:\
Anyone has any ideas how this can be done?
Many thanks
(imported topic written by samuel7791)
Hi, I want to distribute a .exe(overwrite) to a fixed folder in c:\
Anyone has any ideas how this can be done?
Many thanks
(imported comment written by BenKus)
Hi samuel77,
This should be straightforward to do with a custom Fixlet. Here are the basic steps:
Create a new Fixlet in the console (Tools > Create New Fixlet).
Type in a description to describe the purpose of the Fixlet.
The Relevance you will create should describe the situation in which the file needs to be replaced. For instance, let’s say the old file (C:\test.tmp) is 1,000 bytes and the new one is 2,000 bytes, you might say something like:
not exists file “C:\test.tmp” whose (size of it = 2000)
This will return TRUE if the file does not exist or if its file size doesn’t match… alternately instead of file size, you might use modification date or perhaps SHA1 checksum.
The resulting action will look something like this:
// download the file from whatever server it is on (make sure you get the right port number if it is the BES Server).
download http://servername:52311/filename.ext
// delete (or rename) the existing file in the target location
delete C:\test.tmp
// copy the downloaded file to the new location
copy __Download\filename.ext C:\test.tmp
Change the filenames/locations as appropriate.
Ben
(imported comment written by samuel7791)
Thanks, I will try it out and report any problems here.
(imported comment written by samuel7791)
Hi Ben,
I tried it out with limited success. What happened was when the fixlet ran, there were some users who had the exe running. So the copy did not succeed. I was thinking of using inuse.exe from microsoft but cant think of a way to integrate this. Any help would be appreciated…
(imported comment written by BenKus)
One way to overcome this would be to avoid running the Fixlet if the application was running… You could add relevance to the Fixlet that was something like:
not exists running application “filename.exe” AND not exists file “C:\test.tmp” whose (size of it = 2000)
Ben