Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Activating Vista elevation prompt
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
OS:
Vista
Miscellaneous
Thread ID:
01189901
Message ID:
01196904
Views:
12
Mathias,

I managed to get rid of the error message by fixing a typo in the file name of the manifest XML. However, after processed by MT.EXE, a VFP EXE of several hundred bytes shrinks down to about only 10k bytes. When the EXE runs, a VFP dialogue comes up and asks for a .FXP program file to continue.

I tried processing BC2.EXE (program file of Beyond Compare 2, not VFP program) with MT.EXE. After then, BC2.EXE shrank down from 3067KB to 3066KB. When it is double-clicked and launched in Vista, no elevation prompt is shown. (I expect after embedding the manifest, when the program starts, elevation prompt will be shown and admin right will be got.)

Do I miss anything?

Ben


>Mathias,
>
>Thanks for your explanation. Daniel Moth's blog shows the following syntax:
>"$(DevEnvDir)..\..\Common7\Tools\Bin\mt.exe" -manifest "$(ProjectDir)$(TargetName).exe.manifest" –outputresource:"$(TargetDir)$(TargetFileName)";#1
>However, I was not successful in adding the manifest.
>
>Suppose the EXE file of my VFP application is "F:\Tmp\MyApp.exe" and I am going to use "C:\Program Files\VS8\SDK\v2.0\Bin\mt.exe" for the job.
>
>I tried the following command:
>
>"C:\Program Files\VS8\SDK\v2.0\Bin\mt.exe" -manifest "F:\Tmp\MyApp.exe.manifest" -outputresource:"f:\Tmp\App.exe";#1
>
>
>and got the following message:
>f:\tmp\MyApp.exe.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
>
>Grateful if you would help.
>
>Ben
>
>
>>Ben,
>>
>>It's not related to .Net (though I admit - Microsoft present it as if it were). The whole UAC thing is "Un managed".
>>
>>Vista has all the relavant runtimes it requires to enforce the new security. If the program is already out on the client machine, then you would need to upgrade it with one that has a manifest, or manifest it remotely (if you can).
>>
>>I admit the tool (mt.exe) appears to come with .NET tools but it's a standalone program.
>>
>>Hopefully I have answered the right question.
>>
>>Regards
>>
>>
>>
>>>Mathias,
>>>
>>>Thanks for your response. But how it can be done for a pure VFP applications in client computers without .NET framework installed.
>>>
>>>Ben
>>>
>>>
>>>>What you need is add a manifest to you executable.
>>>>
>>>>Daniel has a few sample on his blog: http://www.danielmoth.com/Blog
>>>>
>>>>Regards
>>>>
>>>>
>>>>>Does anybody know the code to activate the elevation prompt of Vista so that after a user confirmation click, our program can get the admin right to write files into restricted locations, e.g., the Program Files and Windows folders (not the VirtualStore folder)?
>>>>>
>>>>>I did an Internet search. Some say calling the ShellExecuteEx() API and supplying the "runas" verb as one of its parameters will do the trick. Would anybody provide help about the code?
>>>>>
>>>>>Ben
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform