function _runSync (cmdStr, args, options) {
    var FN = '_runSync';
    if (!isSolidString(cmdStr)) throwErrNonStr(FN, cmdStr);

    var logStdout = os.makeTmpPath('cp-execSync_stdout_', '.log');
    var logStderr = os.makeTmpPath('cp-execSync_stderr_', '.log');

    var stdioArgs;
    if (isArray(args)) {
      stdioArgs = args.concat([
        '1>', srrPath(logStdout), '2>', srrPath(logStderr)]);
    } else if (isString(args)) {
      stdioArgs = args + ' 1>' + srrPath(logStdout) + ' 2>' + srrPath(logStderr);
    } else {
      throw new Error('Error [ERR_INVALID_ARG_TYPE]\n'
        + '  at ' + FN + ' (' + MODULE_TITLE + ')\n'
        + '  cmdStr: "' + cmdStr + '"\n  args: ' + insp(args));
    }

    var error = true;
    var stdout = '';
    var stderr = '';
    var runsAdmin = obtain(options, 'runsAdmin', null);

    try {
      var retVal;

      if (runsAdmin === true && !process.isAdmin()) {
        retVal = os.runAsAdmin(cmdStr, stdioArgs, options);
      } else if (runsAdmin === false && process.isAdmin()) {
        retVal = os.Task.runTemporary(cmdStr, stdioArgs, options);
      } else {
        retVal = os.runSync(cmdStr, stdioArgs, options);
      }

      var isDryRun = obtain(options, 'isDryRun', false);
      if (isDryRun) return 'dry-run [' + FN + ']: ' + retVal;
    } catch (e) {
      throw new Error(insp(e) + '\n'
        + '  at ' + FN + ' (' + MODULE_TITLE + ')\n'
        + '  cmdStr: "' + cmdStr + '"\n  args: ' + insp(args));
    }

    // Wait and Read the stdout
    try {
      var encoding = obtain(options, 'encoding', os.cmdCodeset());

      /**
       * @FIXME Infinity roop when os.runAsAdmin() run but rejected admin running
       */
      stdout = fse.ensureReadingFile(logStdout, 0, { encoding: encoding });
      stderr = fse.ensureReadingFile(logStderr, 0, { encoding: encoding });
      error = isSolidString(stderr);
    } catch (e) {
      throw new Error(insp(e) + '\n'
        + '  at ' + FN + ' (' + MODULE_TITLE + ')\n'
        + '  cmdStr: "' + cmdStr + '"\n  args: ' + insp(args));
    }

    // Delete the temporary log files for standard streams.
    // @note 管理者で実行した結果のStdファイルもユーザーから削除可能
    try {
      fse.removeSync(logStdout);
      fse.removeSync(logStderr);
    } catch (e) {
      throw new Error(insp(e) + '\n'
        + '  at ' + FN + ' (' + MODULE_TITLE + ')\n'
        + '  cmdStr: "' + cmdStr + '"\n  args: ' + insp(args));
    }

    return { stdout: stdout, stderr: stderr, error: error };
  } // }}}

/**
   * Executes the command and returns the StdOut.
   *
   * @private
   * @param {string} cmdStr
   * @param {string[]|string} args
   * @param {object} [options] - See {@link https://docs.tuckn.net/WshOS/global.html#typeShRunOptions|typeShRunOptions}.
   * @returns {typeRunSyncReturn} - { error, stdout, stderr }
   */
Executes the command and returns the StdOut.


Executes the command and returns the StdOut .
function _runSync (cmdStr, args, options) {
    var FN = '_runSync';
    if (!isSolidString(cmdStr)) throwErrNonStr(FN, cmdStr);
    var logStdout = os.makeTmpPath('cp-execSync_stdout_', '.log');
    var logStderr = os.makeTmpPath('cp-execSync_stderr_', '.log');
    var stdioArgs;
    if (isArray(args)) {
      stdioArgs = args.concat([
        '1>', srrPath(logStdout), '2>', srrPath(logStderr)]);
    } else if (isString(args)) {
      stdioArgs = args + ' 1>' + srrPath(logStdout) + ' 2>' + srrPath(logStderr);
    } else {
      throw new Error('Error [ERR_INVALID_ARG_TYPE]\n'
        + '  at ' + FN + ' (' + MODULE_TITLE + ')\n'
        + '  cmdStr: "' + cmdStr + '"\n  args: ' + insp(args));
    }
    var error = true;
    var stdout = '';
    var stderr = '';
    var runsAdmin = obtain(options, 'runsAdmin', null);
    try {
      var retVal;
      if (runsAdmin === true && !process.isAdmin()) {
        retVal = os.runAsAdmin(cmdStr, stdioArgs, options);
      } else if (runsAdmin === false && process.isAdmin()) {
        retVal = os.Task.runTemporary(cmdStr, stdioArgs, options);
      } else {
        retVal = os.runSync(cmdStr, stdioArgs, options);
      }
      var isDryRun = obtain(options, 'isDryRun', false);
      if (isDryRun) return 'dry-run [' + FN + ']: ' + retVal;
    } catch (e) {
      throw new Error(insp(e) + '\n'
        + '  at ' + FN + ' (' + MODULE_TITLE + ')\n'
        + '  cmdStr: "' + cmdStr + '"\n  args: ' + insp(args));
    }
    try {
      var encoding = obtain(options, 'encoding', os.cmdCodeset());
      stdout = fse.ensureReadingFile(logStdout, 0, { encoding: encoding });
      stderr = fse.ensureReadingFile(logStderr, 0, { encoding: encoding });
      error = isSolidString(stderr);
    } catch (e) {
      throw new Error(insp(e) + '\n'
        + '  at ' + FN + ' (' + MODULE_TITLE + ')\n'
        + '  cmdStr: "' + cmdStr + '"\n  args: ' + insp(args));
    }
    try {
      fse.removeSync(logStdout);
      fse.removeSync(logStderr);
    } catch (e) {
      throw new Error(insp(e) + '\n'
        + '  at ' + FN + ' (' + MODULE_TITLE + ')\n'
        + '  cmdStr: "' + cmdStr + '"\n  args: ' + insp(args));
    }
    return { stdout: stdout, stderr: stderr, error: error };
  } 
function _runSync ( cmdStr , args , options ) { var FN = '_runSync' ; if ( ! isSolidString ( cmdStr ) ) throwErrNonStr ( FN , cmdStr ) ; var logStdout = os . makeTmpPath ( 'cp-execSync_stdout_' , '.log' ) ; var logStderr = os . makeTmpPath ( 'cp-execSync_stderr_' , '.log' ) ; var stdioArgs ; if ( isArray ( args ) ) { stdioArgs = args . concat ( [ '1>' , srrPath ( logStdout ) , '2>' , srrPath ( logStderr ) ] ) ; } else if ( isString ( args ) ) { stdioArgs = args + ' 1>' + srrPath ( logStdout ) + ' 2>' + srrPath ( logStderr ) ; } else { throw new Error ( 'Error [ERR_INVALID_ARG_TYPE]\n' + '  at ' + FN + ' (' + MODULE_TITLE + ')\n' + '  cmdStr: "' + cmdStr + '"\n  args: ' + insp ( args ) ) ; } var error = true ; var stdout = '' ; var stderr = '' ; var runsAdmin = obtain ( options , 'runsAdmin' , null ) ; try { var retVal ; if ( runsAdmin === true && ! process . isAdmin ( ) ) { retVal = os . runAsAdmin ( cmdStr , stdioArgs , options ) ; } else if ( runsAdmin === false && process . isAdmin ( ) ) { retVal = os . Task . runTemporary ( cmdStr , stdioArgs , options ) ; } else { retVal = os . runSync ( cmdStr , stdioArgs , options ) ; } var isDryRun = obtain ( options , 'isDryRun' , false ) ; if ( isDryRun ) return 'dry-run [' + FN + ']: ' + retVal ; } catch ( e ) { throw new Error ( insp ( e ) + '\n' + '  at ' + FN + ' (' + MODULE_TITLE + ')\n' + '  cmdStr: "' + cmdStr + '"\n  args: ' + insp ( args ) ) ; } try { var encoding = obtain ( options , 'encoding' , os . cmdCodeset ( ) ) ; stdout = fse . ensureReadingFile ( logStdout , 0 , { encoding : encoding } ) ; stderr = fse . ensureReadingFile ( logStderr , 0 , { encoding : encoding } ) ; error = isSolidString ( stderr ) ; } catch ( e ) { throw new Error ( insp ( e ) + '\n' + '  at ' + FN + ' (' + MODULE_TITLE + ')\n' + '  cmdStr: "' + cmdStr + '"\n  args: ' + insp ( args ) ) ; } try { fse . removeSync ( logStdout ) ; fse . removeSync ( logStderr ) ; } catch ( e ) { throw new Error ( insp ( e ) + '\n' + '  at ' + FN + ' (' + MODULE_TITLE + ')\n' + '  cmdStr: "' + cmdStr + '"\n  args: ' + insp ( args ) ) ; } return { stdout : stdout , stderr : stderr , error : error } ; }
Executes the command and returns the StdOut.
Executes the command and returns the StdOut .
// Wait and Read the stdout
 /**
       * @FIXME Infinity roop when os.runAsAdmin() run but rejected admin running
       */ // Delete the temporary log files for standard streams.
 // @note 管理者で実行した結果のStdファイルもユーザーから削除可能
 // }}}
