Page 1 of 1

Help with VBS Path Variables Please

Posted: Sun Nov 03, 2013 1:36 am
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.

Re: Help with VBS Path Variables Please

Posted: Sun Nov 03, 2013 2:04 am
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.

Re: Help with VBS Path Variables Please

Posted: Sun Nov 03, 2013 11:26 pm
by mcow
+1 for this, because I've had difficulty uninstalling civiliza's plugin.

Re: Help with VBS Path Variables Please

Posted: Fri Jan 10, 2014 2:42 pm
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.

Re: Help with VBS Path Variables Please

Posted: Fri Jan 10, 2014 4:36 pm
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.