2016-03-25 10 views
0

Ich erstelle ein Installationsprogramm mit Skriptdatei. Ich bin mit folgendem Befehl:Fehler erhalten: Fehlende erforderliche Befehlszeilenargumente: -ism <ISM file>

C:\windows\system32\cscript.exe "%WSR%\InstallShield\BuildInstalls.vbs" -ism "C:\InstallShield\Windows\xyz.ism" -verbose Build -version 1.1.1 -skipcopy -Platform Win32 -web 

Aber ich bin immer folgende Fehlermeldung:

Microsoft (R) Windows Script Host Version 5.8 Copyright (C) Microsoft Corporation. All rights reserved.

Setup Output Log File: InstallShield\BuildInstalls.vbs_3_25_2016_13_3.out
InstallBuild ERROR: Missing Required Command Line Arguments: -ism

ISM-Datei ist auch am richtigen Ort und alle Parameter korrekt sind. Aber trotzdem bekomme ich diesen Fehler. Also wo mache ich den Fehler?

+0

Zeigen Sie das tatsächliche Skript, insbesondere den Teil, der den Fehler verursacht. Wenn es sich um ein langes Skript handelt, reduzieren Sie es auf ein kleineres Beispiel, das das Problem noch immer veranschaulicht. –

Antwort

0

Wenn Ihr BuildInstalls.vbs behandelt seine Parameter von der Kommandozeile unter Verwendung von Standard Arguments Property (WScript Object) und seine minderwertigen Sammlungen WshUnnamed Object und WshNamed object, dann per Working with Command-Line Arguments Artikel:

The WshNamed filtered collection contains the two named arguments. Named arguments are arguments that consist of two parts: a name and a value. The name must be prefaced with a forward slash, and a colon must separate the name from the value. The slash prefix and the colon separator are fixed and cannot be changed. For example, you cannot use a hyphen in place of the slash; the following command will not pass Server as a named argument; instead, it will treat -Server:atl-dc-01 as the value of a single unnamed argument

Daher /ism:"C:\InstallShield\Windows\xyz.ism" Parameter verwenden.

Wenn BuildInstalls.vbs nicht Ihre eigene Arbeit ist, vielleicht akzeptiert es /help, /H, /? oder ähnliche Option?