Help - Search - Members - Calendar
Full Version: Bug in InstallOne or FileExists
MSFN Forums > Member Contributed Projects > Windows Post-Install Wizard (WPI)

   
Google Internet Forums Unattended CD/DVD Guide
AlBundy33
With this from code.js no batch-files with arguments (e.g. "drive:\a\folder\test.cmd" MyArgument) will be found:
CODE
    if (cmd.toUpperCase().indexOf(".CMD") != -1 || cmd.toUpperCase().indexOf(".BAT") != -1)
    {
        if (!FileExists(cmdLine))
        {
            NumFailed++;
            result=getText(InstallFail);
            SuccessFail=false;
            WriteLogLine(cmdName+' '+getText(FailFileDoesNotExist)+': '+cmdLine);

            return false;
        }
    }


Al
mritter
Good catch, Al.

CODE
    if (cmdLine.toUpperCase().indexOf(".CMD") != -1 || cmdLine.toUpperCase().indexOf(".BAT") != -1)
    {
        var splits=[];

        if (cmdLine.substr(0,1)=='"')
        {
            splits=cmdLine.split('" ');
            splits[0]+='"';
        }
        else
            splits=cmdLine.split(' ');
        if (!FileExists(splits[0]))
        {
            NumFailed++;
            result=getText(InstallFail);
            SuccessFail=false;
            WriteLogLine(cmdName+' '+getText(FailFileDoesNotExist)+': '+cmdLine);

            return false;
        }
    }


Will also be updated in main download archive.
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.