lee.wilmott
Posts: 9
Joined: Tue Aug 30, 2005 11:29 am

Adding files to 'everyones' profile folder during install

I hope someone can help me.

I am only trialling Advanced Installer at the moment...so I'm not familiar with it's terminology. I have created 'Simple' installer packages without any issue but that's as far as it goes.

However, this time I'm trying to do something a little more tricky.

I have a 'REALLY' badly designed application that when installed copies files to...

- Program Files (which you would expect)
- Users' profile folder (c:\users\<username>)

If these files don't appear in the 'users' folder then the application won't execute.

So...for example...If I login to a workstation as "administrator" then the [current] installation packages installs certain files into "C:\Program Files\..." and other files into the "C:\Users\administrator" folder.

If I then login as "user1" then the files don't exist in the "c:\users\user1" folder, so the application fails to execute.

What I would like to do is 'repackage' the application so that it...

- Copies the relevant files to "C:\Progam Files"...and...
- Copies the necessary files to EACH AND EVERY FOLDER that appears in the "C:\Users" folder.

This is not an in-house application...I have tried to contact the developer (online) but the website hasn't been updated in 'years' and my emails are bouncing. So changing the application to work in a different way isn't an option.

Am I able to repackage the application to work in the way I want? If so, can someone please point me in the right direction?

Many thanks,

Lee
Bogdan
Posts: 2791
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Adding files to 'everyones' profile folder during instal

Hi Lee and welcome to our forums,

Thank you for your interest in Advanced Installer.

What you want to accomplish can be done using Advanced Installer. You have two major steps that you need to accomplish in order to obtain a working package:

- first, you need to use our repackager to create a complete new package for the app, using the third party one you have
- after you have performed the above and tested the package for the current user, making sure it works as expected, you need to use an advertised shortcut that will allow the OS to automatically copy the per-user files when another user launches the application for the first time from their account. The following thread explains the principle of using the advertised shortcut.

If you have any questions just let me know.

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lee.wilmott
Posts: 9
Joined: Tue Aug 30, 2005 11:29 am

Re: Adding files to 'everyones' profile folder during instal

Bogdan,

Many, many thanks for your advice. I feel as though I'm getting somewhere now! :-)

[Thanks to your help] I have now got it to work 'but'...

I logged in as an administrator and mapped a 'temporary' drive. I then successfully installed the product.
I then logged in as a 'user' and launched the application. The installer started but it wanted access to the original msi package and referenced the temporary drive that I mapped (when I was logged in as an administrator).

While logged on as the user, I mapped the same drive letter (that was used during the install) to the place where I have the .msi package...it then worked.

But I want this to work without having access to the original msi package. I want to be able to install this as an administrator and then for it to work for any user(s) that logon...without the user having to map a drive.

Many thanks,

Lee
Bogdan
Posts: 2791
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Adding files to 'everyones' profile folder during instal

Hi Lee,

Using the auto-repair method I presented is the safest and easiest method. This is the standard approach used by most of the sys admins when having a deployment scenario like yours.

If you want all the files to be placed there from the beginning you could try creating a custom action that iterates the per-user locations and copies the files there, but for this you would need to write your own code. Also, problems could appear when running the code on different platforms, for example permissions.

The method I recommended is much safer. Do you expect that most of your users will run the MSI from a mapped drive?

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lee.wilmott
Posts: 9
Joined: Tue Aug 30, 2005 11:29 am

Re: Adding files to 'everyones' profile folder during instal

Hi Bogdan,

In answer to your question...users can't install anything - because they don't have the permissions to do so.

However, the administrators can install an application from various locations...a mapped drive, a DFS share or (I guess) they could copy the MSI locally and execute it from there!

If I remember correctly, Microsoft Office does this little mini-install (or auto-repair) method the first time you execute an Office application...but you don't have to supply the original source location.

In fact, in our case...users do not have access to the network location where we store all of our applications.

I'm definately interested in trying to do what you suggest...however, is there a way of around the issue I'm having?

Lee
Bogdan
Posts: 2791
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Adding files to 'everyones' profile folder during instal

Hi Lee,
Microsoft Office does this little mini-install (or auto-repair) method the first time you execute an Office application...but you don't have to supply the original source location.
They probably do this by caching all the resources manually in another location. Because they have an EXE that bundles the MSI package, to offer extra-features, they can do that.

Advanced Installer can do the same, i.e you can configure it to create an EXE with the MSI and CAB files inside, and specify an extraction path for it accessible to all the user accounts, so the auto-repair can find the resources without asking for the original package. Here is an example of such a path:

Code: Select all

[CommonAppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install
So, to enable the executable you need to go to Media page, Bootstrapper tab. After you have enabled it and set the files to be included in it, specify the extraction path from above. Also, very important, make sure you tick the option "Do not delete extracted MSI and CAB files", so they remain on the machine for the other users too.

Let me know if this solution would work better for you or if you have any questions.

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lee.wilmott
Posts: 9
Joined: Tue Aug 30, 2005 11:29 am

Re: Adding files to 'everyones' profile folder during instal

Bogdan,

Many, many thanks for your reply.

In light of the information you have provided...I have managed to get this to work.

I have now purchased Advanced Installer and created the final package for my application.

Thanks once again,

Lee

Return to “Building Installers”