PDA

View Full Version : UAC problem



NewsArchive
11-23-2015, 02:15 AM
I have an app that is CodeSigned using SetupBuilder 8 and each time I
start it I get a message asking "Do you want to allow this app to make
changes to your PC?" I ran Checkstatus.exe to see if it is properly
CodeSigned and it is.

I have the manifest set to "Invoker" and have added #pragma UCALEVEL = 1
to the script.

Obviously I'm missing something, but what is it?

Thanks,

Bob

NewsArchive
11-23-2015, 02:15 AM
Bob,

> I have an app that is CodeSigned using SetupBuilder 8 and each time I
> start it I get a message asking "Do you want to allow this app to make
> changes to your PC?" I ran Checkstatus.exe to see if it is properly
> CodeSigned and it is.
>
> I have the manifest set to "Invoker" and have added #pragma UCALEVEL = 1
> to the script.
>
> Obviously I'm missing something, but what is it?

Did you embed the "asInvoker" manifest into your own app? If yes and you
get an elevation prompt when you start your app then you have set a
Compatibility Mode for your app and "Run this program as administrator"
enabled.

BTW, #pragma UACLEVEL = 1 is for the setup.exe only, not for your own app
!!! Your installation should always have "requireAdministrator" set (if it
is a "per-machine" install). So please make sure that you have the correct
manifest embedded into your own app.

Friedrich

NewsArchive
11-23-2015, 02:17 AM
Friedrich,

The Manifest settings in the App are in the 1st attached .jpg.

The relevant section of the actual Manifest is in the 2nd attached .jpg.

It looks correct to me, but I'm obviously missing something.

Thanks,

Bob

NewsArchive
11-23-2015, 02:17 AM
Hi Bob

>I have the manifest set to "Invoker" and have added #pragma UCALEVEL = 1
>to the script.
>
>Obviously I'm missing something, but what is it?

Your screenshots show that manifest is set to "requireAdministrator", not as Invoker.

You will get a better result if you take out all the manifest stuff from your App, and
do it from within your SB8 project

JohnG

NewsArchive
11-23-2015, 02:18 AM
What John said, Bob.

Your INSTALLER needs to requireAdministrator. You set that in the installer
project properties in SB.

Your APPLICATION(s) need to be asInvoker.

The screen shot you're showing is where you're adding a manifest to YOUR
APPLICATION in CLARION, not IN SB. (And it's a requireAdministrator
manifest.)

You can either use Clarion or SB to manifest YOUR APPLICATION.
You shouldn't try to use both for the same manifest. I don't think SB will
put a manifest in YOUR APP if you've already manifested it in Clarion.

The manifest your screen shot shows - requireAdminstrator for YOUR APP - is
the reason you're getting the "do you want to allow this app" message each
time you run it.

Again, requireAdministrator is ONLY FOR THE INSTALLER, asInvoker is for YOUR
APPLICATIONS.

Caps to emphasize the distinction between application properties and
installer properties.

HTH

jf

NewsArchive
11-23-2015, 02:19 AM
Hi Bob,

> The Manifest settings in the App are in the 1st attached .jpg.
>
> The relevant section of the actual Manifest is in the 2nd attached .jpg.
>
> It looks correct to me, but I'm obviously missing something.
>

I'm confused<g>

"I have the manifest set to "Invoker"

But the manifest settings are for RequireAdministrator...

Code signing is not related to manifesting. Two different things.

Best regards,

--
Arnor Baldvinsson
Icetips Alta LLC

NewsArchive
11-23-2015, 02:19 AM
Hi John,

> You will get a better result if you take out all the manifest stuff
> from your App, and do it from within your SB8 project JohnG

Curious: How will the results be better?

Best regards,

--
Arnor Baldvinsson
Icetips Alta LLC

NewsArchive
11-23-2015, 02:20 AM
Hi Arnor

If you use the CW default manifest method, it puts the EXE name into the fields
ProgramName and ProgramDescription.

If you don't use the CW defaults, but use the Generate Manifest process in CW, then it
leaves those fields blank.

If you use SB, then you control what gets put into the EXE in those fields. See
attached.
I guess it is better because you have more control. Anyway, I prefer the SB route.

John

NewsArchive
11-23-2015, 02:21 AM
Thanks everyone.

I changed the Clarion Manifest back to "Invoker" and the App now starts
without the message. Not sure what I did wrong originally, but it's now
working so I'll take it.

Bob

NewsArchive
11-23-2015, 02:21 AM
After checking the manifest for another app, I found my error. I had
selected "highestAvailable". Sorry for wasting your time. Not that it
won't happen again.

Bob

NewsArchive
11-24-2015, 01:38 AM
Hi John,

> If you don't use the CW defaults, but use the Generate Manifest process in CW, then it
> leaves those fields blank.
>
> If you use SB, then you control what gets put into the EXE in those fields. See
> attached.
> I guess it is better because you have more control. Anyway, I prefer the SB route.

Ah, yes. I have used my utility templates to do this for years and
years and got confused;) YOu can specify the description, but if I
remember correctly the name should be set to the compiled exe name.

Best regards,

--
Arnor Baldvinsson
Icetips Alta LLC