Jump to content

Recommended Posts

Posted

I found the FileExists function doesn't like the quotes around the filename so I moved the code which adds the quotes to after the FileExists check within installer.js e.g.:

if (cmdLine.indexOf(" ") != -1 && cmdLine.substr(0,1) != '"')

cmdLine='"'+cmdLine+'"';

if (!FileExists(cmdLine))

{

programs.fail=true;

cmdName=(cmdName=='regb') ? 'Reg Before' : (cmdName=='rega') ? 'Reg After' : cmdName;

WriteLogLine(cmdName+' '+result+' (returned code '+ReturnCode+'): RegEdit /S "'+cmdLine+'"');

return;

}

became:

if (!FileExists(cmdLine))

{

programs.fail=true;

cmdName=(cmdName=='regb') ? 'Reg Before' : (cmdName=='rega') ? 'Reg After' : cmdName;

WriteLogLine(cmdName+' '+result+' (returned code '+ReturnCode+'): RegEdit /S "'+cmdLine+'"');

return;

}

if (cmdLine.indexOf(" ") != -1 && cmdLine.substr(0,1) != '"')

cmdLine='"'+cmdLine+'"';

I also made the following change in core.js to remove the security prompt that occurs everytime sleep.exe is called:

sleepCmd=wpipath+"Tools\\Sleep.exe";

became:

sleepCmd="cmd /c "+wpipath+"Tools\\Sleep.exe";


Posted

Looked at your code some more. That is an older version of the code. Between Dje and I we have worked out pretty much all the issues with quotes and args. Attached is the latest official version. Just replace your curent one with this one.

Posted

Ok, but the installer will not work now it says "programs" undefined now. and before that the execute before and after will not work.

any thoughts?

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...