VirtualBox

Ignore:
Timestamp:
Mar 22, 2023 5:30:14 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
156485
Message:

Guest Control: Added ability of specifying an optional current working directory to started guest processes. This needs Guest Additions which support this. bugref:8053

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp

    r98665 r99120  
    11701170    {
    11711171        GCTLCMD_COMMON_OPTION_DEFS()
     1172        { "--cwd",                          'C',                                      RTGETOPT_REQ_STRING  },
    11721173        { "--putenv",                       'E',                                      RTGETOPT_REQ_STRING  },
    11731174        { "--exe",                          'e',                                      RTGETOPT_REQ_STRING  },
     
    12001201    com::SafeArray<IN_BSTR>                 aEnv;
    12011202    const char *                            pszImage            = NULL;
     1203    const char *                            pszCwd              = NULL;
    12021204    bool                                    fWaitForStdOut      = fRunCmd;
    12031205    bool                                    fWaitForStdErr      = fRunCmd;
     
    12391241                case kGstCtrlRunOpt_Profile:
    12401242                    aCreateFlags.push_back(ProcessCreateFlag_Profile);
     1243                    break;
     1244
     1245                case 'C':
     1246                    pszCwd = ValueUnion.psz;
    12411247                    break;
    12421248
     
    13581364            ComPtr<IGuestProcess> pProcess;
    13591365            CHECK_ERROR_BREAK(pCtx->pGuestSession, ProcessCreate(Bstr(pszImage).raw(),
     1366                                                                 Bstr(pszCwd).raw(),
    13601367                                                                 ComSafeArrayAsInParam(aArgs),
    13611368                                                                 ComSafeArrayAsInParam(aEnv),
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette