Page 4 of 5

Re: Better update system

Posted: 27 Oct 2017 10:33
by admin
Are you aware of the update command?

Code: Select all

v17.30.0205 - 2016-11-19 12:58
    + SC update enhanced: Added flags that allow to auto-run the app after 
      install. Note, however, that the app will be run as administrator. There 
      is no way to run it as user (since it's done from the elevated installer).
      Syntax: update [flags]
        flags: (bit field)
              1 = include beta version
              2 = run update also if current version is up-to-date
              4 = run app (as administrator)
              8 = run app ask (as administrator)
      Examples:
        update 1 + 4; //update to the latest beta version, and run it
        update 1 + 8; //update to the latest beta version, and ask whether to run it

Re: Better update system

Posted: 27 Oct 2017 21:25
by bdeshi
zer0 wrote:I am admin on my machines and happy to let XY run as such. Is the crowd who would not like that bigger...
That crowd *should* be bigger.

@Don, aren't you using NSIS? Then can't you add an exec or execshell command in the install script to run xy via explorer which unelevates the process?

Re: Better update system

Posted: 28 Oct 2017 10:48
by admin
SammaySarkar wrote:
zer0 wrote:I am admin on my machines and happy to let XY run as such. Is the crowd who would not like that bigger...
That crowd *should* be bigger.

@Don, aren't you using NSIS? Then can't you add an exec or execshell command in the install script to run xy via explorer which unelevates the process?
Interesting stuff indeed, I know I wanted to implement this but did not find the time yet.

There is one problem though. If an instance of XY is running with "Configuration | General | Startup & Exit | Allow multiple instances" = OFF then

Code: Select all

run "%WINDIR%\explorer.exe ""<xy>""";
does not open any new instance.

And this command does not work:

Code: Select all

run "%WINDIR%\explorer.exe ""<xy> /new""";
PS: well, not that bad since no instance of XY should be running during install... :) ... so I see if I can add this...

Re: Better update system

Posted: 28 Oct 2017 11:43
by jupe
I don't know how useful this information is to you, but when I wrote a batch file to update XYplorer that I could run from within it, I got around XY being open and running while doing an update by running "TASKKILL.exe /IM XYplorer.exe", but I am pretty sure you would already know a much better way of doing it.

Re: Better update system

Posted: 28 Oct 2017 11:54
by admin
I think I would not go so far as auto-killing user instances, and it's not always necessary since you can have any number of parallel XY instances on your system and have them running, but only one of them is updated by the installer.

In the meantime I finished coding the "better update system", so the update from the next to the next-next version should be fully automatic including auto-run! :cup: :biggrin:

Re: Better update system

Posted: 28 Oct 2017 16:03
by admin
Wow, just self-updated 18.50.0115 to 18.50.0116 including non-elevated auto-run! :tup: :beer:

PS: thanks SammaySarkar for the final clue! :cup:

Re: Better update system

Posted: 28 Oct 2017 21:21
by admin
admin wrote:Wow, just self-updated 18.50.0115 to 18.50.0116 including non-elevated auto-run! :tup: :beer:
Just in case you don't know how to update to the latest beta version, and auto-run it. You need a script:

Code: Select all

update 1 + 128; //update to the latest beta version, auto-run it
:!: From v18.50.0115 onwards.

Re: Better update system

Posted: 28 Oct 2017 21:45
by klownboy
Yes, I tried it and it worked great. Though I also used the silent flag as well.

Code: Select all

update 1 + 16 + 128;    //update to the latest beta version silently and auto-run it 
I suppose I won't be using the good old "Simple Updater" script anymore. :tup: :appl:

Re: Better update system

Posted: 30 Oct 2017 10:59
by admin
klownboy wrote:Yes, I tried it and it worked great. Though I also used the silent flag as well.

Code: Select all

update 1 + 16 + 128;    //update to the latest beta version silently and auto-run it 
I suppose I won't be using the good old "Simple Updater" script anymore. :tup: :appl:
And that was a silent update? For me the 16 does not seem to make any difference... :?

Re: Better update system

Posted: 30 Oct 2017 12:19
by klownboy
Now you have me wondering if it was silent. When it's already up-to-date I get the message saying so and that's fine though in silent mode, a status bar message would be fine instead of clicking through message. So I downloaded the previous beta v18.50.0115 from Marco's Google Drive freezer and updated. I did get a message stating there's a newer version...do you want to update to the latest. I didn't copy the exact wording. So you are right though, it's not silent (yet).

Re: Better update system

Posted: 30 Oct 2017 12:23
by admin
klownboy wrote:Now you have me wondering if it was silent. When it's already up-to-date I get the message saying so and that's fine though in silent mode, a status bar message would be fine instead of clicking through message. So I downloaded the previous beta v18.50.0115 from Marco's Google Drive freezer and updated. I did get a message stating there's a newer version...do you want to update to the latest. I didn't copy the exact wording. So you are right though, it's not silent (yet).
No, that message is okay.

But I also get all the messages from the installer itself. Not sure why. There should be none if it's silent. If you get only that one message then I have some strange problem here at home.

Re: Better update system

Posted: 30 Oct 2017 12:47
by klownboy
Sorry, it must be too early for me, but I downgraded and upgraded again (x3) and I did get the additional message from the installer. I think the first time it was behind my browser and didn't notice it until later thinking it was already updated. :oops:

Re: Better update system

Posted: 30 Oct 2017 13:02
by admin
OK, good. I think I could fix it in the meantime. The next installer should be able to do a really silent update with auto-run.

Re: Better update system

Posted: 30 Oct 2017 14:53
by MBaas
My only complaint with the update-system (I do "update 5") is that if the update is triggered from a running instance of XY, when it restarts, it should do that with the same commandline as the initial instance was running (speficially "/ini" in my case)...

Re: Better update system

Posted: 30 Oct 2017 15:02
by admin
I see. That's not possible.