Help with VBS Path Variables Please

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey for Windows 4.

Moderators: Gurus, Addon Administrators

civiliza
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

Help with VBS Path Variables Please

Post by civiliza »

Please help me, I am looking after just one add-on ScrobblerDJ V2.x, and every few months someone encounters another problem with the path names used in the Installation and Uninstallation VBS scripts.

I need a definitive VBS variable SDB.??? that will work for every user, windows version and MediaMonkey version and that will consistently point to the same Scripts.ini file both during Instalation and Unistallation.

If a single variable is impossible, can someone provide a partial VBS script that picks the right variable for every MediaMonkey version and/or failing that for every MediaMonkey / Operating System combination?

Previous experiments with SDB.ScriptsPath have shown that it can vary inbetween Installation and Uninstallation,
SDB.ScriptsIniFile (the variable used in the current V2.18 Installation/Unistallation) suddenly seems to have become invalid.

All this is assuming that:
a) A ScriptType 2 entry is needed in Scripts.ini (the script runs every time a new track begins)
b) Uninstallation needs to remove said ScriptType 2 entry

This is really becoming a pain, I want to concentrate on the functionality of the add-on, not firefight Installation/Unistallation problems every few months.
civiliza
Posts: 84
Joined: Wed Dec 17, 2008 1:34 pm
Location: United Kingdom

Re: Help with VBS Path Variables Please

Post by civiliza »

I have just looked at the Installation Packages page of the Scripting Wiki, and it seems different from the last time I remember looking, in particular it shows:

Dim inip : inip = SDB.ScriptsPath & "Scripts.ini"
in the Install.vbs

and:
Dim inip : inip = SDB.ApplicationPath & "Scripts\Scripts.ini"
in the Uninstall.vbs.

This asymmetry might be what has been causing me problems - I have been using the same inip line in both vbs files. Are these the definitive variables I have been looking for?

I have seen at least one thread where the author has moved away from SDB.ApplicationPath - a definitive answer really is imperitive.
mcow
Posts: 834
Joined: Sun Sep 21, 2008 9:35 pm
Location: Cupertino, California

Re: Help with VBS Path Variables Please

Post by mcow »

+1 for this, because I've had difficulty uninstalling civiliza's plugin.
wtanksleyjr
Posts: 31
Joined: Fri Dec 11, 2009 9:40 am

Re: Help with VBS Path Variables Please

Post by wtanksleyjr »

Help, please -- with 4.0 running in portable mode my extension worked perfectly; with 4.1 in portable mode it stops working every time MediaMonkey restarts. I note that none of the files in my extension are actually being copied into the Scripts folder inside the portable installation.

My installer script may be bad (it's doing the same thing his is), but my Installer.ini was really hard to get right with 4.0 (the wiki page is useless, since the only example it gives is {app}, which didn't work _at all_). I wound up using {lsf} with 4.0, but now I'm going to be trying to rewrite using {gsf}, and who knows, maybe I'll go back to trying {app} -- I don't understand why my installer gets to make any choices, because the user is supposed to check a box saying "all users" and the installer shouldn't be able to change that.
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Re: Help with VBS Path Variables Please

Post by nohitter151 »

wtanksleyjr wrote:Help, please -- with 4.0 running in portable mode my extension worked perfectly; with 4.1 in portable mode it stops working every time MediaMonkey restarts. I note that none of the files in my extension are actually being copied into the Scripts folder inside the portable installation.

My installer script may be bad (it's doing the same thing his is), but my Installer.ini was really hard to get right with 4.0 (the wiki page is useless, since the only example it gives is {app}, which didn't work _at all_). I wound up using {lsf} with 4.0, but now I'm going to be trying to rewrite using {gsf}, and who knows, maybe I'll go back to trying {app} -- I don't understand why my installer gets to make any choices, because the user is supposed to check a box saying "all users" and the installer shouldn't be able to change that.
In portable mode all extensions are installed for "All users" because it's a portable installation and can't use user folders.
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
Post Reply