INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Can I automate the update process?  (Read 1790 times)

Sky King

  • Galactic Citizen
  • ****
  • Posts: 302
Can I automate the update process?
« on: October 08, 2014, 10:09:44 am »

Hi,

I have MC running on a headless PC that operates continuously and unattended.  Is there a way to automate the update process such that when a new version, stable or beta, is released the program will automatically update itself without user intervention?

Thank you for any insight you may have.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Can I automate the update process?
« Reply #1 on: October 08, 2014, 10:30:17 am »

If UAC is off, yes.

If UAC is on, then no.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Sky King

  • Galactic Citizen
  • ****
  • Posts: 302
Re: Can I automate the update process?
« Reply #2 on: October 08, 2014, 04:22:58 pm »

Thanks Glynor.  I have UAC off.  I can't find a switch in MC and am wondering if there is some setting in MC that I need to enable?
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10945
Re: Can I automate the update process?
« Reply #3 on: October 08, 2014, 04:24:32 pm »

There is no way to do this automatically inside MC. If you want this, you'll need to come up with your own solution to install the build once its available. A tiny script can probably do it.

Also, I strongly recommend against running with UAC off.
Logged
~ nevcairiel
~ Author of LAV Filters

Sky King

  • Galactic Citizen
  • ****
  • Posts: 302
Re: Can I automate the update process?
« Reply #4 on: October 09, 2014, 01:11:52 am »

Thanks Hendrik.  At this point, I'm not savvy enough to write the script.  I'll do some research.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Can I automate the update process?
« Reply #5 on: October 09, 2014, 05:44:16 pm »

If you have UAC off, it doesn't take much of a script.

If you have the Update Channels enabled, it will update itself whenever there is a pending update at next launch.  So, you just need to quit and re-launch MC with the Auto-Updater turned on, basically.  Run through the MC installer manually once, and make sure to check the "next time auto-install after 30 seconds" box, so that it can automatically run through the installer.

Then, you just need to script a shutdown of MC (including the Library Server), and then a startup again a little bit later.

To force MC to quit (including any Library Server running in the tray) use:

Code: [Select]
mc20.exe /mcc 20007,1
To start MC back up in full UI mode use:

Code: [Select]
mc20.exe /start
To start MC back into Library Server Mode use:

Code: [Select]
mc20.exe /MediaServer
You should put a good long sleep in-between the two (maybe 30 seconds or so), as MC takes a little while to fully shut down.

Also, I strongly recommend against running with UAC off.

I definitely agree here.  UAC is a valuable security feature if this is a machine that EVER gets used from the console (with a keyboard and mouse).  If it is really a headless server running in a closet that NO USER EVER TOUCHES DIRECTLY, then perhaps this is a good plan.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Sky King

  • Galactic Citizen
  • ****
  • Posts: 302
Re: Can I automate the update process?
« Reply #6 on: October 11, 2014, 05:59:57 am »

Glynor, thanks so much for the help!  I'll give it a spin later this weekend.
Logged
Pages: [1]   Go Up