else
else if (strcmp(cmdname, "markcfgversion") == 0) { char *xpiname	 = strtok(NULL, ",)"); char *filename = strtok(NULL, ",)"); char *versiontxt = strtok(NULL, ",)");    ExtractXPIFile(xpiname, filename);    MarkCFGVersion(filename, versiontxt);     }  else
int interpret(char *cmd){	char *cmdname = strtok(cmd, "(");	if (strcmp(cmdname, "configure") == 0)	{		char temp[1024];		char *section	= strtok(NULL, ",)");		char *key 		= strtok(NULL, ",)");		char *value 	= strtok(NULL, ",)");		char *newvalue	= value;		if (value[0] == '%')		{			value++;			char *t = strchr(value, '%');//Post Beta - we have to figure a way to handle these cases - right now returning FALSE//causes the other commands to not be carried through- changing return FALSE to TRUE			if (!t)				return TRUE;//*** Changed FALSE to TRUE			*t = '\0';			newvalue = (char *)(LPCTSTR) GetGlobal(value);		}		if (!section || !key || !newvalue)			return TRUE;//***Changed FALSE to TRUE		if (!CopyFile(iniSrcPath, iniDstPath, TRUE))			DWORD e = GetLastError();		if (strcmp(key, "Program Folder Name") == 0)		{			if (strcmp(newvalue, "") == 0)				strcpy(temp, "Netscape 6");			else				strcpy(temp, "Netscape 6 by ");			strcat(temp, newvalue);			newvalue = temp;		}		WritePrivateProfileString(section, key, newvalue, iniDstPath);	}	else if (strcmp(cmdname, "replaceXPI") == 0)	{		char *xpiname	= strtok(NULL, ",)");		char *jname		= strtok(NULL, ",)");		char *xpifile	= strtok(NULL, ",)");		char *value 	= strtok(NULL, ",)");		char *newvalue	= value;		CString jarname = jname;		if (value[0] == '%')		{			value++;			char *t = strchr(value, '%');			if (!t)				return TRUE;//*** Changed FALSE to TRUE			*t = '\0';			newvalue = (char *)(LPCTSTR) GetGlobal(value);		}		if (!xpiname || !xpifile || !newvalue)				return TRUE;//*** Changed FALSE to TRUE		/*Post Beta -This is a hack to prevent the last page from staying up there endlessly;		  We check to see if the filename is null and if it is so we return true 		  so that the return value isnt made FALSE */		CString filename = newvalue;		if (filename.IsEmpty())			return TRUE;		////////////////////////////////		//check to see if it is a jar and then do accordingly		if (jarname.CompareNoCase("no.jar")==0)		ExtractXPIFile(xpiname, xpifile);		else 		ExtractJARFile(xpiname, jarname, xpifile);		if (!CopyFile(newvalue, xpifile, FALSE))		{			DWORD e = GetLastError();			return TRUE;//*** Changed FALSE to TRUE		}	}// If the string in script.ib matches "addrdfFile" perform this code// This code decompresses the xpi files to which the rdf files must be // added and copies the rdf files (mailaccount.rdf and newsaccount.rdf) // from the Temp directory to the resulting directory after decompression	else if (strcmp(cmdname, "addrdfFile") == 0)	{		char *xpiname	= strtok(NULL, ",)");	// xpi file name		char *jname		= strtok(NULL, ",)");	// jar name within xpi file		char *xpifile	= strtok(NULL, ",)");	// directory path within jar file		char *value2    = strtok(NULL, ",)");	// name of rdf file to be added		char *value 	= strtok(NULL, ",)");	// variable which specifies the path of the Temp dir 		char *newvalue	= value;		CString jarname = jname;		if (value[0] == '%')		{			value++;			char *t = strchr(value, '%');			if (!t)				return TRUE;//*** Changed FALSE to TRUE			*t = '\0';			newvalue = (char *)(LPCTSTR) GetGlobal(value);		}		if (!xpiname || !xpifile || !newvalue)				return TRUE;//*** Changed FALSE to TRUE		CString command;		if (strcmp(value2,"newsaccount.rdf") != 0)		{			if (findXPI(xpiname, xpifile))				return TRUE;		}		// nscpxpipath = \CCKTool\NSCPXPI		CString xpiArchive = nscpxpiPath + "\\" + xpiname;		// decompressing the directory path within the XPI file		command = quotes +rootPath + "unzip.exe"+ quotes + "-o" + spaces + quotes + xpiArchive  + quotes + spaces + quotes + xpifile + "/*.*" + quotes;		ExecuteCommand((char *)(LPCTSTR) command, SW_HIDE, INFINITE);		CString xpifile1 = xpifile;		CString tempval=value2;				CString newxpifile = xpifile1 + "/" + tempval;		// copy rdf file from Temp directory		if (!CopyFile(newvalue, newxpifile, FALSE))		{			DWORD e = GetLastError();			return TRUE;//*** Changed FALSE to TRUE		}	}	else if ((strcmp(cmdname, "modifyDTD") == 0) ||			(strcmp(cmdname, "modifyJS") == 0) ||			(strcmp(cmdname, "modifyJS1") == 0) ||			(strcmp(cmdname, "modifyJS2") == 0) ||			(strcmp(cmdname, "modifyProperties") == 0) ||			(strcmp(cmdname, "modifyHashedPrefString") == 0) ||			(strcmp(cmdname, "modifyHashedPrefInt") == 0) ||			(strcmp(cmdname, "modifyHashedPrefBool") == 0))	{		char *xpiname	= strtok(NULL, ",)");		char *jname		= strtok(NULL, ",)");		char *xpifile	= strtok(NULL, ",)");		char *entity	= strtok(NULL, ",)");		char *value 	= strtok(NULL, ",)");		char *newvalue	= value;		CString jarname = jname;		if (value[0] == '%')		{			value++;			char *t = strchr(value, '%');			if (!t)				return TRUE;//*** Changed FALSE to TRUE			*t = '\0';			newvalue = (char *)(LPCTSTR) GetGlobal(value);		}		// Search for a locked pref variable for this pref name.		// It will be a global with name: "lockpref."+prefname		CString LockPrefGlobalName;		LockPrefGlobalName.Format("lockpref.%s", value);		CString LockedPrefCheckboxVal = GetGlobal(LockPrefGlobalName);		BOOL bLockPref = (LockedPrefCheckboxVal.Compare("1") == 0);	// "1" if locked		if (!xpiname || !xpifile || !entity || !newvalue)			return TRUE;//*** Changed FALSE to TRUE		//check to see if it is a jar and then do accordingly		if (jarname.CompareNoCase("no.jar")==0)			ExtractXPIFile(xpiname, xpifile);		else 			ExtractJARFile(xpiname, jarname, xpifile);		if (strcmp(cmdname, "modifyHashedPrefString") == 0)			ModifyHashedPref(xpifile,entity,newvalue, "string", bLockPref);		else if (strcmp(cmdname, "modifyHashedPrefInt") == 0)			ModifyHashedPref(xpifile,entity,newvalue, "int", bLockPref);		else if (strcmp(cmdname, "modifyHashedPrefBool") == 0)			ModifyHashedPref(xpifile,entity,newvalue, "bool", bLockPref);		else if (strcmp(cmdname, "modifyJS") == 0)			ModifyJS(xpifile,entity,newvalue, bLockPref);		else if (strcmp(cmdname, "modifyProperties") == 0)			ModifyProperties(xpifile,entity,newvalue);		else if (strcmp(cmdname, "modifyJS1") == 0)			ModifyJS1(xpifile,entity,newvalue, bLockPref);		else if (strcmp(cmdname, "modifyJS2") == 0)			ModifyJS2(xpifile,entity,newvalue, bLockPref);		else		{			// If the browser window's title bar text field is empty, 			// the default browser value is displayed			if ((strcmp(entity,"mainWindow.titlemodifier") == 0) &&			(strcmp(newvalue,"") == 0))				newvalue = "&brandShortName;";			ModifyDTD(xpifile, entity, newvalue);		}	}	else if (strcmp(cmdname, "wrapXPI") == 0)	{	}  else if (strcmp(cmdname, "processPrefsTree") == 0)  {  	char *prefsTreeFile	= strtok(NULL, ",)");    char *installFile = strtok(NULL, ",)");    char *prefFile = strtok(NULL, ",)");    CString fileWithPath = configPath + "\\" + prefsTreeFile;    ProcessPrefsTree(fileWithPath, prefFile, installFile);  }  else if (strcmp(cmdname, "convertToRemoteAdmin") == 0)  {    char *vConvert = strtok(NULL, ",)");  // if set, then do the convert to remote admin		if (vConvert[0] == '%')		{			vConvert++;			char *t = strchr(vConvert, '%');			if (!t)				return TRUE;			*t = '\0';			char *bConvert = (char *)(LPCTSTR) GetGlobal(vConvert);      // The convert checkbox was not checked. No need to continue.      if (strcmp(bConvert, "1") != 0)        return TRUE;		}        char *url = strtok(NULL, ",)");		if (url[0] == '%')		{			url++;			char *t = strchr(url, '%');			if (!t)				return TRUE;			*t = '\0';			url = (char *)(LPCTSTR) GetGlobal(url);      if (!url)        return TRUE;		}    char *prefFile = strtok(NULL, ",)");    char *remoteAdminFile = strtok(NULL, ",)");        if (!prefFile || !remoteAdminFile)      return TRUE;    ConvertToRemoteAdmin(url, prefFile, remoteAdminFile);  }  else if (strcmp(cmdname, "modifyUserJS") == 0)  {    // modifyUserJS(XPIname, fileWithinXPI, JSsourcefile)      // within XPI    // modifyUserJS(browser.xpi, bin, jsedit.jsc)              //    example    // modifyUserJS(none, pathAndFilename, JSsourcefile)       // normal file    // modifyUserJS(none, \autoadmin\test.jsc, jsedit.jsc)     //    example		char *xpiname	 = strtok(NULL, ",)");		char *filename = strtok(NULL, ",)");		char *jssource = strtok(NULL, ",)");    CString jsSourceFile = configPath + "\\" + jssource;		// pull the cfg file out of the XPI    //    ExtractXPIFile(xpiname, filename);    // replace the appropriate block of javascript    //    ModifyUserJS(filename, jsSourceFile);       // cfg file gets repackaged with call to ReplaceXPIFiles in StartIB after all the interpret calls,    // so no need to repacked it ourself.  }	else		return FALSE;//*** We have to handle this condition better.	return TRUE;}