I'm having a problem with good ol' bdeadmin.exe in Vista. First, let's get the predictable responses out of the way:
"You should not require your application to be elevated."
This one does. C'est la vie.
"You need to embed a manifest file."
It is already compiled, it is many years old, the company that created it has no intention of doing it again, and it is installed from a Merge Module (MSM file).
"BDE is obsolete, you should be using dbExpress"
One and a half million lines of code. 'Nuff said.
"Drop a manifest file next to the EXE."
Tried that, did nothing. As a test, that same manifest file was able to make several other EXE files require elevation, just not the one I wanted. Something in there is preventing the external manifest from being read.
"Create a shortcut and set SLDF_RUNAS_USER."
Can't do that, it's a Control Panel applet.
The only thing that worked was setting "Run this program as an administrator" under the Compatibility tab of its Properties window. I shouldn't have to tell users to do this. Bad for business. I need to have the installer do this. The MSM file uses a static path.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…