• Welcome to Theos PowerBasic Museum 2017.

Manifest for Windows 7

Started by Paul Yuen, October 05, 2015, 12:29:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Paul Yuen

Hi 

Can someone provide me with a Manifest for Windows 7 ?

I got an example manifest  from
http://www.samlogic.net/articles/manifest.htm
but it didn't do much good as compare to the common xptheme.xml  manifest.


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
    version="9.0.0.0"
    processorArchitecture="x86"
    name="VI.EXE"
    type="win32"
/>
<description>SamLogic VI Editor</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
        <requestedPrivileges>
            <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
        </requestedPrivileges>
    </security>
</trustInfo>
</assembly>


Thank you and I appreciate your help

José Roca


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">

      <assemblyIdentity version="1.0.0.0"
         processorArchitecture="X86"
         name="ApplicationName"
         type="win32"/>
      <description>Optional description of your application</description>

      <!-- Compatibility section -->
      <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
         <application>
            <!--The ID below indicates application support for Windows Vista -->
            <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
            <!--The ID below indicates application support for Windows 7 -->
            <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
         </application>
       </compatibility>

      <!-- Trustinfo section -->
      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
         <security>
            <requestedPrivileges>
               <requestedExecutionLevel
                  level="asInvoker"
                  uiAccess="false"/>
               </requestedPrivileges>
         </security>
      </trustInfo>

      <dependency>
         <dependentAssembly>
            <assemblyIdentity
               type="win32"
               name="Microsoft.Windows.Common-Controls"
               version="6.0.0.0"
               processorArchitecture="X86"
               publicKeyToken="6595b64144ccf1df"
               language="*" />
         </dependentAssembly>
      </dependency>

   </assembly>


José Roca

This one also adds support for Windows 8.0 and 8.1.


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">

      <assemblyIdentity version="1.0.0.0"
         processorArchitecture="X86"
         name="ApplicationName"
         type="win32"/>
      <description>Optional description of your application</description>

      <asmv3:application>
         <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2011/WindowsSettings">
            <dpiAware>true</dpiAware>
         </asmv3:windowsSettings>
      </asmv3:application>

      <!-- Compatibility section -->
      <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
         <application>
            <!--The ID below indicates application support for Windows Vista -->
            <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
            <!--The ID below indicates application support for Windows 7 -->
            <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
            <!--This Id value indicates the application supports Windows 8 functionality-->
            <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
            <!--This Id value indicates the application supports Windows 8.1 functionality-->
            <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
         </application>
       </compatibility>

      <!-- Trustinfo section -->
      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
         <security>
            <requestedPrivileges>
               <requestedExecutionLevel
                  level="asInvoker"
                  uiAccess="false"/>
               </requestedPrivileges>
         </security>
      </trustInfo>

      <dependency>
         <dependentAssembly>
            <assemblyIdentity
               type="win32"
               name="Microsoft.Windows.Common-Controls"
               version="6.0.0.0"
               processorArchitecture="X86"
               publicKeyToken="6595b64144ccf1df"
               language="*" />
         </dependentAssembly>
      </dependency>

   </assembly>


Paul Yuen


Pierre Bellisle

And if you want to add support for Windows 10...

            <!--This Id value indicates the application supports Windows 10 functionality-->
            <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>

Paul Yuen

Many thanks Pierre

Hearing so much bad security news about Windows 10, I  won't want to migrate to win 10 until the issues are fixed.  LOL

Paul Yuen

Hi Pierre

I just found your Microsoft Windows Version Helper functions which is located at
https://powerbasic.com/support/pbforums/showthread.php?t=59760

From this link, Can I use your WinVerManifest.rc  and  then compile as WinVerManifest.res and subsequently incorporate
into my codes ?  Is this better than having just  win7theme.xml  ?

So far I have tested this WinVerManifest.res in 12 of my PB programs and they work just fine at least in Win 7 . 
I haven't test them on Win 8 yet.

Pierre Bellisle

Hi Paul,

Some prefer xml files, other prefer in a resource.
Either way give the same result, it's more a matter of what way you like the most.  :-)

On my part I did test with success on many OSs, including Vista, 7, 8, 8.1, and 10.

This said, even if Microsoft do not recommend it,
GetVersionEx still work without a glitch with everything
as long as you have declared an up to date "supportedOS Id" section.

Pierre

Paul Yuen

Many Thanks Pierre,  I will be using the resource file as it is easier