前提是没有administor权限的用户,
运行才报错。

解决方案 »

  1.   

    没用过vista,不过你提的问题可能很难让人回吧,因为问题太模糊了,至少应有部分源码吧
      

  2.   

    问题并没有很模糊,也不需要我贴源码。
    因为这个错误是这个程序还没启动,就被windows vista给截下来了。
    跟vista的权限管理有必然关系,因为采用adminstrator角色,就都OK.
      

  3.   

    D7的程序在vista下需要以管理员身份运行,右键点击程序,弹出菜单中有此选项,用2007吧,2007编译的程序可以直接运行
      

  4.   

    呵呵,是的,不管是什么程序,好像都有这问题.微软越管越紧了.好像点中左MOUSE键按菜单中某一个按钮(记得是以后按Administrator方式运行).以后运行就不需要再确认了.
      

  5.   

    据说添加manifest可以解决这个问题
      

  6.   

    你說的xp manifest應該是form顯示風格的調整。
    在vista以下的平臺上開發的應用程序要加的manifest是類似這樣的:<?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="IsUserAdmin" type="win32"/>   <description>Application to dump user token</description>    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
            <security>
                <requestedPrivileges>
                    <requestedExecutionLevel level="requireAdministrator"/>
          </requestedPrivileges>
            </security>
       </trustInfo>
     
    </assembly>
    具體用法你自己搜索吧,網上多的是