Disable UAC prompt for a .exe

E

ejmichaud

I have created an executable using Wise Script Editor. Wise Script
Editor is a useful tool for quickly creating installers but it is also
great for quickly creating simple utilities. In this case the
executable I have created is a utility (not an installation) and does
not require the executing user to have administrative privileges on
the computer for it to complete it's task. The utility works great
with Windows 2000 / XP however when run on a VISTA computer with UAC
enabled, the UAC prompt appears.

I tried a manifest file to tell Vista to not display the UAC prompt
for the .exe, however even the manifest didn't work with the .exe. It
appears that because Vista knows the .exe derived from Wise Script
Editor (a known installation creator), VISTA will always display the
UAC prompt.

I was thinking that maybe there would be some part of the file that
could be edited with a hex editor to trick VISTA so it wouldn't know
that the file was created by Wise Script Editor. Anyone have any ideas
on how I can get a .exe created by Wise Script Editor to not display
the UAC prompt when UAC is enabled?
 
K

KDE

If it were that easy to disable the UAC prompt for your program, don't you
think everyone distributing viruses and trojans would do the same? Kinda
defeats the purpose.
 
A

Andrew McLaren

It's probably not the answer you're looking for, but one solution would be
to upgrade to Wise Package Studio 7.0. This adds specific support for Vista
UAC, and lets you control the digital signatures in your package etc.

See Wise for details ... er, I mean, Altiris ... oh, I mean, Symantec ..
anyway, whoever owns it now :) I guess the upgrade won't be especially
cheap, though.

Hope it helps a little bit, anyway....
 
P

Peter Foldes

Andrew

LOL. Very hard to keep track of ownership today. I do not even know who owns our house. I got to keep asking my better half all the time
 
E

ejmichaud

I think the prompt shows for all exe files regardless of were there created?

Not every .exe requires Administrative rights, so prompting the user
for a higher execution level every time you started a .exe would
defeat the whole purpose of UAC. If you received the UAC prompt
requesting a higher execution level for every .exe you might as well
just turn it off because UAC would not serve to provide a higher level
of security.
 
E

ejmichaud

If it were that easy to disable the UAC prompt for your program, don't you
think everyone distributing viruses and trojans would do the same? Kinda
defeats the purpose.

I want to disable UAC so the .exe DOESN'T ask the user to run it with
higher privileges. The .exe doesn't require higher privileges, but
because VISTA detects the .exe being created using a known
installation creator, VISTA assumes this .exe needs higher privileges,
but it doesn't and I don't want VISTA to ask the user to run it with
higher privileges. My problem is that even after using a manifest
with (requestedExecutionLevel level="asInvoker"), the manifest doesn't
overide the fact that VISTA detects the .exe coming from Wise Script,
a known installation creator. I don't think a virus or trojan could
deliver much of a payload with an execution level of asInvoker.
 
E

ejmichaud

It's probably not the answer you're looking for, but one solution would be
to upgrade to Wise Package Studio 7.0. This adds specific support for Vista
UAC, and lets you control the digital signatures in your package etc.

See Wise for details ... er, I mean, Altiris ... oh, I mean, Symantec ..
anyway, whoever owns it now :) I guess the upgrade won't be especially
cheap, though.

Hope it helps a little bit, anyway....

I am using Wise Package Studio 7.2.0.31 SP2. Windows Installer Editor
(MSI creator) does have a feature "Create a Vista Standard User
Installation", however I am attempting to create a .exe with Wise
Script not Windows Installer Editor. Wise Script doesn't seem to have
a comparable feature.
 
E

ejmichaud

After a little more playing I was able to get this to work with a
manifest. The problem I was having, with little experience with
manifest files, I wasn't changing the name="xxxx". I created an .exe
using Wise Script Editor called Test1.exe. I then created a manifest
file: "Test1.exe.manifest" as follows:
---- Start of code for manifest ----
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="X86"
name="Test1" type="win32"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
---- End of code for manifest ----

Now when running Test1.exe it no longer displays the UAC. Yippee!! Now
I will work on embedding the manifest into the .exe.
 
A

Andrew McLaren

Sorry I was off-target re version; but yes: I was thinking in terms of of
the Installer Editor. I haven't actually played with the Wise Script Editor
(but maybe I should - sounds like a cool tool).

And thanks for the manifest details, that's quite interesting.
Now when running Test1.exe it no longer displays the UAC. Yippee!! Now
I will work on embedding the manifest into the .exe.

In Visual Studio, you can embed a manifest into an EXE with the MT.EXE
Tools; like this:

mt.exe -manifest MyApp.exe.manifest -outputresource:MyApp.exe;1

This is oriented towards C/C++ apps but really, it's just manipulating an
EXE file after compiling and linking. It might work for EXEs in any language
(I haven't tried, though). There's more details in MSDN:
http://msdn2.microsoft.com/en-us/library/ms235542(VS.80).aspx

Hope it helps a bit, good luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top