Better update system

Features wanted...
admin
Site Admin
Posts: 60590
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Better update system

Post 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

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Better update system

Post 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?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 60590
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Better update system

Post 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...

jupe
Posts: 2794
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Better update system

Post 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.

admin
Site Admin
Posts: 60590
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Better update system

Post 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:

admin
Site Admin
Posts: 60590
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Better update system

Post 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:

admin
Site Admin
Posts: 60590
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Better update system

Post 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.

klownboy
Posts: 4141
Joined: 28 Feb 2012 19:27

Re: Better update system

Post 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:
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

admin
Site Admin
Posts: 60590
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Better update system

Post 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... :?

klownboy
Posts: 4141
Joined: 28 Feb 2012 19:27

Re: Better update system

Post 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).
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

admin
Site Admin
Posts: 60590
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Better update system

Post 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.

klownboy
Posts: 4141
Joined: 28 Feb 2012 19:27

Re: Better update system

Post 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:
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

admin
Site Admin
Posts: 60590
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Better update system

Post 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.

MBaas
Posts: 582
Joined: 15 Feb 2016 21:08

Re: Better update system

Post 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)...
______________________________________________
Happy user ;-)

admin
Site Admin
Posts: 60590
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Better update system

Post by admin »

I see. That's not possible.

Post Reply