Changeset 45938 in vbox for trunk/src/VBox/Additions
- Timestamp:
- May 7, 2013 3:52:46 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 85578
- Location:
- trunk/src/VBox/Additions/WINNT
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Installer/VBoxDrvInst.cpp
r44528 r45938 354 354 } 355 355 356 static UINT WINAPI vboxDrvInstExecuteInfFileCallback(PVOID Context, 357 UINT Notification, 358 UINT_PTR Param1, 359 UINT_PTR Param2) 360 { 361 #ifdef DEBUG 362 _tprintf (_T( "Got installation notification %u\n"), Notification); 363 #endif 364 365 switch (Notification) 366 { 367 case SPFILENOTIFY_NEEDMEDIA: 368 _tprintf (_T( "Requesting installation media ...\n")); 369 break; 370 371 case SPFILENOTIFY_STARTCOPY: 372 _tprintf (_T( "Copying driver files to destination ...\n")); 373 break; 374 375 case SPFILENOTIFY_TARGETNEWER: 376 case SPFILENOTIFY_TARGETEXISTS: 377 return TRUE; 378 } 379 380 return SetupDefaultQueueCallback(Context, Notification, Param1, Param2); 381 } 382 356 383 /** 357 384 * Executes a sepcified .INF section to install/uninstall drivers and/or services. … … 364 391 int ExecuteInfFile(const _TCHAR *pszSection, int iMode, const _TCHAR *pszInf) 365 392 { 366 _tprintf(_T("Executing INF-File: %ws (Section: %ws) ...\n"), pszInf, pszSection); 367 368 /* Executed by the installer that already has proper privileges. */ 369 _TCHAR szCommandLine[_MAX_PATH + 1] = { 0 }; 370 swprintf(szCommandLine, sizeof(szCommandLine), TEXT( "%ws %d %ws" ), pszSection, iMode, pszInf); 371 372 #ifdef DEBUG 373 _tprintf (_T( "Commandline: %ws\n"), szCommandLine); 374 #endif 375 376 InstallHinfSection(NULL, NULL, szCommandLine, SW_SHOW); 377 /* No return value given! */ 393 _tprintf(_T("Installing from INF-File: %ws (Section: %ws) ...\n"), 394 pszInf, pszSection); 395 396 UINT uErrorLine = 0; 397 HINF hINF = SetupOpenInfFile(pszInf, NULL, INF_STYLE_WIN4, &uErrorLine); 398 if (hINF != INVALID_HANDLE_VALUE) 399 { 400 PVOID pvQueue = SetupInitDefaultQueueCallback(NULL); 401 402 BOOL fSuccess = SetupInstallFromInfSection(NULL, 403 hINF, 404 pszSection, 405 SPINST_ALL, 406 HKEY_LOCAL_MACHINE, 407 NULL, 408 SP_COPY_NEWER_OR_SAME | SP_COPY_NOSKIP, 409 vboxDrvInstExecuteInfFileCallback, 410 pvQueue, 411 NULL, 412 NULL 413 ); 414 if (fSuccess) 415 { 416 _tprintf (_T( "File installation stage successful\n")); 417 418 fSuccess = SetupInstallServicesFromInfSection(hINF, 419 L"DefaultInstall.Services", 420 0 /* Flags */); 421 if (fSuccess) 422 { 423 _tprintf (_T( "Service installation stage successful. Installation completed\n")); 424 } 425 else 426 { 427 DWORD dwErr = GetLastError(); 428 switch (dwErr) 429 { 430 case ERROR_SUCCESS_REBOOT_REQUIRED: 431 _tprintf (_T( "A reboot is required to complete the installation\n")); 432 break; 433 434 case ERROR_SECTION_NOT_FOUND: 435 break; 436 437 default: 438 _tprintf (_T( "Error %ld while installing service\n"), dwErr); 439 break; 440 } 441 } 442 } 443 else 444 _tprintf (_T( "Error %ld while installing files\n"), GetLastError()); 445 446 if (pvQueue) 447 SetupTermDefaultQueueCallback(pvQueue); 448 449 SetupCloseInfFile(hINF); 450 } 451 else 452 _tprintf (_T( "Unable to open %ws: %ld (error line %u)\n"), 453 pszInf, GetLastError(), uErrorLine); 378 454 379 455 return EXIT_OK; -
trunk/src/VBox/Additions/WINNT/Mouse/NT5/VBoxMouse.inf
r44529 r45938 35 35 ;amd64 %ORACLE%=VBoxMouse, NTamd64 36 36 37 [VBoxMouse_Install] 38 CopyFiles = @VBoxMouse.sys 39 40 [VBoxMouse_Install.Services] 41 AddService = VBoxMouse,,VBoxMouse.Service 42 37 43 [DefaultInstall] 38 ;39 ; DefaultInstall section is used to install the class filter driver.40 ;41 44 CopyFiles = @VBoxMouse.sys 42 AddReg = VBoxMouse_AddReg43 45 44 [VBoxMouse_AddReg] 46 [DefaultInstall.Services] 47 AddService = VBoxMouse,,VBoxMouse.Service 48 49 [VBoxMouse.AddRegistry] 45 50 HKLM, System\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}, UpperFilters, 0x00010000, "VBoxMouse", "mouclass" 46 51 47 [DefaultInstall.Services] 48 AddService = VBoxMouse, , VBoxMouse_Service_Inst 49 50 51 [VBoxMouse_Service_Inst] 52 [VBoxMouse.Service] 52 53 DisplayName = %VBoxMouse.SvcDesc% 53 54 ServiceType = %SERVICE_KERNEL_DRIVER% … … 55 56 ErrorControl = %SERVICE_ERROR_IGNORE% 56 57 ServiceBinary = %12%\VBoxMouse.sys 57 58 AddReg = VBoxMouse.AddRegistry 58 59 59 60 [Strings]
Note:
See TracChangeset
for help on using the changeset viewer.