Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / BD Pro exe Manifest - user account and run as admin

Author
Message
Ben_UK78
15
Years of Service
User Offline
Joined: 10th Jul 2010
Location:
Posted: 17th Jan 2013 10:22
Hi All,

I have written a progam that currently installs to the windows 7 '\program files(x86)\' folder.

The program creates some editable text files that store its configuration settings during startup and then changes them when you change settings in the program to reload them next time you run the program.

However, and but of course!, Windows is stopping the program creating the files due to administrator rights.

Is there a way to edit the manifest in the program exe to require the program to ask to run as an administrator?

The Anolis Resource Editor is showing that the manifest for the DBPro program file looks like this:

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

As I understand it:
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>

Needs to be:
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"></requestedExecutionLevel>

And that would sort out my problems, but I don't know how to change it and leave the file working afterwards. Can it be done in BBPro, or do I need an external program. (I haven't found documentation showing it can be done from in the Anolis Resource Editor).

Much Thanks

Ben
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 17th Jan 2013 13:07
create a file with dbpro that has a name like this:
your_executable_name.exe.manifest

and copy that text from above into that file

Ben_UK78
15
Years of Service
User Offline
Joined: 10th Jul 2010
Location:
Posted: 17th Jan 2013 15:26
OK, I must have done something wrong as that did nothing.

I thought an external manifest file had to be in XML? (I tried this beforehand using XML Notepad 2007 but it did nothing).
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 17th Jan 2013 15:47
Quote: "I thought an external manifest file had to be in XML?"

yes it has to be na xml file in the above mentioned format

If it doesn't work maybe it's overriden by dbpro's embedded one

Ben_UK78
15
Years of Service
User Offline
Joined: 10th Jul 2010
Location:
Posted: 17th Jan 2013 16:10
I suspect that is what is happening, which is frustrating if the case. I have tried an external one in XML format and it doesn't change anything.

Perhaps I will have to change the embedded manifest in the DB Pro application somehow..?
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 17th Jan 2013 16:58
Quote: "Perhaps I will have to change the embedded manifest in the DB Pro application somehow..? "

you can try but i don't know of any program that does that

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 17th Jan 2013 17:26
Perhaps a call out to Lee to confirm this? His blog thread might be a best bet to grab him

Or email him >_<

GIDustin
18
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 17th Jan 2013 18:03 Edited at: 17th Jan 2013 18:04
Had the same problem earlier. See the thread. We ended up using ResourceTuner to change the manifest.

http://forum.thegamecreators.com/?m=forum_view&t=193024&b=1
Ben_UK78
15
Years of Service
User Offline
Joined: 10th Jul 2010
Location:
Posted: 18th Jan 2013 00:29
Finally managed to do it. In the end I used Resource Hacker instead of Resource Tuner since it is freeware.

http://www.angusj.com/resourcehacker/

Thanks to all for your help.

Login to post a reply

Server time is: 2026-07-07 05:15:14
Your offset time is: 2026-07-07 05:15:14