• Before proceeding with the installation process below, create a zero-byte file in C:\Windows called MSJAVA.DLL. The setup process will look for this file, and if it doesn't find it, will force an installation of old, old Java, and require a reboot. By creating the zero-byte file, the installation of moldy Java is bypassed, and no reboot will be required. Turn off UAC.
  • Insert Visual Studio 6 CD.
  • Exit from the Autorun setup.
  • Browse to the root folder of the VS6 CD.
  • Right-click SETUP.EXE, select Run As Administrator.
  • On this and other Program Compatibility Assistant warnings, click Run Program.
  • Click Next.
  • Click "I accept agreement", then Next.
  • Enter name and company information, click Next.
  • Select Custom Setup, click Next.
  • Click Continue, then Ok.
  • Setup will "think to itself" for about 2 minutes. Processing can be verified by starting Task Manager, and checking the CPU usage of ACMSETUP.EXE.
  • On the options list, select the following:
    • Microsoft Visual Basic 6.0
    • ActiveX
    • Data Access
    • Graphics
    • All other options should be unchecked.
  • Click Continue, setup will continue.
  • Finally, a successful completion dialog will appear, at which click Ok. At this point, Visual Basic 6 is installed.
  • If you do not have the MSDN CD, clear the checkbox on the next dialog, and click next. You'll be warned of the lack of MSDN, but just click Yes to accept.
  • Click Next to skip the installation of Installshield. This is a really old version you don't want anyway.
  • Click Next again to skip the installation of BackOffice, VSS, and SNA Server. Not needed!
  • On the next dialog, clear the checkbox for "Register Now", and click Finish.
  • The wizard will exit, and you're done. You can find VB6 under Start, All Programs, Microsoft Visual Studio 6. Enjoy!
  •  

     

    --설치이후--


    1.vb6.exe를 찾아 속성에서 관리자 권한으로 실행 체크

    2.sp6만 설치해도 된다.



    --오류--

     

    1.개체 라이브러리가 등록되지 않았습니다. 라고 뜰때

    patch.bat

    다운로드 후 실행


    2.컴파일했을때 실행파일이 XP에서 구동되지 않는다면

    ado.zip

    다운로드 후 progrom files\common\system\ado 에 덮어씌우기


    3.MSCOMCTL.OCX 가 등록해도 제대로 작동되지 않는다면

    vbp파일을 메모장으로 열어 버전을 2.1 -> 2.0으로 바꾸고 저장

    제    목  : [Vista] Admin 권한으로 실행되는 프로그램 만들기 (VB6)
    작 성 일  : 2007년 03월 14일
    작 성 자  : 제용재 (182cm@korea.com)
    개발환경  : Visual Basic 6.0
    분    류  : Development -> Visual Basic
    키 워 드  : Visual Basic, Vista, UAC, rc.exe, mt.exe
    요    약  : Admin 계정으로 로그인했더라도 프로그램을 실행시키면 일반 사용자 권한으로 프로그램이 실행된다.
                Admin 권한으로 실행 시키기 위해서는 "관리자 권한으로 실행"을 이용하거나 권한 관련 속성 정보를 변경해야만 한다.



    Vista에서는 UAC(User Account Control, 사용자 계정 관리) 기능을 통해 프로그램 실행에 대한 권한을 강화했는데, 일반 사용자 권한으로 실행되는 프로그램에서는 시스템 폴더, Program Files 폴더, 레지스트리 제어 등에 있어 많은 제약이 따르게된다.

    UAC 기능을 고려하지 않은 프로그램을 Admin 권한으로 실행하는 방법은 다음과 같다.

        1. Vista 제어판을 통해 UAC 기능을 중지 시킨다. (비추)
            - UAC 기능이 불편함을 초래할 수는 있으나, 사용자 모르게 임의로 실행되는 악성
              프로그램 등으로부터 보호하는 기능을 가지고 있으므로 가급적 사용을 권장한다.
        2. 실행 파일에서 오른쪽 버튼 클릭 후 "관리자 권한으로 실행" 메뉴 선택
            - 경우에 따라 Admin 권한을 부여하기 위한 일회성 방법이다.
            - "사용자 계정 컨트롤"의 권한 상승 화면을 거쳐야 한다.
        3. 실행 파일의 속성->호환성 탭에서 "관리자 권한으로 이 프로그램 실행" 체크
            - 속성 변경 후에는 자동으로 Admin 권한으로 실행된다.
            - "사용자 계정 컨트롤"의 권한 상승 화면을 거쳐야 한다.
            - 파일명을 변경하거나 위치(폴더)를 이동하는 경우, "권한 수준" 내용을 초기화 된다.

     
    Vista에서 Admin 권한으로 실행되는 프로그램을 만들기 위해서는 manifest 파일을 리소스에 포함시키면 되는데 VB6의 리소스 편집기에서는 manifest 리소스 관리를 지원하지 않으므로 [1]VS6의 rc.exe 프로그램을 이용해서 리소스 파일을 만들고 이 리소스 파일을 포함해서 컴파일한다. 또는 [2]VS2005의 mt.exe를 이용해서 이미 컴파일 된 프로그램에 manifest 정보를 추가한다.

    [1] manifest 리소스 정보를 포함해서 컴파일하는 방법

    1) manifest 파일 만들기
        - 다음의 내용을 텍스트 파일로 저장한다. (파일명 : "app_name.exe.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="AdminApp"
         type="win32"/>

      <description>Description of your application</description>
      <!-- Identify the application security requirements. -->
      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
          <requestedPrivileges>
            <requestedExecutionLevel
              level="requireAdministrator"
              uiAccess="false"/>

            </requestedPrivileges>
           </security>
      </trustInfo>
    </assembly>


    2) ResourceScript 파일 만들기
        - 다음의 내용을 텍스트 파일로 저장한다. (파일명 : ResourceScript.rc)
    #define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
    #define RT_MANIFEST                     24
    CREATEPROCESS_MANIFEST_RESOURCE_ID   RT_MANIFEST    "app_name.exe.manifest"


    3) rc.exe 를 이용한 리소스 파일 만들기
        - 도스창에서 다음의 명령을 입력해서 리소스 파일을 만든다.
        - "c:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\" 폴더에 있다.
    "RC.EXE" /r /fo app_name.res ResourceScript.rc


    4) VB 프로젝트에 리소스 파일 추가
       - VB에서 프로젝트->파일 추가 메뉴를 통해 3)에서 만든 리소스 파일(app_name.res)을 프로젝트 리소스 파일로 등록한다.

    5) 프로젝트 컴파일

    6) Vista의 UAC 사용 환경에서 테스트


    [2] VS 2005의 mt.exe를 이용하는 방법

    1) Admin 권한 부여를 위한 프로그램(EXE) 준비

    2) manifest 파일 만들기 ([1]과 동일)

    3) 실행 파일에 manifest 정보 추가하기

    mt -manifest app_name.exe.manifest -outputresource:app_name.exe;#1


    4) Vista의 UAC 사용 환경에서 테스트


    ※ manifest 적용 후에는 다음 그림처럼 방패 모양이 추가되는 것을 볼 수 있다. (Vista에서 확인 가능)
    사용자 삽입 이미지사용자 삽입 이미지


    ※ manifest 적용 및 테스트를 위한 예제 프로젝트


    vb_vista_exe_admin.zip




    ☞ 본문 출처 : http://www.enjoydev.com/blog/107(새 창으로 열기) 



    + Recent posts