Showing results for 
Search instead for 
Did you mean: 

Executable running under a different user?


Hi All,


  I searched for this in all forums.

We have an executable file which runs fine on a given windows 7 laptop.  When a different user logs in, the .exe's icon isn't a labview one. Clicking on it won't run it. Windows can't associate it with anything since it has an .exe extension.  Not a newbie, but this one has got me.

0 Kudos
Message 1 of 6

1) Is the executable installed under "My Documents" folder? the folder path changes with user.

2) is the executable installed in a folder requiring admin rights to access?

0 Kudos
Message 2 of 6

This is probably a Windows "Permission" thing.  Here is how I solved this problem:

  1. I develop the Appllication (call it "My Code") in my "private" disk space (call me "BS"), in the context of a Project living in My Document space (call the folder "My Code").
  2. Of course, the Project is linked to a Version Control Repository (I use SVN).
  3. When I build my Executable, I specify the Destination Directory in C:\Users\Public\Documents\LabVIEW Builds and use the Folder name suggested.  I make sure that if I use a Custom Icon for the Executable (I almost always do so), I place it in the Resource Folder within the Project Folder so it can be found "within the Project".
  4. The Public Folder is often not visible to most Users.  This is basically a Good Thing, as it means that Users cannot mess up any support files you need for your Executable.  However, it can also mean that you might want to design your Project to save data in the User's File/Folder context, or in a "global" context (e.g. C:\Data or another "shared" drive, such as D:, which I often use for "Data").
  5. Create a short-cut from the Executable saved in Public Documents to the Public Desktop (as Administrator, you probably want to make the Public Folders Visible to yourself to make it easy to do this).  Because the Icon is on the Public Desktop, and points to an Executable File found in Public Documents, it will be both "visible" and "executable" by anyone logging on to this computer, yet there will be a single copy, relatively safe from casual (non-admin) Users.

Bob Schor

0 Kudos
Message 3 of 6

Good answer for future builds.  I was hoping to solve it without rebuilding since I am not the author.  Thank you.

0 Kudos
Message 4 of 6

You don't have to rebuild!  Simply find the Build (which may be sitting in a folder that J Random User cannot access), drag it and its files to the Public Documents folder (you are not going to tell the users you've done this, they don't need to know), and create a Shortcut to the Executable that you put on the Public Desktop.  Note you need to have enough Windows know how (and it helps to have admin rights) to do this, but when you are done, anyone logging on to that PC will see a shortcut to "My Favorite LabVIEW Program" sitting on their desktop for them to click.  [It's not really on their desktop, it's on the Public Desktop, but they don't know that ...].


Bob Schor

0 Kudos
Message 5 of 6

My only concern is including build folder into Project/resource.

Will it cause conflicts if exe has dependent dlls and other resources, included into the build? It seems they will be present in the project from multiple locations

0 Kudos
Message 6 of 6