<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">ah I see yes, but there's something
else, which I think is relevant here. I too am learning how this
stuff works, and this is based on my understanding so far, so with
that caveat aside....<br>
<br>
wpkg also keeps it's own list of what has been installed (in
%windir%\system32\wpkg.xml) so I think that if the robocopy fails
in any way, then the package will fail & not yet be marked as
installed.<br>
in this case wpkg will try to run it again next time, regardless
of the check condition encountered.<br>
and so hopefully the robocopy will work OK the second time and
everything will be fine.<br>
<br>
the install commands *are* processed in the order given, so Adam's
suggestion will work robustly for you, and presumably you could
make the check file to be <br>
foo.%version%.finished for added flexibility, in case you need to
update the files in the folder.<br>
<br>
another way of course is to just make the package run as<br>
execute="always" <br>
like the sample "time" package in the wpkg distribution, & let
robocopy just synch the folders every run, but that would depend
on your scenario as to whether that was a good idea (wasteful of
bandwidth?)<br>
<br>
enjoy :-)
<pre class="moz-signature" cols="72">--------------------------------------------------------------
Dave</pre>
On 21/08/2014 02:00, Patrick CAHILL wrote:<br>
</div>
<blockquote cite="mid:7560e61d4ad32.53f5d153@eq.edu.au" type="cite">
<div>Thanks Dave,</div>
<div>while the exit codes you provided will work fine for the
post-install check, my issue was how to check for completeness
the next time WPKG runs when a previous attempt failed part way
through.</div>
<div> </div>
<div>Since the file copy wont be rolled back, the initial
<Check> command would have to look at either all the files
or something that was guaranteed to be copied after the initial
install.</div>
<div> </div>
<div>If Adams suggestion works in that the install commands are
always processed in the given order and always one at a time,
then I should be able to use it to copy a check file and work
off that.</div>
<div> </div>
<div>I will use your exit codes however for the install/upgrade
commands as I was currently only using the 1 return.</div>
<div> </div>
<div>--<br signature="separator">
<div>thanks</div>
<div>-Pat Cahill</div>
<div><font size="1">M: Berserker Street SS</font></div>
<div><font size="1">T: Glenmore SS</font></div>
<div><font size="1">W: Berserker Street SS</font></div>
<div><font size="1">T: Glenmore SS</font></div>
<div><font size="1">F: Parkhurst SS</font></div>
</div>
<div> </div>
<div> </div>
<span>On 21/08/14, <b class="name">Dave Evans </b><a class="moz-txt-link-rfc2396E" href="mailto:dave.evans@goodness.co.uk"><dave.evans@goodness.co.uk></a>
wrote:</span>
<blockquote class="iwcQuote" style="PADDING-LEFT: 13px;
MARGIN-LEFT: 0px; BORDER-LEFT: #00f 1px solid"
cite="mid:53F4D63C.4040404@goodness.co.uk" type="cite">
<div class="mimepart text plain">you could just rely on the exit
code from Robocopy<br>
<a moz-do-not-send="true"
href="http://ss64.com/nt/robocopy-exit.html" target="l">http://ss64.com/nt/robocopy-exit.html</a><br>
<br>
if the exit code is 2 or less, then everything is fine<br>
up to 8 some odd things happened<br>
above that something went wrong<br>
(it's slightly more complicated than that)<br>
<br>
so you could write<br>
<br>
<install cmd="Source_folder Destination_folder
[files_to_copy] [options]" ><br>
<exit code="0" /><br>
<exit code="1" /><br>
<exit code="2" /><br>
</install ><br>
<br>
and that will work<br>
if it returns a code >= 3, then as Adam mentions, it will
fail the script, and then it will try again the next time<br>
if it returns a code <= 2, then the folders are
synchronised<br>
<br>
--------------------------------------------------------------<br>
Dave<br>
<br>
On 20/08/2014 10:05, Adam Thorn wrote:<br>
>One option would be to have<br>
><br>
><install cmd='robocopy SOURCE DESTINATION' /><br>
><install cmd='robocopy foo.finished DESTINATION '/><br>
><br>
>and then check for the existence of (or the size of, or
modification time of) foo.finished in the destination folder.
If the "main" robocopy in the first <install> is
interrupted, it'll resume from where it left off the next time
wpkg runs. Only after that robocopy has finished will you then
copy foo.finished, at which point you can be confident that
everything has copied.<br>
><br>
>Adam<br>
><br>
>On 20/08/2014 04:48, Patrick CAHILL wrote:<br>
>>Hi All,<br>
>>I want to make sure I am doing this in the best
possible way.<br>
>>I have a few packages that are just folder copying.<br>
>>They have either just documents or shortcuts, nothing
thats actually<br>
>>installed or must be present for the entire package to
be considered<br>
>>complete.<br>
>>I am unsure of the best WPKG Check to make sure the
entire folder<br>
>>structure has come down.<br>
>>Things I am unsure of:<br>
>>If RoboCopy doesnt copy the entire folder, I dont
think that RoboCopy or<br>
>>WPKG rolls back the failed copy and deletes those
files/folders which<br>
>>leads me to...<br>
>>I cant use Check File exists since each file is
independant of the<br>
>>others and the presence of a particular one doesnt
mean the entire<br>
>>package is there (well I could but I would have to
write a check for<br>
>>each file in the folder bleh)<br>
>>I cant use Check Folder exists because the folder
contents might not be<br>
>>completely copied.<br>
>><br>
>>Several options I have seen that might work in a Check
Execute:<br>
>>Windows command "COMP", will compare two folders but
will not recurse<br>
>>subdirectories which will make the command file more
complex.<br>
>>RoboCopy /e /l /log:, will recurse but the log file
will have to be parsed<br>
>>Does anyone know of the best way to do this?<br>
>>-- <br>
>>thanks<br>
>>-Pat Cahill<br>
>>M: Berserker Street SS<br>
>>T: Glenmore SS<br>
>>W: Berserker Street SS<br>
>>T: Glenmore SS<br>
>>F: Parkhurst SS<br>
>><br>
>><br>
>>-------------------------------------------------------------------------
<br>
>>SSLrack gives free SSL certificates for open source
projects (and cheap for everyone else)!<br>
>><a moz-do-not-send="true"
href="http://www.sslrack.com/promo/free-ssl-certificates-open-source-projects"
target="l">http://www.sslrack.com/promo/free-ssl-certificates-open-source-projects</a><br>
>><br>
>>-------------------------------------------------------------------------
<br>
>>wpkg-users mailing list archives >> <a
moz-do-not-send="true"
href="http://lists.wpkg.org/pipermail/wpkg-users/"
target="l">http://lists.wpkg.org/pipermail/wpkg-users/</a><br>
>>_______________________________________________<br>
>>wpkg-users mailing list<br>
>><a class="moz-txt-link-abbreviated" href="mailto:wpkg-users@lists.wpkg.org">wpkg-users@lists.wpkg.org</a><br>
>><a moz-do-not-send="true"
href="http://lists.wpkg.org/mailman/listinfo/wpkg-users"
target="l">http://lists.wpkg.org/mailman/listinfo/wpkg-users</a><br>
>><br>
><br>
>-------------------------------------------------------------------------<br>
>SSLrack gives free SSL certificates for open source
projects (and cheap for everyone else)!<br>
><a moz-do-not-send="true"
href="http://www.sslrack.com/promo/free-ssl-certificates-open-source-projects"
target="l">http://www.sslrack.com/promo/free-ssl-certificates-open-source-projects</a><br>
><br>
>-------------------------------------------------------------------------<br>
>wpkg-users mailing list archives >> <a
moz-do-not-send="true"
href="http://lists.wpkg.org/pipermail/wpkg-users/"
target="l">http://lists.wpkg.org/pipermail/wpkg-users/</a><br>
>_______________________________________________<br>
>wpkg-users mailing list<br>
><a class="moz-txt-link-abbreviated" href="mailto:wpkg-users@lists.wpkg.org">wpkg-users@lists.wpkg.org</a><br>
><a moz-do-not-send="true"
href="http://lists.wpkg.org/mailman/listinfo/wpkg-users"
target="l">http://lists.wpkg.org/mailman/listinfo/wpkg-users</a><br>
<br>
-------------------------------------------------------------------------<br>
SSLrack gives free SSL certificates for open source projects
(and cheap for everyone else)!<br>
<a moz-do-not-send="true"
href="http://www.sslrack.com/promo/free-ssl-certificates-open-source-projects"
target="l">http://www.sslrack.com/promo/free-ssl-certificates-open-source-projects</a><br>
<br>
-------------------------------------------------------------------------<br>
wpkg-users mailing list archives >> <a
moz-do-not-send="true"
href="http://lists.wpkg.org/pipermail/wpkg-users/"
target="l">http://lists.wpkg.org/pipermail/wpkg-users/</a><br>
_______________________________________________<br>
wpkg-users mailing list<br>
<a class="moz-txt-link-abbreviated" href="mailto:wpkg-users@lists.wpkg.org">wpkg-users@lists.wpkg.org</a><br>
<a moz-do-not-send="true"
href="http://lists.wpkg.org/mailman/listinfo/wpkg-users"
target="l">http://lists.wpkg.org/mailman/listinfo/wpkg-users</a><br>
</div>
</blockquote>
<div> </div>
</blockquote>
<br>
</body>
</html>