Docs: RemoteExecuteScript.exe

  • These are a bit sloppy notes on what exactly "RemoteExecuteScript.exe" does:

    • Let <CWD> be the RemoteExecuteScript.exe's parent dir.
    • Accepts --silent command line switch which has the effect:
      -- No output at all.
      -- Even no error messages.
      -- Afterwards, silent gets propagated to "FastExecuteScript.exe".
    • Out of current interest:
      -- Also accepts --remote.
      -- And --script, --server, --username, --password for use with --remote.
      -- Script can become "invalid" if it's remote but no script or no server specified.
    • Currently reasons for valid==false can be only related to --remote.
    • For non-remote scripts all generated files are placed into:
      <AppsDir> = <CWD>/appslocal
    • Looks if "<CWD>/project.xml" exists.
    • If not, terminates.
    • Reads "EngineVersion" element from "<CWD>/project.xml".
    • If "EngineVersion" cannot be read then terminates.
    • Generates a SID directory in the format:
      <SidDir> = SID<sha256x>
      where <sha256x> is first 8 characters of SHA256 hash of the entire "project.xml". On Windows the hash can be generated using:
      certutil -hashfile project.xml SHA256
      PowerShell snippet to extract only the hash string and get rid of the rest of the output:
      $(CertUtil -hashfile project.xml SHA256)[1] -replace " ",""
    • Directory for "FastExecuteScript.exe":
      <FullSidDir> = <AppsDir>/<ScriptName>/<SidDir>/engine
      where <ScriptName> is empty for unnamed local scripts.
    • If <FullSidDir> does not exist then proceeds to installation.
    • If it exists then runs "FastExecuteScript.exe" with the CWD set to <FullSidDir>.


    • Checks if this engine distribution package exists:
    • If not, downloads package from the web server.
    • Deletes recursively entire temporary dir, if any:
      <TmpRootDir> = <AppsDir>/<ScriptName>/temp
    • Temporary directory for engine installation to be:
      <TmpDir> = <TmpRootDir>/engine
    • Unzips either newly downloaded or previously existing engine distro into <TmpDir>.
    • Checks if there is a previous installation which means there's some <SIDxxx> directory in <AppsDir> dir. If there are multiple such dirs, a single random one is taken as the previous installation dir:
      <PrevDir> = <AppsDir>/<ScriptName>/<SIDxxx>
    • Checks if there are any untracked files in the previous installation's subdir:
      Untracked files are those files not registered in:
    • Copies all untracked files from <CWD> and all of its subdirs into <TmpDir> with directory structure prevented.
    • Saves all file names from the engine distro (obtained as file list from the archiver) to "filelist.txt" and:
      -- Adds file list file itself ("filelist.txt").
      -- Addes "project.xml".
      -- ! Does not add any untracked files, i.e. they remain untracked.
    • Copies "project.xml" from <CWD> to <TmpDir>.
    • Renames <TmpDir> dir to <SidDir>.
    • Deletes <PrevDir>.
    • In the end, runs "FastExecuteScript.exe" from the new <SidDir> dir with the CWD set to <FullSidDir>.

    I'll try to keep this up to date and in line with my current knowledge.