Showing results for 
Search instead for 
Did you mean: 

Creating a file structure with the installer

Go to solution



I am currently creating an .exe of my program and giving this to the users, then helping them to install the runtime engines (labview and Visa), finally I create some folders on there desktop and add a couple of .txt/.ini and .bat files to these folders. The user then goes through some initial setup to tell the program to use these files/folders for data input and also to save some data to that location.


I want to make this process a lot simpler by using the labview installer, I can get this to install all the necessary runtime engines and my program to the target PC, However I would like to extend this to creating the folder structure on the users desktop, and then telling my program where this is. I think telling my program the file path of these created folders may be a little complex, but would be very nice to have.


I would be happy to start with just creating the folders on the desktop and adding the .txt/.ini/.bat files to it. Any help with this will be appreciated



Thank you


0 Kudos
Message 1 of 8

I am not sure if this can be done for empty folders, but here goes.


First setup a structure as you want it to be.

Add this folder to your project with 'auto indexing' enabled.

Create a distibution with this folder.

In you installation you can add this distribution, upon installing the whole tree should be installed.



Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 8

I've also tackeled simmilar problems to this by having a routine in my application that, after reading in a settings file, creates the appropriate folders (if they dont already exist).


In your instance, you could install a default configuration file along side your application that the application will use when it first starts to create the folders. If the user then chooses to change the locations, you could then adjust the configuration file so that it would create folders in the new location (again, if they dont already exist).


If you wanted to use a user's desktop, or some other special folder, you could put a keyword into your paths that the "create folders" routine would replace with the actual location.... admitidly you still need to find the special folder paths, something LabVIEW is not particularly helpful with, but if you dont mind getting your hands dirty with a little .NET, a call to System.Environment.GetFolderPath will give you the path you need.

0 Kudos
Message 3 of 8

I seem to have solved the first bit of the problem by using the source files section of the installer, creating some folders in the destop folder and adding my example files to that. This has worked when I did an install on the PC I am using to develop it, I have not had a chance to test this on another clean PC. Hoepfully it will work the same way



I am not to sure how to use .net if you could elaborate a little bit that would be excellent


Thank you for your help this far

0 Kudos
Message 4 of 8

Here's a simple VI that I have extracted from our reuse library - it will return the path for any number of "Special Folders" such as "My Documents", "Desktop", etc using .NET.



0 Kudos
Message 5 of 8



Thank you, is it possible for you to save it as 8.2



Thank you

0 Kudos
Message 6 of 8
Accepted by topic author Dowden1

Sure, here's it back-saved in 8.2.


have fun!

Shaun 🙂 

0 Kudos
Message 7 of 8

 However I would like to extend this to creating the folder structure on the users desktop, and then telling my program where this is


Consider a different approach:  Have your program create these folders upon startup.

If Creation succeeds, copy the INI / TXT / whatever files from your local folder into the new folder, and pop up a dialog announcing "Welcome to my program - put your data in the desktop folder I just created for you called "My wonderful data".

If creation fails, it's because the folder is already there (most likely), and proceed without such an announcement.



Just a thought. 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 8 of 8