Changeset 108355 in vbox
- Timestamp:
- Feb 24, 2025 3:20:00 PM (2 weeks ago)
- svn:sync-xref-src-repo-rev:
- 167715
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r108046 r108355 5037 5037 <interface 5038 5038 name="IUnattended" extends="$unknown" 5039 uuid=" a71e5822-365b-49ba-bd14-c8d616e6740d"5039 uuid="39d1f56c-c1c2-40df-84e9-468062d84768" 5040 5040 wsmap="managed" 5041 5041 rest="managed" … … 5135 5135 distribution, only the installation of additions pointed to by 5136 5136 <link to="IUnattended::additionsIsoPath"/>. 5137 </desc> 5138 </attribute> 5139 5140 <attribute name="productKeyRequired" type="boolean" readonly="yes"> 5141 <desc> 5142 Indicates whether the product key is required for the installation. 5137 5143 </desc> 5138 5144 </attribute> -
trunk/src/VBox/Main/include/UnattendedImpl.h
r106062 r108355 158 158 159 159 bool mfDoneDetectIsoOS; /**< Set by detectIsoOS(), cleared by setIsoPath(). */ 160 bool mfProductKeyRequired; 160 161 Utf8Str mStrDetectedOSTypeId; 161 162 Utf8Str mStrDetectedOSVersion; … … 214 215 HRESULT getInstallGuestAdditions(BOOL *installGuestAdditions); 215 216 HRESULT setInstallGuestAdditions(BOOL installGuestAdditions); 217 HRESULT getProductKeyRequired(BOOL *productKeyRequired); 216 218 HRESULT getValidationKitIsoPath(com::Utf8Str &aValidationKitIsoPath); 217 219 HRESULT setValidationKitIsoPath(const com::Utf8Str &aValidationKitIsoPath); -
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.