This commit is contained in:
DavidXanatos 2023-07-19 22:27:18 +02:00
parent 03077cc9cc
commit 11dbdc11c4
4 changed files with 10 additions and 3 deletions

View File

@ -275,6 +275,11 @@ void CBoxedProcess::InitProcessInfoImpl(void* ProcessHandle)
{
m_CommandLine = CBoxedProcess__GetPebString(ProcessHandle, PhpoCommandLine);
}
if (m_WorkingDir.isEmpty())
{
m_WorkingDir = CBoxedProcess__GetPebString(ProcessHandle, PhpoCurrentDirectory);
}
}
bool CBoxedProcess::InitProcessInfoEx()

View File

@ -36,6 +36,7 @@ public:
virtual quint32 GetParendPID() const { return m_ParendPID; }
virtual QString GetProcessName() const { return m_ImageName; }
virtual QString GetCommandLine() const { return m_CommandLine; }
virtual QString GetWorkingDir() const { return m_WorkingDir; }
virtual QString GetFileName() const { return m_ImagePath; }
virtual QDateTime GetTimeStamp() const { return m_StartTime; }
virtual quint32 GetProcessFlags() const { return m_ProcessFlags; }
@ -73,6 +74,7 @@ protected:
quint32 m_ProcessFlags;
quint32 m_ImageType;
QString m_CommandLine;
QString m_WorkingDir;
quint32 m_SessionId;
QDateTime m_StartTime;
quint32 m_ReturnCode;

View File

@ -628,7 +628,7 @@ void CSbieView::UpdateProcMenu(const CBoxedProcessPtr& pProcess, int iProcessCou
if (m_pMenuPreset) {
m_pMenuPinToRun->setChecked(!FoundPin.isEmpty());
m_pMenuPinToRun->setData(FoundPin);
//m_pMenuPinToRun->setProperty("WorkingDir", pProcess-> // todo
m_pMenuPinToRun->setProperty("WorkingDir", pProcess->GetWorkingDir());
m_pMenuAllowInternet->setChecked(pProcess.objectCast<CSbieProcess>()->HasInternetAccess());
@ -1470,7 +1470,7 @@ void CSbieView::OnSandBoxAction(QAction* Action, const QList<CSandBoxPtr>& SandB
Results.append(theGUI->RunStart(SandBoxes.first()->GetName(), "start_menu", false, WorkingDir));
else {
auto pBoxEx = SandBoxes.first().objectCast<CSandBoxPlus>();
Results.append(theGUI->RunStart(SandBoxes.first()->GetName(), pBoxEx->GetFullCommand(Command), false, WorkingDir));
Results.append(theGUI->RunStart(SandBoxes.first()->GetName(), pBoxEx->GetFullCommand(Command), false, pBoxEx->GetFullCommand(WorkingDir)));
}
}

View File

@ -3,7 +3,7 @@
#define VERSION_MJR 1
#define VERSION_MIN 10
#define VERSION_REV 1
#define VERSION_UPD 3
#define VERSION_UPD 5
#ifndef STR
#define STR2(X) #X