PDA

View Full Version : Run As Administrator



NewsArchive
12-12-2009, 02:18 AM
Ive seen posts in the other groups to use SB to run an EXE as administrator.
How do I set that up in SB?
I have an exe that I need to run as administrator

Thanks

--
Eric Jacobowitz
www.castlecomputer.com
www.cctsoftware.com

NewsArchive
12-12-2009, 02:19 AM
For Vista and Windows 7, use a requireAdministrator manifest.
For XP and earlier, you'll need some other way of verifying that the user is
an administrator.

Jane

NewsArchive
12-12-2009, 02:19 AM
This is for Vista/win 7 - don't have a problem on xp

Where is the RequireAdministrator manifest?

--
Eric Jacobowitz
www.castlecomputer.com
www.cctsoftware.com

NewsArchive
12-12-2009, 02:20 AM
SetupBuilder can insert one for you using the "#embed UAC manifest" compiler
directive.

To save yourself some heartache, I'd suggest you read through the sections
on manifests and code-signing in the "Learning SetupBuilder Part 1" help
file that installs with the example files.

Jane

NewsArchive
12-12-2009, 02:20 AM
Jane - I have requireAdministrator on the Generator Settings tab and install
still will not load. Do I still need to add the #embed UAC manifest
directive? I am issusing a RUN command in my app from a client which trying
to load the install from server. I do not receive any messages, errors,
etc. Install just does not load. I even have the User Account Access level
set to 'Never notify' on the client.

Dee

NewsArchive
12-12-2009, 02:21 AM
You cannot "run" an elevated app from a regular (asInvoker) app.
You need to use ShellExecute.

If you have a clarionmag subscription, I did a little app to demonstrate
that a few years back:
http://www.clarionmag.com/cmag/v9/v9n04vista2b.html

Jane Fleming

NewsArchive
12-12-2009, 02:22 AM
Jane - I added a stop and I am getting the FileNot Found error so it doesn't
look like it is a manifest issue. Thanks.

Dee Witham

NewsArchive
12-12-2009, 02:23 AM
Jane - is this requireAdministrator manifest in the Generator Settings tab
of General Information or is it the #embed UAC manifest directive?

Dee

NewsArchive
12-12-2009, 02:23 AM
Sorry - please ignore - you already answered this. Thanks, Dee

NewsArchive
12-12-2009, 02:24 AM
As you see, Dee, they're two separate things - manifest and code-signing for
the installer itself and for any of the application(s) you're installing.

Being a neanderthal, I still manifest and code-sign my Clarion apps at
link-time, and just adjust the manifest/code-signing for the installer
itself in SB. But for most people, probably more convenient to have SB do
everything.

Jane