[wpkg-users] Notepad++
k2
kirill.k2 at gmail.com
Fri Jul 6 15:59:49 CEST 2012
Hello!
I suggest that there is should be short delay before "goto loop" i.e.
something like
ping -n 1 localhost >NUL
to decrease cpu load.
--
Best regards,
Kirill Kozlovskiy
2012/7/6 Adam Thorn <alt36 at cam.ac.uk>
> > > <!-- Uninstall returns immediatly, so just wait a few seconds
> > > for it to remove before checking the status again
> > > Unfortunatly, WINDOWS has no sleep commands -->
> > > <remove cmd='%COMSPEC% /C ping -n 5 127.0.0.1 1>NUL 2>NUL' >
> > > <exit code="any" />
> > > </remove>
> > >
> > > This way, the process will wait a few seconds, which should be enough
> > > for the uninstall to complete before the checks run
> >
> > That's right, yet the solution not only introduces an often too long
> delay,
> > but is also fragile as a slower system might very well need more time
> than
> > that. I described a cleaner solution for most NSIS based setups a while
> ago
> > here:
> >
> > http://bugzilla.wpkg.org/show_bug.cgi?id=241#c3
>
> For some of my packages I make use of a brief script
> (waitforprocess.cmd) which does:
>
> @echo off
>
> :loop
> tasklist | find /I "%1" > NUL
> if ERRORLEVEL 1 goto jump
> goto loop
> :jump
>
> and my <remove> process goes something like
>
> <remove cmd='%software%\wpkg\tools\waitforprocess.cmd uninstall.exe' />
> <remove cmd='"%ProgramFiles%\Notepad++\uninstall.exe" /S' />
> <remove cmd='%software%\wpkg\tools\waitforprocess.cmd uninstall.exe' />
>
> i.e., wait until there are no other uninstall.exe processes running
> (e.g. the user is running something of their own), then run
> uninstall.exe, and wait until it finishes.
>
> Although it's horribly unpleasant, for some of my packages I've yet to
> find a better way of handling this.
>
> Adam
>
> -------------------------------------------------------------------------
> wpkg-users mailing list archives >>
> http://lists.wpkg.org/pipermail/wpkg-users/
> _______________________________________________
> wpkg-users mailing list
> wpkg-users at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/wpkg-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20120706/cb5cb639/attachment-0002.html>
More information about the wpkg-users
mailing list