Changeset 108355 in vbox for trunk/src/VBox/Main/src-server/UnattendedImpl.cpp
- Timestamp:
- Feb 24, 2025 3:20:00 PM (3 months ago)
- svn:sync-xref-src-repo-rev:
- 167715
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/UnattendedImpl.cpp
r107873 r108355 26 26 */ 27 27 28 #include <cstdio> 29 28 30 29 31 /********************************************************************************************************************************* … … 260 262 , mfInstallGuestAdditions(false), mfInstallTestExecService(false), mfInstallUserPayload(false) 261 263 , mpTimeZoneInfo(NULL), mfIsDefaultAuxiliaryBasePath(true), midxImage(0), mfDoneDetectIsoOS(false) 262 , m EnmOsType(VBOXOSTYPE_Unknown)264 , mfProductKeyRequired(false), mEnmOsType(VBOXOSTYPE_Unknown) 263 265 , mfAvoidUpdatesOverNetwork(false), mfDoneSupportedGuestOSList(false) 264 266 { } … … 363 365 mStrDetectedOSHints.setNull(); 364 366 mDetectedImages.clear(); 367 mfProductKeyRequired = false; 365 368 366 369 /* … … 497 500 } 498 501 } 499 502 if (mStrDetectedOSTypeId.startsWithI("windows11")) 503 mfProductKeyRequired = true; 500 504 /* Check if detected OS type is supported (covers platform architecture). */ 501 505 bool fSupported = false; … … 2634 2638 if ((Machine *)ptrMachine != (Machine *)mMachine) 2635 2639 return setErrorBoth(E_FAIL, VERR_WRONG_ORDER, tr("The 'machine' while we were using it - please don't do that")); 2636 2640 /* Check if required product key is set. */ 2641 if (mfProductKeyRequired && mStrProductKey.isEmpty()) 2642 return setErrorBoth(E_FAIL, VERR_MISSING, tr("Product key is required for this kind of OS")); 2637 2643 /* 2638 2644 * Check if the specified ISOs and files exist. … … 3598 3604 AssertReturn(mpInstaller == NULL, setErrorBoth(E_FAIL, VERR_WRONG_ORDER, tr("Cannot change after prepare() has been called"))); 3599 3605 mfInstallGuestAdditions = installGuestAdditions != FALSE; 3606 return S_OK; 3607 } 3608 3609 HRESULT Unattended::getProductKeyRequired(BOOL *productKeyRequired) 3610 { 3611 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 3612 *productKeyRequired = mfProductKeyRequired; 3600 3613 return S_OK; 3601 3614 }
Note:
See TracChangeset
for help on using the changeset viewer.