INTERACT FORUM

Please login or register.

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

Author Topic: Major version upgrade - find and replace in settings?  (Read 1835 times)

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9140
Major version upgrade - find and replace in settings?
« on: February 03, 2015, 09:11:58 am »

Shifting major versions is an almost painless experience. So much so, that we forget all the places were we've specified something happen via MCXX.exe

This caused me some considerable trouble with the HTPC, running theater view exclusively, used extensively by the girls.

Here's one example ---> http://yabb.jriver.com/interact/index.php?topic=82584.msg563555#msg563555

After upgrading the HTPC to v20, I forgot about this as it "just worked", up untill we discovered much wierdness and crashing, and I realised that this entry in MC20's theater view was causing MC19 to launch and attempt to begin playback.

There were more. Some remote control button customisations spring to mind also.

What is the possibility of the v21 upgrade being able to perform a find and replace on the settings it's importing, replacing any ocurrancies of MCXX.exe it finds with MC21.exe?

-marko

fitbrit

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4887
Re: Major version upgrade - find and replace in settings?
« Reply #1 on: February 03, 2015, 12:33:27 pm »

Great idea.
Logged

gvanbrunt

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1232
  • MC Nerd
Re:
« Reply #2 on: February 03, 2015, 05:14:45 pm »

That has bitten me too
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Major version upgrade - find and replace in settings?
« Reply #3 on: February 03, 2015, 07:32:01 pm »

Shifting major versions is an almost painless experience. So much so, that we forget all the places were we've specified something happen via MCXX.exe

I've already solved this problem!

Check out MCUtilities:
http://yabb.jriver.com/interact/index.php?topic=81514.0

Included is MCcl.exe.  This is simply a wrapper for MCXX.exe.  You can run it once with the command line:

MCcl.exe --update

and it'll update itself to now use the version of MC currently registered with COM (which is typically the most recent version launched).  Otherwise, calling MCcl.exe will automatically forward any command line parameters to the currently "associated" version of MCXX.exe.

So, all of my scripts call MCcl.exe instead of MC20.exe directly.  When MC21.exe comes out, and I'm ready to "switch to it" permanently, I'll just run MC21 once (and approve the UAC prompt) to get it registered with COM, and then:

MCcl.exe --update

One time.  Done.  All the scripts are automatically fixed.  It works very, very well.  ;D
Logged
"Some cultures are defined by their relationship to cheese."

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

fitbrit

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4887
Re: Major version upgrade - find and replace in settings?
« Reply #4 on: February 03, 2015, 08:12:51 pm »

Wow! Could I ask a N00B question?
I got MC19 working with MilkDrop 2. I seem to recall there was some messing about in the registry or some such. Would your script have allowed Milk Drop2 to be installed on MC20 as well?
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Major version upgrade - find and replace in settings?
« Reply #5 on: February 03, 2015, 08:32:30 pm »

No.  It only applies to things where you launch MCXX.exe.  It is a stand-in for anywhere you'd normally type MC20.exe.

So, I use it in my Girder definitions so I don't have to completely reconstruct it each time a new major version of MC comes out.  I also use it in other scripts I write like this one: http://yabb.jriver.com/interact/index.php?topic=95217.msg656454#msg656454

I didn't in that one because I didn't want to have to tell the guy to use my tool.  But, if I'd have been writing it for myself I'd have made it like this instead:

Code: [Select]
<package>
   <job id="vbs">
      <script language="VBScript">
          Option Explicit

          dim WshShell
          'Create our handy dandy Shell object
          set WshShell = WScript.CreateObject("WScript.Shell")
         
          'Stop playback in MC
          WshShell.Run "MCcl.exe /Stop"
         
          WScript.Sleep 300

          'Create the WMPlayer Object
          dim wmPlayer
          set wmPlayer = CreateObject("WMPlayer.ocx")
          'Play audio
          wmPlayer.URL = "C:\Windows\Media\chimes.wav"
          wmPlayer.controls.play
          While wmPlayer.playState <> 1 ' 1 == stopped
            WScript.Sleep 100
          Wend

          'Close the audio file
          wmPlayer.close

          'Restart MC with the next track
          WshShell.Run "MCcl.exe /Next"
          WScript.Sleep 100
          WshShell.Run "MCcl.exe /Play"
      </script>
   </job>
</package>
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/
Pages: [1]   Go Up