2009-03-04 3 views
0

.EXE 파일을 만드는 Visual Basic 6.0 SP5 EXE 프로젝트가 있습니다. 이 프로젝트는 일부 맞춤 DLL을 참조합니다 (VB6 프로젝트로도 제작 됨).
이 EXE 및 DLL은 다른 컴퓨터에서 정상적으로 실행됩니다.VB6 프로젝트 EXE 파일이 실행되지 않는다

이제 EXE 소스 코드를 약간 변경했습니다. 이러한 변경 사항은 VB6 IDE에서 제대로 실행됩니다. 그런 다음 Make를 실행하여 EXE 파일을 만듭니다. 생성 된 EXE 파일은 내 컴퓨터에서 정상적으로 실행됩니다. 그런 다음 EXE 파일을 다른 컴퓨터에 복사하고 원본 파일을 덮어 쓰고 실행하면 아무 일도 일어나지 않습니다. 내가 말할 수있는 한 EXE가 시작되지 않으며 작업 관리자에 작업이 표시되지 않습니다.

여기에서 무슨 일이 일어나고 있는지 잘 모르겠습니다. 아무도이 동작을 보지 못했고 여기서 어떤 일이 벌어지고 있는지 알 수 있습니까?

답변

2

종속성이있는 DLL을 수정 했습니까? 사용자 정의 DLL을 복사 해보십시오.

0

해당 DLL 또는 EXE에 COM 개체를 등록하려면 REGSVR32을 실행해야합니다. (VS IDE가 자동으로이 작업을 수행합니다.)

1

사용자 지정 DLL이 두 시스템에서 동일하고 이들이 regsvr32으로 등록되어 있는지 확인하는 것이 좋습니다. 그렇지 않은 경우 오류 메시지가 나타나거나 설명하는 것보다는 프로그램에서 오류가 발생해야합니다.

프로젝트 설정에 따라 시작 프로 시저 - Sub Main() 또는 기본 폼의 Form_Load() 이벤트에서 코드를 확인하십시오. 오류가 발생하면 프로그램을 종료하지 않는지 확인하십시오.

(Valentin Galea의 this answer에 기반하여 손상된 데이터베이스 파일에서 VB6 응용 프로그램을 진단하는 데 도움이되는 모든 이벤트 뷰어 메시지를 확인하십시오.

시작 절차에 로깅 메시지를 추가하십시오. 네이티브 VB6 App.LogEvent 메서드가 유용 할 수 있습니다. 프로그램의 첫 행이 로깅 문인지 확인하십시오. 그러면 프로그램이 시작되는지 여부를 확인할 수 있습니다. 시작 절차에 오류 처리기가있는 경우 다른 작업을 수행하기 전에 오류 세부 정보를 기록하는지 확인하십시오.

1

나는 이벤트 뷰어에서 원인을 찾는 것에 대한 조언을 확실히 따릅니다. 하지만 적절한 배포 방법을 필요로한다고 생각합니다.

처음에는 service pack 6 for VB6을 설치하므로 최신 버전을 사용할 수 있습니다. 그러면 적절한 msi 설치 프로그램을 만들 것입니다.

당신이 필요합니다 이렇게하려면 다음을 수행

Visual studio installer 1.1 from MS을.

Merge modules for VB6 SP6.

Visual Studio 설치 관리자와 함께 제공되는 기존 병합 모듈을 통해 병합 모듈을 추출해야하며 C:\Program Files\Microsoft Visual Studio\COMMON\Tools\VSInst\BuildRes 에 있습니다. 그러면 msi 설치 프로그램을 만들고이를 사용하여 응용 프로그램을 배포합니다. DLL을 등록하여 종속성이 설치되어 있는지 확인합니다.

1) Open visual studio installer 
2) Pick the VB Installer package type in the wizard 
3) Change the name to the name of your project 
4) Change the location to where you want the installer package to be created (I typically create a folder under the project called Install) 
5) Choose create Installer, not merge module (unless you want to package up dependencies for a subproject) 
6) Pick the existing VB project to deploy 
7) Under Files on right add any other files that aren't straight dependencies (documentation or other related files) 
8) Under Build Menu -> Build Configuration change it to release. 
9) Click File System, then Application Folder, change the default install folder to be <company name>\<app Name> 
10) Right click and Delete unneeded/bad dependencies. For example MDAC.msm doesn't normally need to be deployed by the app. 
11) Change ActiveX dlls to be self register in properties. 
12) Under File System, User's Start Menu - Add folder hierarchy User's Start Menu -> Programs -> <company name> -> <app name> 
13) Drag system created shortcut to app from User's Start Menu to the App Name folder. Rename as appropriate. 
14) Add shortcut to user's desktop folder if desired 
15) Add any other file shortcuts (say to documentation) in the App Name folder or user's desktop 
16) Under User Interface, click all the leaf nodes (like the welcome screen) and change the banner bitmap if you have one. 
17) Configure Project Properties as appropriate (I fill in support information and update version number) 

Build -> Build 

THe msi file will be created in a subfolder of the install folder. 
Whenever you make a new exe you just open the existing visual studio installer project and choose build->build. It will create a new msi for you. 
:

는 설치 프로그램을 만들려면
관련 문제