Vista Virtual PC New Version - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

pauldennis
Posts: 50
Joined: Fri Oct 31, 2008 11:36 am

Vista Virtual PC New Version

hello,

I am using virtual PC as the test environment for our installers. I have a clean copy of Vista setup as a virtual machine. if I install the original version 3.21.1 of our application everything works fine. I then install the upgrade version 3.22.1 and when I open the application it is still the original. if I do the same process in an XP virtual machine all its okay. the really confusing thing is if I remove all the programs and install the very latest version I still get the old one. this includes if I remove programs, save the state of the virtual machine, restart.

is anybody else using virtual PC as their test environment with Vista? Is there some form of cache being used in terms of a temporary folder where the installer is storing the files and they are then being reused somehow?

regards
Paul
pauldennis
Posts: 50
Joined: Fri Oct 31, 2008 11:36 am

Re: Vista Virtual PC New Version

I have managed to track teh problem it is not a virtual PC but casues by Vista virtualisesation. From a previous thread

Vista virtualises (copies) the application file to the user's "VirtualStore" and runs it from there.
When a new version is installed, AI successfully updates the "Program Files" folder but, when the user runs the application, it is still using the 'old' virtualised copy of the file! Vista obviously can't tell that it should re-virtualise the application file.

Now trying to figure how to resolve this. I am installing to c:\Program Data\Our app folder\

Regards
Paul
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Vista Virtual PC New Version

Hi Paul,

You can avoid the virtualization of your application by embedding an application manifest in it. Perhaps these articles will help you:
Windows Vista User Account Control (UAC)
Create and Embed an Application Manifest (UAC)

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pauldennis
Posts: 50
Joined: Fri Oct 31, 2008 11:36 am

Re: Vista Virtual PC New Version

Hello Cosmin,

Is this as simple as (from manual) "When using an EXE bootstrapper or a Java product, Advanced Installer embeds an application manifest"

We create a bootstrapper and distribute that instead of the msi and manifest is included?

regards
Paul
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Vista Virtual PC New Version

Hi Paul,

Please note that Advanced Installer embeds an application manifest only in its tools (the EXE bootstrapper, the Java launcher etc.). For your application you need to create your own manifest manually and embed it in the main EXE. The second article I mentioned explains how to do this.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pauldennis
Posts: 50
Joined: Fri Oct 31, 2008 11:36 am

Re: Vista Virtual PC New Version

Any ideas where to get mt.exe ? I have been searching for an hour?

Regards
Paul
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Vista Virtual PC New Version

Hi Paul,

Mt.exe is included in the Windows SDK. You can download the latest version from here:
Windows SDK for Windows Server 2008 and .NET Framework 3.5

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pauldennis
Posts: 50
Joined: Fri Oct 31, 2008 11:36 am

Re: Vista Virtual PC New Version

hello Cosmin,

thanks to help on this. to clarify with windows vista.

If we install the files to [LocalAppDataFolder] then vista does not virtualise the files.
if we installed to a common locations such as c:\program data\our app folder\ then Vista does this virtualisation and makes copies of files which are stored in the virtualstore.
if we inject a manifest into our executable we can avoid virtualisation.

if the above is true then if you require to install for "all users" on Vista then you must include a manifest?

regards
Paul
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Vista Virtual PC New Version

Hi Paul,

Please note that on Vista the "All Users" folder is represented by "C:\ProgramData". Since your application is virtualized when installed in this location, it is recommended to use a manifest file.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pauldennis
Posts: 50
Joined: Fri Oct 31, 2008 11:36 am

Re: Vista Virtual PC New Version

Hello Cosmin,

I have tried this and the process is far too obtuse if you are not a Microsoft Visual Basic developer. To run this command line there is no indication it is successful and it's far too easy to make a mistake and the manifest would be wrong. Its not a professional solution and the sort of thing that creates Microsoft conspiracy theories. I think the only option is to install in the user's local path. I'm going to test this.

Regards
Paul
pauldennis
Posts: 50
Joined: Fri Oct 31, 2008 11:36 am

Re: Vista Virtual PC New Version

Hello,

For reference I have outlined below a solution to this problem. by default we are installing in C:\programData\our folder\application. This is the default all users location on vista.

Firstly we have a search to establish if the user is running vista or xp.

if Vista user has UAC turned on the files in programdata.... are virtualised. This means a copy is made and stored in the use virtual folder which is
C:\users\appdata\local\virtualstore\.....If no uac then its just like XP.

This meant when we upgraded the program we have two problems.

1. We had to update all of the files in programdata except the datafile which contains user information.
2. However datafile in programdata was the old one the user's datafile is located in virtualstore

The process was follows

1. Search for files in virtual store
2. search for files in program data

This means we have copies of both sets of datafile the original and the virtualised.

We then created the backup list dependent upon the files were present in the virtual store. So if we had files in the virtual store these were added to the backup list if not ie the files are not virtualised then we backed up the files in programdata. see the documentation for "preserve file an existing"

You have to use a string execution condition. Its a bit confusing.

The restore function uses the backup list in either case.

At the end of the routine we delete the files from the virtual store. This means that the next time a UAC user launches the program files in programdata are virtualised again and they have the latest copies.

regards
Paul
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Vista Virtual PC New Version

Hi Paul,

Please note that the approach you are using is not recommended and it is a hack. The recommended approach is to use an application manifest.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”