cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sean_larkin
Level 4

Vista 64 installed program slow to start

I've created a basic MSI installation that installs an executable and a few supporting files. This is a 64-bit application, so I set the tempolate summary to "x64" and labeled the components to be installed as 64-bit(set to 264). This installs the files fine and the installation completes successfully. When I run the install app from the program files shortcut it takes a very long time to startup. In the task manager I can see the .exe process running, but it takes nearly 5 minutes to completely launch the application. If I run this same executable file from a desktop folder it starts up quickly. Also, if I try to run the executable installed in the Program Files folder(actually installed in (x86) folder, does this matter?) it sticks as well. If I install this on a 64-bit XP machine everything runs fine without any launch delay. Does anyone know why this might be ocurring?
Labels (1)
0 Kudos
9 Replies
Lurean
Level 8

if it is truly a 64bit application you will want to install it to the 64bit program files folder not the 32bit (x86) one.

Also in Vista the UAC can cause programs that are not correctly flagged with a manifest to be very slow to start.
0 Kudos
sean_larkin
Level 4

Lurean wrote:
if it is truly a 64bit application you will want to install it to the 64bit program files folder not the 32bit (x86) one.

Also in Vista the UAC can cause programs that are not correctly flagged with a manifest to be very slow to start.


Thanks for your reply. Unfortunately, I am not all that familiar with Vista. What flag might I set in my MSI installation to avoid this UAC problem? If I turn off the UAC on the target machine then the program starts up quickly, but I do not want to turn off the UAC for all the programs. I want this(whatever solution there may be) to be taken care of automatically in the installation.
0 Kudos
Lurean
Level 8

the manifest is part of the application you are installing and has to be built into the application prior to compiling.

http://msdn.microsoft.com/en-us/library/bb756929.aspx

depending on the permissions your applications need to run you will need to set the ExecutionLevel attribute accordingly.
0 Kudos
sean_larkin
Level 4

Thanks again. I raised the Required Exexcution Level (to Administrator) in the Release Setup.exe tab and this sort of solved the problem. After installation, the program will launch quickly now, but the UAC pops-up a box asking if I want to trust this application. How can I get rid of this?
0 Kudos
Lurean
Level 8

if the application requires administrator rights you cannot get rid of the UAC box asking about it. That is just the way that UAC works, it will confirm any application before elevating it.

if this is an application you are building, add an application manifest to the project and make sure the requiredExecutionLevel attribute is set to the appropriate value. If it is set to requireAdministrator then you will see the box every time. If the application can run with less rights than administrator users then you can set it to asInvoker to prevent the elevation in most cases.

If you are not building the application itself, then talk to the developer of that application about adding an application manifest to the application.
0 Kudos
sean_larkin
Level 4

Actually my last post was wrong. This did not work. By changing the requested execution level to administrator in the release tab it didn't run immediately like I thought. I think what happened is that I manually set the "run as administrator" checkbox in the installed .exe file's properties(by going to the exe file in the Program Files directory on the target machine).

So then I tried to embed a manifest in the .exe file that I wanted to install using mt.exe with the following manifest:













This is what was on MSDN, but is this correct to be used on a Vista 64 machine? It didn't work for me.

How can I automatically have the installed .exe file have its "run as administrator" checkbox automatically checked when the installation is performed?
0 Kudos
sean_larkin
Level 4

I am building the install application. I checked the manifest of the setup.exe file of my install and here's what it is:


-

InstallShield.Setup
-
-



-
-
-




-
-






I noticed that it has "win32" whenthis is actually a 64-bit application, as I have the Template Summary set to x64 and all of the components set as 64 bit components. Is this an issue?
0 Kudos
sean_larkin
Level 4

Here's something that does work. If I install the application onto the desktop, which I would never reasonably do, the application launches fine every time. But whenever I install the application in the ProgramFiles folder the program hangs at launch. Does this make any sense?
0 Kudos
Lurean
Level 8

here is more information on manifests and exact syntax needed to make them work.

http://msdn.microsoft.com/en-us/library/aa374191(VS.85).aspx

I am just getting into this myself as we are just transitioning our software to Vista.

The reason it works when you install the application to a spot other than ProgramFiles is that you are not installing into protected space, and the UAC is not as controlling. If your application is primarily written for Vista you could look into installing it into the Public folder instead, but I am not sure how viable that is and that won't help if your application needs access to protected space files.
0 Kudos