How to create a Windows can run top of Metro UI under windows8c

Steps:

http://social.msdn.microsoft.com/Forums/en-US/toolsforwinapps/thread/8529357f-3ff8-4c83-baaf-5215ca9cc14a

  1. Create new Win32 Project
  2. Finish the wizard with no changes
  3. Change the CreateWindow call to CreateWindowEx and set WS_EX_TOPMOST
  4. Go to Project.Properties... Linker.Manifest File
  5. Change UAC Bypass UI Protection to: Yes (/uiAccess='true')
  6. Build
  7. Use signtool to sign the test app
  8. Copy the test app into Program Files
  9. Run test app
  10. Bring up the Start screen -> test app is on top 
  1. The application must demand uiAccess (app.manifest)
  2. The application must assert “topmost” window positioning (either in Win32/SetWindowPos or WinForms/WPF’s “Topmost” property, programmatically or otherwise)
  3. Without making changes to the group policy setting, it must be installed to some trusted location [C:\Windows, C:\Program Files, C:\Program Files (x86)].
    1. Note: If you want to be able to run it out of an arbitrary location, you must disable the security setting: “User Account Control: Only elevate UIAccess applications that are installed in secure locations”.
    2. Note2: This is the same as setting HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\ValidateAdminCodeSignatures to 0
  4. Said application cannot be ran in the debugger
  5. If it’s a .NET application
    1. The manifest must be embedded in a post-build step
    2. The application must have “delayed signing” (meaning it cannot be ran from the built-in debugger, although you can build and attach – this is what Microsoft does)
  6. The application must be signed with a trusted certificate.
  7. Said trusted certificate must be installed to the Trusted Root Certificate Authority (this is important! It must not just simply installed)

If you met the error"A referral was returned from the server", you could resolve it by this way:

1) Open an elevated command prompt

- Click start
- Find Cmd Shell or command prompt
- Right-click, click Run As Administrator

2) Create a trusted root certificate

- Browse to the folder that you wish to contain a copy of the certificate
- In the command shell, execute the following commands:

    makecert -r -pe -n "CN=Test Certificate - For Internal Use Only" -ss PrivateCertStore testcert.cer

    certmgr.exe -add testcert.cer -s -r localMachine root

3) Sign your file

- In the command shell, browse to the location of your exe
- In the command shell, type:

SignTool sign /v /s PrivateCertStore /n "Test Certificate - For Internal Use Only" /t http://timestamp.verisign.com/scripts/timestamp.dll APP.exe

Where APP.exe is your application.



  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值