What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » WLM Plus! Bug Reports » Debug registry key...

Debug registry key...
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: Debug registry key...
I get it, I'll pack some script files which replace the obsolete files and delete themselves when they're run. For other files such as interface definitions or images, I'll just delete them after initialization. ;)

I wrote that upgrade routine back in December 2007 and it's been left unchanged since version 2.0.003 BETA which was built in the same month. It has worked just fine for all those years but I'm glad we found a better solution now. :)

Here's the code I use for the self-destruction of obsolete files:
Javascript code:
(function(path){
    // Try to use DeleteFile from FileSystem.js if available
    // (I prefer Windows API above ActiveX)
    var deleteFunc = typeof(DeleteFile) == 'function' ? DeleteFile : false, fso;
    // If DeleteFile exists and returns true, this block won't run
    if(!( deleteFunc && deleteFunc(path) )) {
        // Fall back on FSO
        try {
            fso = new ActiveXObject("Scripting.FileSystemObject");
            fso.DeleteFile(path);
        } catch(e) {}
    }
})(MsgPlus.ScriptFilesPath+"\\FILENAME.js");

In the new version, I'll use a minified version of this code like:
Javascript code:
(function(p){var d=typeof(DeleteFile)=='function'?DeleteFile:0,f;if(!d||!d(p)){try{f=new ActiveXObject("Scripting.FileSystemObject");f.DeleteFile(p);}catch(e){}}})(MsgPlus.ScriptFilesPath+"\\FILENAME.js");

which is only 412 bytes long in UCS-2 LE.

My point still stands though, this really should be done by Plus!. :P



Back on topic perhaps?

The registry value being read by some scripts doesn't matter that much (although they shouldn't actually be reloading the script). Also, it appears that the latest version of Video Converter Plus! (2.60.016) doesn't write to this registry value any longer. Simply update Video Converter Plus!, remove the registry value and it won't come back. Problem solved! :)

This post was edited on 02-23-2011 at 02:44 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!
02-23-2011 02:14 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Debug registry key... - by whiz on 02-20-2011 at 03:28 PM
RE: Debug registry key... - by pollolibredegrasa on 02-20-2011 at 07:25 PM
RE: Debug registry key... - by whiz on 02-22-2011 at 11:37 AM
RE: Debug registry key... - by Matti on 02-22-2011 at 12:41 PM
RE: Debug registry key... - by CookieRevised on 02-22-2011 at 03:40 PM
RE: Debug registry key... - by Matti on 02-22-2011 at 05:45 PM
RE: Debug registry key... - by Spunky on 02-22-2011 at 09:00 PM
RE: Debug registry key... - by Matti on 02-22-2011 at 11:27 PM
RE: Debug registry key... - by CookieRevised on 02-23-2011 at 01:13 AM
RE: Debug registry key... - by Matti on 02-23-2011 at 02:14 PM
RE: Debug registry key... - by CookieRevised on 02-23-2011 at 02:44 PM


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