Jump to content

Changes I Made - Improvements


Recommended Posts

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";

Link to comment
Share on other sites


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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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