Thanks. That link did put some light on why the GetActiveObject method was
failing. But i need to find a method to make my application work without
modifying the code. This is important because the application was initially
developed targeting the earlier windows versions (2000/2003/XP). And it also
works fine on vista, but only with UAC turned off.
"""What i want is to make it run on vista, with UAC turned on."""
My application is an exe (myapp.exe) that uses a COM dll (from where i call
GetActiveObject()). The whole thing is packaged in an installer (setup.exe)
using Install Sheild 11.5 (this does not claim to have any support for
vista). The myapp.exe is run from a batch file, which executes right after
the installation procedure and at machine startup. (I do not want a pop-up
everytime myapp.exe runs. It is supposed to run in the background.)
Would embedding a manifest (as explained below) solve my problem?
Is there any other way to make my setup.exe (or its indivudial components)
compatible to vista, with UAC turned on?
I tried embedding a manifest in myapp.exe using the command "mt.exe
/manifest myapp.exe.manifest -outputresource:myapp.exe;1". But it is still
failing i.e. GetActiveObject() still returns a failure. And I also get a
"consent prompt" when I run myapp.exe. My login belongs to the
administrators group on my vista machine.
Following is the manifest file that I used to embed:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
Any suggestions/pointers are welcome.
"Pete Delgado" <Peter.Delgado@noads.net> wrote in message
> "Darshan Tilak" <email@example.com> wrote in message
>> I have written an application (win32 exe) that calls GetActiveObject() to
>> get an object of Microsoft Excel. I use a batch file to launch this exe.
>> This worked fine on XP, but the call returns a failure when used on
>> Windows Vista. I found some answers for the same that suggest to elevate
>> the process integrity level.
>> So I have the following questions:
>> -- How to elevate a processs integrity level? (where can i find the
>> relevent information?)
>> -- Will I have to change my application code to achieve this?
>> -- Can a not simply make changes to the batch file, that calls the exe,
>> to elevate the process integrity level?
>> (I hope this is the right forum to ask this question. It will be really
>> helpful if anyone can point me in the right direction.)
> I'm not sure that integrity levels are your problem though unless you are
> running the batch file as another user or you are running it as a
> scheduled task.
> The above book is pretty good at explaining the basics, but there are many
> details left out...