Belding
New Member

Posts: 8
Offline
|
 |
« on: September 13, 2011, 04:03:40 pm » |
|
Hello... I user RT to open a program made in Delphi 2010. I add a manifest requiring the program to have admin privileges in Vista and W7. The program is saved and the resource it has is reported below in RT.
I log onto W7 as a Std user (no admin privileges) and run th eprogram. It runs and fails at the place where it tries to perform operations requiring admin privileges.
I thought having the manifest below would cause the program not to execute. Any insights?
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator" uiAccess="False"/> </requestedPrivileges> </security> </trustInfo> <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> <application> <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> </application> </compatibility> </assembly>
|
|
|
|
|
TechMan
Heaventools
Support
  
Posts: 221
Location: On Air
Offline
|
 |
« Reply #1 on: September 13, 2011, 04:21:40 pm » |
|
I thought having the manifest below would cause the program not to execute. Any insights?
There is some persistent cache in Vista/W7 that affects UAC info based on an exe's timestamp. Actually, there are two caches. The first, based on the executable's timestamp, determines whether Windows should bother to check for the existence of a manifest (i.e. if you add a manifest, update the exe timestamp). The second is for the contents of the manifest, keyed off the timestamp of the manifest (which might be the same as for the exe if it's embedded).
|
TechMan Robot Heaventools Software
|
|
|
Belding
New Member

Posts: 8
Offline
|
 |
« Reply #2 on: September 13, 2011, 04:45:46 pm » |
|
Thanks for a reply. When RT save the exe file after I add the manifest, the files timestamp is altered to the time of saving. So it is updated. When I run the exe under the account of a STD (no admin privileges) user the program runs and fails. Does this mean the manifest inserted by RT is not working?
|
|
|
|
|
|
|
Belding
New Member

Posts: 8
Offline
|
 |
« Reply #4 on: September 13, 2011, 05:11:19 pm » |
|
I am not using Vista I am using W7 (64). Does this change your advice? Thanks, Russell
|
|
|
|
|
TechMan
Heaventools
Support
  
Posts: 221
Location: On Air
Offline
|
 |
« Reply #5 on: September 13, 2011, 05:21:36 pm » |
|
AFAIK, it doesn't matter whether it's Vista or W7. You have to clear the cache. Reboot and/or change the filename. The manifest inserted by RT IS working. It's too simple not to work 
|
TechMan Robot Heaventools Software
|
|
|
Belding
New Member

Posts: 8
Offline
|
 |
« Reply #6 on: September 13, 2011, 05:25:04 pm » |
|
I will change the file name and try again. If that does not work I will reboot and try again. Thanks
|
|
|
|
|
Belding
New Member

Posts: 8
Offline
|
 |
« Reply #7 on: September 13, 2011, 05:36:28 pm » |
|
I changed myProg.exe to myProg2.exe. Same result: I switched users to an account with STD privileges and the program ran and failed. W7 (64) I rebooted the machine. Same result.
Want a copy of the program to test? Its zipped sixe is 430kb. Thanks, Russell
|
|
|
|
|
TechMan
Heaventools
Support
  
Posts: 221
Location: On Air
Offline
|
 |
« Reply #8 on: September 13, 2011, 05:52:12 pm » |
|
Not really I think the standard 32-bit notepad.exe is the best candidate for this test.
|
TechMan Robot Heaventools Software
|
|
|
Belding
New Member

Posts: 8
Offline
|
 |
« Reply #9 on: September 13, 2011, 06:31:19 pm » |
|
Another test. I have been using W7(64).
I opened a W7(32) machine in the same workgroup and logged in with a Std account. I opened the folder on the W7(64) machine cotaining myProg.exe and tried to open it. I was asked for a password.
So it appear this unexpected behaviour is in Windows. Does this make sense to you?
Thanks for answering my comments. You have mre expertise than I do in this matter. Russell
|
|
|
|
|
Belding
New Member

Posts: 8
Offline
|
 |
« Reply #10 on: September 13, 2011, 06:47:01 pm » |
|
One more test. On a W7 (64) box (not the first one where myProg.exe lives) log on as another Std user. Open myprog.exe on the original W7(64) box. I am asked for an admin password, as expected.
Log on, still the 2nd box, as a user with admin privileges. Open myProg.exe from the original box. It runs OK.
Copy myprog.exe to the 2nd box. Log off and log on as a Std user. Ask myProg.exe to run. I am asked for a password, as expected.
Shall I guess? The problem is in Win 7, not RT. It will allow a user with a Std account to open a program which includes a manifest requiring admin privileges, under some conditions, such as the program has had the manifest insertd in that box.
Russell
|
|
|
|
|
TechMan
Heaventools
Support
  
Posts: 221
Location: On Air
Offline
|
 |
« Reply #11 on: September 13, 2011, 11:32:48 pm » |
|
The problem is in Win 7, not RT.
Exactly my point.
|
TechMan Robot Heaventools Software
|
|
|
Belding
New Member

Posts: 8
Offline
|
 |
« Reply #12 on: September 14, 2011, 02:09:20 am » |
|
The problem is unresolved and seems to be in the W7 box on which the program haf RT insert a manifest. No fault is attibutable to RT. Renaming the program and rebooting my machince did not clear the problem.
Thanks for your several comments. They have led me to sho the problem does not travel to another machine with the exe file.
Russell
|
|
|
|
|
|