#1
|
|||
|
|||
why do i keep getting this
this still deals with getting the following error each time i build. this did not start happening until yesterday.
--------------------Starting Build: '422build.bld'-------------------- Building project step 'mlsall Project'... Process completed with exit code 128 Building project step 'Copy files to InstallShield'... also is there a way to check if a certain exe or dll's exist if they do not then fail? |
#2
|
|||
|
|||
The following JScript function does the trick:
function FileExists (filename) { var fso = new ActiveXObject("Scripting.FileSystemObject"); return fso.FileExists(filename); } The VBScript version would be similar, but I don't have an example of it. One way to use the it is to put something like the following in a script step: if (! FileExists ("filePath\\fileName")) throw "failure" Note that the path seperator '\' needs to be quoted in JScript strings. This can be a real trap if you have the file name in a macro and do this: "%FileName%" where %FileName% = filePath\fileName the result is: "fileNamefilePath" |
#3
|
|||
|
|||
if i have a variable (FIRSTVAR) already set can I have the program "look" into the directory (DIRVAR) and if the FIRSTVAR exists then continue if not stop and throw an error?
|
#4
|
|||
|
|||
put something like the following in a script step:
if (! FileExists (Application.FindMacro ("DIRVAR").Value + "\\" + Application.FindMacro ("FIRSTVAR").Value)) throw "failure" The Application.FindMacro bit avoids the \ problem. Note that this assumes that you are using JScript. Something similar works for VBScript but the throw becomes: Err.Raise 1, Step.Name, "Forcing build failure..." |
|
|