Hello,
the VB6 IDE (VB6.exe) has issues when the UAC (Windows Vista and 7) is activated.
This may cause that opening .vbp files for example will fail.
To solve this it is just required to add a resource directly into the VB6.exe.
The source code of "RequireAdmin.res" is:
In the attachment I have added the same as a compiled resource.
Use a resource hacker to put the resource file directly into the VB6.exe.
I used following resource hacker for that job: http://www.angusj.com/resourcehacker/
(File -> Open ... VB6.exe -> Action -> Add a new Resource ...)
The result is now that every time the VB6.exe will be accessed it is ensured that the admin rights are on.
Opening .vbp files works therefore without any problems.
I have also attached another compiled resource file with visual styles included, just for those who want it too.
The source code of "VisualStylesAndRequireAdmin.res" is:
EDIT: Reason for this is that adding a manifest file into the VB6.exe directory won't work anymore in Windows 7.
the VB6 IDE (VB6.exe) has issues when the UAC (Windows Vista and 7) is activated.
This may cause that opening .vbp files for example will fail.
To solve this it is just required to add a resource directly into the VB6.exe.
The source code of "RequireAdmin.res" is:
Code:
<?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.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Use a resource hacker to put the resource file directly into the VB6.exe.
I used following resource hacker for that job: http://www.angusj.com/resourcehacker/
(File -> Open ... VB6.exe -> Action -> Add a new Resource ...)
The result is now that every time the VB6.exe will be accessed it is ensured that the admin rights are on.
Opening .vbp files works therefore without any problems.
I have also attached another compiled resource file with visual styles included, just for those who want it too.
The source code of "VisualStylesAndRequireAdmin.res" is:
Code:
<?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.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" language="*" processorArchitecture="*" publicKeyToken="6595b64144ccf1df"/>
</dependentAssembly>
</dependency>
</assembly>