What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Rename a script upon updating it

Rename a script upon updating it
Author: Message:
mynetx
Skinning Contest Winner
*****

Avatar
Microsoft insider

Posts: 1175
Reputation: 33
34 / Male / Flag
Joined: Jul 2007
O.P. Rename a script upon updating it
Current situation:
the user has installed a script in its, let's say, "SomeName", v1.0.
That script has an auto-update function downloading a plsc from a web-stored xml update file.
For some reason, the script author wants to change the script name in the new version. Normally, the new script would import and run next to the old, because the name is different, so no overwrite would take place.

Question:
How to implement a replacement of the old script that had a different name than the new?

Surely, the new script could check for the old's existence and set it to registry>Enabled=0, wait for the next messenger reload and then kill all its data. But, is there a "clean", yet automatic, solution? (Firefox's extensions use guids... as idea only.)

This post was edited on 01-04-2008 at 06:55 PM by mynetx.
mynetx - Microsoft, enhanced.

You have a problem or issue with Windows, Internet
Explorer or Office?
Send a tweet!
01-04-2008 06:54 PM
Profile E-Mail PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
29 / Male / Flag
Joined: Apr 2004
RE: Rename a script upon updating it
Simple, in fact. :)

There's a secret member of the ScriptInfo element. It's called "InstallDir" and allows the developer to set a different installation folder.

For example, if you want to call your script "Hello World!" but you want to install it in "HelloWorld", you could use this for your ScriptInfo.xml file:
code:
<?xml version="1.0" encoding="Unicode"?>
<ScriptInfo xmlns="urn:msgplus:scripts" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <Information>
      <Name>Hello World!</Name>
      <Description>This script greets the world!</Description>
      <AboutUrl>http://www.MySite.com/</AboutUrl>
      <Version>0.1.001</Version>
      <Author>Me!</Author>
   </Information>
   <InstallDir>HelloWorld</InstallDir>

</ScriptInfo>
This has been used by Screenshot Sender, it installs to "Screenshot Sender 4" but the name is just "Screenshot Sender".

However, if you don't like the name of the installation directory of your old script, this won't have much use...

This post was edited on 01-04-2008 at 07:04 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
01-04-2008 07:03 PM
Profile E-Mail PM Web Find Quote Report
mynetx
Skinning Contest Winner
*****

Avatar
Microsoft insider

Posts: 1175
Reputation: 33
34 / Male / Flag
Joined: Jul 2007
O.P. RE: Rename a script upon updating it
Thanks, mattike. That's indeed a very good yet simple solution. And: the old name is just somewhat outdated, but I can keep it as folder name.
mynetx - Microsoft, enhanced.

You have a problem or issue with Windows, Internet
Explorer or Office?
Send a tweet!
01-04-2008 07:08 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On