JamesNotBond
Posts: 3
Joined: Thu Jun 17, 2021 5:08 pm

Folder Not Being Created

Thu Jun 17, 2021 5:16 pm

Hi Everyone, I am trying to create an installer with the free version that will allow me to copy files over to a folder I need created in C:\Program Files\Microsoft Office\root\Office16.

The folder should be called XLSTART

This will allow me to copy a excel workbook that will automatically launch upon opening Excel. However, the installer isn't creating the folder.

Thanks for the help.

Catalin
Posts: 6537
Joined: Wed Jun 13, 2018 7:49 am

Re: Folder Not Being Created

Tue Jun 22, 2021 5:33 pm

Hello and welcome to our forums,

There are two scenarios I can think of:

- you do not have administrator privileges. Please note that administrator privileges are required in order to create a folder under C:\ProgramFiles folder

- you install a 32-bit setup ("Install Prameters" page --> "Package type" being "32-bit") on a 64-bit machine and the "Program Files" folder from your project is resolved to "C:\Program Files(x86)" at install time.

In addition to the above, you have also tried to recreate the path in your project under the "Program FIles" folder, i.e.:
OfficePath.png
OfficePath.png (16.54KiB)Viewed 8201 times

The second scenario is highlighted in our Paths of the folders in the "Files and Folders" Page article as well:
ProgramFilesFolder.png
ProgramFilesFolder.png (69.91KiB)Viewed 8201 times

If that is the case, please use the "Program Files 64" folder from your project instead or change the "Package type" to "64-bit".

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

JamesNotBond
Posts: 3
Joined: Thu Jun 17, 2021 5:08 pm

Re: Folder Not Being Created

Tue Jun 22, 2021 8:26 pm

Hi Catalin,

Thanks for the response. You are correct about both. I should have maybe worded my question differently. However, some of this info I figured out the last few days after I submitted the question.

I learned that the XLSTART folder actually populates upon Office 365 install so while I don't need to create the folder anymore I do need to copy a file into it. (the default workbook) How do I go about allowing the installer to do something like this as it needs admin rights to copy it to the folder? It also makes it tricky as I need a 32 bit installer due to this being a LOB (Line of Business App) for Microsoft Endpoint so perhaps that is my answer. It's just not possible to do this way?

This program works great and I would like to use it to accomplish this. However, the obstacle of not being able to write to a folder needing admin permissions and to the C:\Program Files\ directory I just don't know how to proceed.

Thanks again for your assistance.

Edit: I could perhaps use a 32 / 64 bit installer (.exe) if we could figure out a way to copy to the folder.

Catalin
Posts: 6537
Joined: Wed Jun 13, 2018 7:49 am

Re: Folder Not Being Created

Thu Jul 01, 2021 3:01 pm

Hello,
I learned that the XLSTART folder actually populates upon Office 365 install so while I don't need to create the folder anymore I do need to copy a file into it. (the default workbook) How do I go about allowing the installer to do something like this as it needs admin rights to copy it to the folder? It's just not possible to do this way?
Here, you could set the "Installation Type" in "Install Prameters" page to "Per-machine only (fails if user is not administrator)".

This way, on the "InstallDlg", the "Install" button will have the "UAC Shield" on it and when the user presses it, it will automatically elevate.

If the current user that runs the installation is not an administrator, then he will have to provide administrator credentials (i.e. username + password) and then the installation will proceed.

Regarding the 32-bit part, you could use the "Program Files 64" folder as I have explained above. This way, you should be able to "recreate" the path without any redirection problems.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”