Skip navigation
Currently Being Moderated

ScriptUI get path to indesign install directory

Apr 2, 2012 2:08 PM

Does anyone know if there is a way to get a users path to their install directory?


I have script, that creates a new menu item when Indesign starts up.  the menu item is clicked, it opens another script.


Right now, I have the path to the second script hardcoded, which works fine:

     C:\Program Files (x86)\Adobe\Adobe InDesign CS5.5\Scripts\Scripts Panel\DM_Core\DM_RemoveMenu.vbs


but now I have to give this to other users, and I need to know if there is some way to get the installation path that they have to their indesign.


Ultimately, what I would like to get is this:


     C:\Program Files (x86)\Adobe\Adobe InDesign CS5.5\Scripts


I have tried scriptsFolder but that doesn't take me to the right place.


Anyone have any ideas.



  • Currently Being Moderated
    Apr 2, 2012 2:50 PM   in reply to BigGunN

    Where did you get "scriptsFolder" from? Your current scripts' folder?


    Anyway, check how far you come with the standard list:


    These variables get filled by ID with the correct paths; for anywhere else, you're own your own. Make sure your path is valid under both Mac OS X and under Windoze, as there are a few differences.

    Mark as:
  • John Hawkinson
    5,572 posts
    Jun 25, 2009
    Currently Being Moderated
    Apr 2, 2012 10:07 PM   in reply to [Jongware]

    Note that the path to a script changes when run from the ESTK versus the Scripts Panel.

    Mark as:
  • Currently Being Moderated
    Apr 3, 2012 2:07 AM   in reply to BigGunN

    This should get you what you want:


    function GetScriptsFolder (){
              var scriptsFolder = null;
              // On Mac this is a folder inside the app package
                        var appFolder = Folder.startup;
                        if (! appFolder.exists){break;}
                        scriptsFolder = Folder(appFolder + "/Scripts");
                        while (appFolder.exists && ! scriptsFolder.exists){
                                  appFolder = appFolder.parent;
                                  scriptsFolder = Folder(appFolder + "/Scripts");
                        if (! scriptsFolder.exists){
                                  scriptsFolder = null;
              while (false);
              return scriptsFolder;



    Mark as:
  • Currently Being Moderated
    Apr 4, 2012 4:19 AM   in reply to BigGunN

    Can't you just use:


    var appFolder = Folder.startup;





    Marijan (tomaxxi)

    Mark as:
  • Currently Being Moderated
    Apr 4, 2012 5:43 AM   in reply to Marijan Tompa

    Only on Windows.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points