From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Install few files in Public Documents Directory

I am creating an installer in which I am installing the actual application in ProgramFiles folder. Few supporting files have to be added to the Public Documents directory. This directory would be in different locations based on the OS - Windows XP/Vista/7. But I don't find such a category in the Source Files page under "Destination View" list. There is a [PersonalFolder] but as per LV help, this directory pertains to the Windows user who is currently logged in. So, how do I install these supporting files directly into Public Documents folder?

 

Thanks,

Saranya

0 Kudos
Message 1 of 9
(3,577 Views)

There is a common file folder you can give this a try.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 9
(3,559 Views)

Sorry I misunderstood your question. Forget what I wrote before.

 

Hi Saranya,


Try the vi from the attachement. You can select All Users, or current User using the enumeration controll "Requested Path".


Rgds,

Paul


 

0 Kudos
Message 3 of 9
(3,548 Views)

I might be wrong.  The following link shows the mapping of the installer to OS folders

http://digital.ni.com/public.nsf/allkb/811FACF92E678065862576660077CE21

 

I often write to a public docs folder from an application but have not had to install from the installer directly into this folder.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 9
(3,536 Views)

I too use the C:\Users\Public\Public Documents folder is the only location that is open to write and accessible from any User account on that Windows Machine.

 

I have not had luck configuring LabVIEW 2017 application installer to put files in this directory. When I hand define the c:\Users\Public\Public Documents folder in 'Destinations' tab of the Installer Build and then run the installer. See Installer screen shot.image.png

 

However, when I run the installer - The result is TWO instances of 'Public Documents' in the C:\Users\Public folder.

image.png

Why or how this is occurring, is a mystery. They seem to have exactly the same name.

 

Regards

Jack Hamilton

0 Kudos
Message 5 of 9
(3,043 Views)

So the solution is the following: Putting the correct path in the app builder. Window apparently displays a 'false' path in file manager - Adding 'public' in front of Documents in the path bar display?!?!?. The actual path is C:\Users\Public\DocumentsWindows User Public Actual Folder path.png

This is how the path should be specified in the App Builder:

 

App Builder .png

 

Message 6 of 9
(3,031 Views)

This is probably the result of a symbolic link.  I think Windows uses a few of them to make their system folders look like they are somewhere else.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 9
(3,024 Views)

I wonder if there is a way to point to the folder of choice by using its environment variable?  (See here.)  That way the installer will always place it in the correct folder no matter what Windows OS you are using.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 9
(3,019 Views)

Bill,

Windows is a mysterious place indeed!. And the long path lengths problems were supposed to go away too...yet we still run into problems with file paths that are too long.

 

Even thought windows creates the illusion of an abbreviated path...

 

 

0 Kudos
Message 9 of 9
(3,012 Views)