ユーザーが必要に応じてツールバーをインストールできるように、インストーラーに合わせてカスタム スクリプトを作成しています。レイアウトは次のようになります。
http://i47.tinypic.com/2v92csl.png
それに付随するコード:
' Set Executable
Set WshShell = CreateObject("WScript.Shell")
' Set booleans for what features to enabled/disable
Dim Feature1 As Boolean
Dim Feature2 As Boolean
Dim Feature3 As Boolean
Dim Feature4 As Boolean
Feature1 = False
Feature2 = False
Feature3 = False
Feature4 = False
If Session.Property("RADIO") = "RadioFeatureA" Then
Feature1 = True
Feature2 = False
ElseIf Session.Property("RADIO") = "RadioFeatureB" Then
Feature2 = True
Feature1 = False
End If
' Set the checkbox1 feature if ticked
If Session.Property("CHECK1") = "install" Then
Feature3 = True
Else
Feature3 = False
End If
' Set the checkbox2 feature if ticked
If Session.Property("CHECK2") = "install" Then
Feature4 = True
Else
Feature4 = False
End If
' Execute the file
If Feature1 = True Then
WshShell.Run (""APPDIR\file.exe"" /SILENT /INSTALL)
ElseIf Feature2 = True And Feature3 = True Then
WshShell.Run (""APPDIR\file.exe"" /SILENT)
ElseIf Feature2 = True And Feature4 = True Then
WshShell.Run (""APPDIR\file.exe"" /SILENT)
ElseIf Feature2 = True And Feature3 = True And Feature4 = True Then
WshShell.Run (""APPDIR\file.exe"" /SILENT /INSTALL)
End If
しかし、何らかの理由でインストーラーがクラッシュします。コードは私には問題なく見え、外部で実行されますか?