diff --git a/SandboxiePlus/SandMan/Models/SbieModel.cpp b/SandboxiePlus/SandMan/Models/SbieModel.cpp index 4cb806cd..619fcaad 100644 --- a/SandboxiePlus/SandMan/Models/SbieModel.cpp +++ b/SandboxiePlus/SandMan/Models/SbieModel.cpp @@ -404,7 +404,13 @@ bool CSbieModel::Sync(const CSandBoxPtr& pBox, const QList& Path, cons QVariant Value; switch (section) { - case eName: Value = pProcess->GetProcessName(); break; + case eName: { + QString Name = pProcess->GetProcessName(); + if (pProcess->IsWoW64()) + Name += " *32"; + Value = Name; + break; + } case eProcessId: Value = pProcess->GetProcessId(); break; case eStatus: Value = pProcess->GetStatusStr(); break; case eTitle: Value = theAPI->GetProcessTitle(pProcess->GetProcessId()); break; diff --git a/SandboxiePlus/SandMan/SbieProcess.cpp b/SandboxiePlus/SandMan/SbieProcess.cpp index 0d23c466..1afe1801 100644 --- a/SandboxiePlus/SandMan/SbieProcess.cpp +++ b/SandboxiePlus/SandMan/SbieProcess.cpp @@ -91,15 +91,6 @@ QString CSbieProcess::ImageTypeToStr(quint32 type) } } - -QString CSbieProcess::GetProcessName() const -{ - QString Name = CBoxedProcess::GetProcessName(); - if (m_bIsWoW64) - Name += " *32"; - return Name; -} - QString CSbieProcess::GetStatusStr() const { QString Status; @@ -138,11 +129,9 @@ void CSbieProcess::InitProcessInfoImpl(void* ProcessHandle) { CBoxedProcess::InitProcessInfoImpl(ProcessHandle); - HANDLE TokenHandle = NULL; - if(m_pBox->GetBool("NoSecurityIsolation") || m_pBox->GetBool("OriginalToken")) + HANDLE TokenHandle = (HANDLE)m_pBox->Api()->QueryProcessInfo(m_ProcessId, 'ptok'); + if (!TokenHandle) NtOpenProcessToken(ProcessHandle, TOKEN_QUERY, &TokenHandle); - else - TokenHandle = (HANDLE)m_pBox->Api()->QueryProcessInfo(m_ProcessId, 'ptok'); if (TokenHandle) { ULONG returnLength; diff --git a/SandboxiePlus/SandMan/SbieProcess.h b/SandboxiePlus/SandMan/SbieProcess.h index 96907324..ac45cc76 100644 --- a/SandboxiePlus/SandMan/SbieProcess.h +++ b/SandboxiePlus/SandMan/SbieProcess.h @@ -8,7 +8,6 @@ class CSbieProcess : public CBoxedProcess public: CSbieProcess(quint32 ProcessId, class CSandBox* pBox); - virtual QString GetProcessName() const; virtual QString GetStatusStr() const; virtual void BlockProgram() { GetBox()->BlockProgram(m_ImageName); }