0

Deploy-Application.exe というファイルを実行するインストーラーを作成する必要があります。Deploy-Application.exe は、次のようなパラメーターを取ります。

Deploy-Application.exe -DeploymentType "Uninstall"

それを設定ファイルに入れても、Sfxモジュールは私のパラメータが単に

-DeploymentType 

二重引用符のため。7-zip SFX モジュールの二重引用符の例外文字はありますか? あったら見つからない!

ここに私の設定ファイルがあります:

;!@Install@!UTF-8!
Title="test"
Progress="No"
ExecuteParameters="-DeploymentType "Uninstall""
RunProgram="Deploy-Application.exe"
;!@InstallEnd@!

編集: Deploy-Application.exe はパラメーターを引用符で囲む必要がないことがわかりました。次のように、cmdを介して実行してこれをテストしました:

Deploy-Application.exe -DeploymentType Uninstall

そしてそれはうまくいきました。ただし、次のような構成ファイルがある場合:

;!@Install@!UTF-8!
Title="test"
Progress="No"
ExecuteParameters="-DeploymentType Uninstall"
RunProgram="Deploy-Application.exe"
;!@InstallEnd@!

それでも機能しません。ProcessExplorer で確認したパラメーターは無視され、Deploy-Application.exe はパラメーターなしで起動します。

4

2 に答える 2

1

forwards \ を使用してそれらをエスケープします

そのようです

"\""  --> "
EG: ExecuteParameters="-DeploymentType \"Uninstall\""

参照

于 2015-08-12T22:45:24.063 に答える
1

まあ、それは引用符などとは何の関係もないことがわかりました。LZMA SDK に付属の installer.txt ドキュメントを 100 回読んだ後、「ExecuteParameters」は「RunProgram」では機能せず、「ExecuteFile」でのみ機能することに気付きました。

「プログラムの実行」のパラメーターの使用方法は次のとおりです。

RunProgram="notepad.exe"
RunProgram="C:\\Windows\\system32\\notepad.exe"
RunProgram="%Path%\\notepad.exe"
RunProgram="fm0:nowait:7z_EN.chm"
RunProgram="\"%%T\\Reader7Rus.msi\" /qn"
RunProgram="hidcon:fm0:\"%%S\\install.cmd\" /Q"

私が十分に注意深く読んでいないドキュメントから:

ID_String          Description 

Title              Title for messages 
BeginPrompt        Begin Prompt message 
Progress           Value can be "yes" or "no". Default value is "yes". 
RunProgram         Command for executing. Default value is "setup.exe". 
                   Substring %%T will be replaced with path to temporary 
                   folder, where files were extracted 
Directory          Directory prefix for "RunProgram". Default value is ".\\" 
ExecuteFile        Name of file for executing 
ExecuteParameters  Parameters for "ExecuteFile" 
于 2015-08-13T18:46:15.267 に答える