Install files into ProgramData folder using Visual Studio Installer

visualstudio2017

If you are a regular user of Visual Studio and you also use the Visual Studio Installer to create EXE and MSI installers for your programs then you sometimes may need to copy files to the ProgramData hidden folder.

Within Visual Studio Installer this option is not easily available to you like the User’s Desktop is for example:

Visual Studio
Click to enlarge

However, you can carry this out by using the Custom Folder special folder.

Instructions

When you have opened your Visual Studio Installer project you should right click on the File System on Target Machine:

Visual Studio
Click to enlarge

Then go ahead and click on the Custom Folder:

Visual Studio
Click to enlarge

This will then create Custom Folder #1:

Visual Studio
Click to enlarge

You should then go ahead and right click on the folder and click Rename:

Visual Studio
Click to enlarge

Then rename the folder to ProgramData:

Visual Studio
Click to enlarge

That is the folder structure part complete but you now need to change the folder properties to ensure that the DefaultLocation points to the correct folder as by default it points to [TARGETDIR]:

Visual Studio
Click to enlarge

You will need to change the DefaultLocation to:

[CommonAppDataFolder]

So it should then look like this:

Visual Studio
Click to enlarge

You can then go ahead and add files and folders to this folder and they will be installed into the ProgramData folder.

Comments

If you have any questions or feedback about this guide, please feel free to leave us a comment below and we will try to get back to you as soon as we can.

Create a MSI file to install a custom font

1 2
Table of Contents

If you would like to build an installer to install a custom font on a machine, then you can use Visual Studio to do this.

Instructions

All you have to do is to follow these simple instructions:

Open Visual Studio and start a new installer project. Then carry out the following steps:

Right-click on the File System on Target Machine, Add Special Folder > Fonts Folder:

Create a MSI file to install a custom font 1
Click to enlarge

Once you have created the Fonts folder then place your font file there:

Create a MSI file to install a custom font 2
Click to enlarge

This will ensure that the installer places the font file into the Fonts folder within Windows, however, you need to also register the font.

To register the font, you have to go to the Properties for each font file and change Register from vsdrfDoNoRegister to vsdrfFont:

Create a MSI file to install a custom font 3
Click to enlarge
Create a MSI file to install a custom font 4
Click to enlarge

When you have made these changes, you can then generate the installer and test. You should then find that the font is successfully installed.

Feedback

If you have any questions or comments on this guide, then please feel free to leave us a message using our comments system below.