3 Replies Latest reply on Jun 29, 2009 5:19 AM by micahjwalter

    Vista, 64bit vs. 32bit vs. XP and LrTasks



      I have a plugin which towards the end of the export process uses LrTasks.execute to call a helper application.


      On OS-X this seems to work just fine as the OS indexes these applications, and so they can be installed anywhere on the user's hard drive and a simple shell command such as open -a 'myApp' will work.


      However, on Windows, I see that the only way ( I can think of ) to launch an application is to use the START command. This works just fine, but I see that it depends on which OS I am on as it needs an explicit path to the application, which can vary depending on which version os Windows you are on.


      here is an example of what I am trying to do.... this assumes I am either on OS-X or XP


      if MAC_ENV == true then

           LrTasks.execute('open -a myAppr')


           LrTasks.execute('START "" "C:\\Program Files\\myApp\\myApp.exe"')



      As I recall, this will work with Vista 32, but with Vista64 it would be installed in a slightly different location... I think it's something like Program Files\i386 or something like that....


      Anyway, I was just wondering if anyone had any experience with this, and if there was a) a better way to call the windows app, or b) a way to detect if it's vista or xp, etc... or c) if I just will have to bundle this thing three times...?


      thanks for any help



        • 1. Re: Vista, 64bit vs. 32bit vs. XP and LrTasks
          escouten Adobe Employee

          I don't have a Vista machine handy at the moment, but IIRC 32-bit apps wind up in "C:\\Program Files x86\\whatever".


          Does the helper app actually have to be installed, or can it just run if the .exe is in a known location? I ask because one possibility is to include both .app and .exe inside your .lrplugin folder. Then you could just do a simple path manipulation from your plugin's path.

          • 2. Re: Vista, 64bit vs. 32bit vs. XP and LrTasks
            micahjwalter Level 1

            I'm not sure. It requires a .NET component... and it's written in Visual Basic... but I suppose I could try including it in there... that would solve some problems... thanks for the tip. I'll post my results once I do some testing...


            one reason for installing it however would be to allow the user to easily launch it without going through the plugin.... but I guess that could be solved with a button on the plugin... hmmm



            • 3. Re: Vista, 64bit vs. 32bit vs. XP and LrTasks
              micahjwalter Level 1


              Just to follow up, I rewrote my code to reference the helper app within the plugin package file. I still needed an explicit reference for the START command for Windows, but this was easy enough with the _PLUGIN.path env variable. So far I have tested this on 64bit Vista and I will be trying it out on XP and 32 Bit Vista later today, but I think this solves my problem and it is a much more elegant way to package the plugin as a whole.


              Now I am just wondering if using an installer app would still be really necessary as I think most users would be able to get through the process of using the LR plugin manager. Does anyone out there have thoughts or opinions on this?Does this make life difficult for doing software updates?