2009-03-04 22 views
0

Visual Basic 6.0 SP5 EXEプロジェクトの結果が.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が2台のマシンで同一であり、それらが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のインストーラが付属しています。そして、私はMSIインストーラを作成し、アプリを展開することを使用するC:\Program Files\Microsoft Visual Studio\COMMON\Tools\VSInst\BuildRes で発見され、既存のマージモジュールを介して抽出する必要があります。 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. 

は、インストーラを作成するには
関連する問題