Results 1 to 15 of 17

Thread: DISM

Hybrid View

  1. #1

    DISM

    Thought I'd do a quick query re DISM and the possibility of tracing through its code. Came across an article on the Net showing how to setup DISM on XP using the DISM files from W7. Not too sure how well that would work since the applications of DISM I have seen on XP were fairly primitive.

    Anyway, when I run DISM from the command prompt in XP it claims (in the log file) it cannot find the windows directory, therefore it is presuming C:\Windows. My windir is C:\winxp and DISM refers to it a few steps earlier in the log as such, mainly because dism.exe is in windir\system32 and it's files are in windir\system32\dism. I mean, it couldn't even start if it did not know where it was located, or its files.

    It uses 'providers' to find the windir path and they can't find it. My path is set in the environment variables and the windir is indicated as c:\winxp.

    So, I need to trace into dism to see why the provider cannot find the windir. I have never tried a command line app with windbg, never mind a system utility. Should I encounter any problems doing so? Is kernel mode the best or maybe one of the other debuggers?

  2. #2
    Super Moderator
    Join Date
    Dec 2004
    Posts
    1,525
    Blog Entries
    15
    Not Sure What You Want to debug
    dism takes an argument to windir /WINDIR:myfancydirectorylocatedinclouds@55

    it there is a meesagebox/dialog anything that is blocking waiting for user input
    maybe just attach windbg/xxxdbg break and look at callstack maybe ??

    ok this is not a guiapp but console mode so no blocking message boxes

    you need to know where to setbreakpoints

    logfile create break (ifexistscondition)
    Code:
    0:000> !fnproto
    no of entries = 1 757fa768
     
     
    [CSP + 00 ] [       CreateFileW(Num Args = 07) Returns to ] = 75d9e8ef
    [ESP + 04] [ __in LPCWSTR lpFileName                     ] = 00280b34  C:\Windows\Logs\DISM\dism.log
    [ESP + 08] [ __in DWORD dwDesiredAccess                  ] = c0000000
    [ESP + 0c] [ __in DWORD dwShareMode                      ] = 00000003
    [ESP + 10] [ __in_opt LPSECURITY_ATTRIBUTES lpSecurityAt ] = 00000000
    [ESP + 14] [ __in DWORD dwCreationDisposition            ] = 00000004
    [ESP + 18] [ __in DWORD dwFlagsAndAttributes             ] = 00000080
    [ESP + 1c] [ __in_opt HANDLE hTemplateFile )             ] = 00000000
    0:000> kb
     # ChildEBP RetAddr  Args to Child              
    00 000af754 75d9e8ef 00280b34 c0000000 00000003 KERNELBASE!CreateFileW
    01 000af780 57584ee7 00280b34 c0000000 00000003 kernel32!CreateFileWImplementation+0x69
    02 000af7a8 57585b60 001a4cb4 00280b34 07db402b DismCore!IDismConfigurationImpl::put_logFile+0x3b
    03 000afa18 575863f7 07db4073 001a4cb0 001a4cd0 DismCore!CDISMManager::CreateLocalImageSession+0x28a
    04 000afa40 57586c90 00000000 00000000 001a4cd0 DismCore!CDISMManager::get_LocalImageSession+0x93
    05 000afa5c 575823c4 001a4cd0 000afb7c 00000000 DismCore!CDISMManager::GetLocalProviderStore+0x2e
    06 000afb84 00762088 001a4cd0 000afbac 0b271a31 DismCore!CDISMManager::get_Logger+0x23
    07 000afbc8 00762e46 000afc6c 001a2798 0b271dd1 Dism!CDismWrapper::SetupLogging+0xf7
    08 000afc28 0075bf57 000afc6c 000afc68 00000000 Dism!CDismWrapper::Initialize+0x192
    09 000afc7c 0075c3f6 000afd34 000afcb0 80070057 Dism!CCmdlineProcessor::InitializeDism+0x152
    0a 000afc90 0075dd47 000afd34 000afcb0 0b271c3d Dism!CCmdlineProcessor::LogEarlyParseFailure+0x13
    0b 000afdc4 0075decf 00000002 001a1758 00000000 Dism!CCmdlineProcessor::Run+0x279
    0c 000afde0 0076a18f 00000002 001a1758 001a3978 Dism!wmain+0x3d
    0d 000afe24 75d9ed6c 7ffdf000 000afe70 776837eb Dism!_initterm_e+0x163
    0e 000afe30 776837eb 7ffdf000 7726dd79 00000000 kernel32!BaseThreadInitThunk+0xe
    0f 000afe70 776837be 0076a2c0 7ffdf000 00000000 ntdll!__RtlUserThreadStart+0x70
    10 000afe88 00000000 0076a2c0 7ffdf000 00000000 ntdll!_RtlUserThreadStart+0x1b
    write break


    Code:
    [CSP + 00 ] [         WriteFile(Num Args = 05) Returns to ] = 75da543c
    [ESP + 04] [ __in HANDLE hFile                           ] = 000000f8
    [ESP + 08] [ __in_bcount_opt(nNumberOfBytesToWrite) LPCV ] = 00285d58
    [ESP + 0c] [ __in DWORD nNumberOfBytesToWrite            ] = 000000a0
    [ESP + 10] [ __out_opt LPDWORD lpNumberOfBytesWritten    ] = 000af440
    [ESP + 14] [ __inout_opt LPOVERLAPPED lpOverlapped )     ] = 00000000
    0:000> !handle poi(@esp+4)
    Handle f8
      Type         	File
    0:000> dc poi(@esp+8)
    00285d58  30323032 2d31302d 31203132 35353a37  2020-01-21 17:55
    00285d68  2c32353a 666e4920 2020206f 20202020  :52, Info       
    00285d78  20202020 20202020 44202020 204d5349             DISM 
    00285d88  49502020 37353d44 53203639 65636375    PID=5796 Succe
    00285d98  75667373 20796c6c 64616f6c 74206465  ssfully loaded t
    00285da8  49206568 6567616d 73736553 206e6f69  he ImageSession 
    00285db8  22207461 575c3a43 6f646e69 535c7377  at "C:\Windows\S
    00285dc8  65747379 5c32336d 6d736944 202d2022  ystem32\Dism" - 
    0:000> kb
     # ChildEBP RetAddr  Args to Child              
    00 000af3ec 75da543c 000000f8 00285d58 000000a0 KERNELBASE!WriteFile
    01 000af408 58f1c42d 000000f8 00285d58 000000a0 kernel32!WriteFileImplementation+0x76
    02 000af424 58f1cedd 000000f8 00285d58 000000a0 wdscore!WriteFileWin32+0x19
    03 000af444 58f1e56a 00285d58 000000a0 00280890 wdscore!CSharedAccessFile::Append+0x2d
    04 000af464 58f1b29a 001a617c 07d8a359 001a6178 wdscore!CFileDevice::Process+0x5a
    05 000af4a4 58f1b478 07d8a315 00000000 58f01b30 wdscore!CLogManager::WdsSetupLogMessageW+0xa6
    06 000af4e8 58f18cb9 001a6178 00000011 57575c90 wdscore!CLogManager::LogA+0x17c
    07 000af678 5758cd80 00289e00 000b8000 57575c90 wdscore!WdsSetupLogMessageA+0x18d
    08 000af6e0 57581dc2 001a4dc8 000b8000 00000003 DismCore!CPanther::WdsSetupLogMessageW+0xce
    09 000af728 575848f4 001a4cb0 00000003 57571d84 DismCore!CDISMManager::WriteLogEntry+0xad
    0a 000af790 57585dc1 00289d80 00000000 00000001 DismCore!CDISMManager::LoadImageSession+0x561
    0b 000afa18 575863f7 07db4073 001a4cb0 001a4cd0 DismCore!CDISMManager::CreateLocalImageSession+0x4eb
    0c 000afa40 57586c90 00000000 00000000 001a4cd0 DismCore!CDISMManager::get_LocalImageSession+0x93
    0d 000afa5c 575823c4 001a4cd0 000afb7c 00000000 DismCore!CDISMManager::GetLocalProviderStore+0x2e
    0e 000afb84 00762088 001a4cd0 000afbac 0b271a31 DismCore!CDISMManager::get_Logger+0x23
    0f 000afbc8 00762e46 000afc6c 001a2798 0b271dd1 Dism!CDismWrapper::SetupLogging+0xf7
    10 000afc28 0075bf57 000afc6c 000afc68 00000000 Dism!CDismWrapper::Initialize+0x192
    11 000afc7c 0075c3f6 000afd34 000afcb0 80070057 Dism!CCmdlineProcessor::InitializeDism+0x152
    12 000afc90 0075dd47 000afd34 000afcb0 0b271c3d Dism!CCmdlineProcessor::LogEarlyParseFailure+0x13
    13 000afdc4 0075decf 00000002 001a1758 00000000 Dism!CCmdlineProcessor::Run+0x279
    14 000afde0 0076a18f 00000002 001a1758 001a3978 Dism!wmain+0x3d
    15 000afe24 75d9ed6c 7ffdf000 000afe70 776837eb Dism!_initterm_e+0x163
    16 000afe30 776837eb 7ffdf000 7726dd79 00000000 kernel32!BaseThreadInitThunk+0xe
    17 000afe70 776837be 0076a2c0 7ffdf000 00000000 ntdll!__RtlUserThreadStart+0x70
    18 000afe88 00000000 0076a2c0 7ffdf000 00000000 ntdll!_RtlUserThreadStart+0x1b
    Last edited by blabberer; January 21st, 2020 at 01:31.

  3. #3
    Quote Originally Posted by blabberer View Post
    you need to know where to setbreakpoints
    Thanks Blabbs...it's very late and I have managed to throw out both my lower back and mid-back, between shoulder blades. An old war wound from work. I'll need time to digest this.

    I am amazed at how much you know about all this stuff. Besides the BPs, I was thinking of just brute-forcing it by single-stepping to see where it goes. I know it (DISM) uses a tmp file in the users/temp directory where it looks up providers. Not exactly sure what provider means but it seems to be msoft double-speak for libraries. They have functions that do things like check the windir. They are pretty dumb if you ask me, they can't even look up the environment variables and get the windir path. But they must have since they got the path c:\winxp. They just can't accept that it's THE windir.

    Just dawned on me, there may be a BP in the dism log. They do refer to a function with a C-type extension, like foo::foobar that is used to find the windir. I'll look it up tomorrow. Thanks.

  4. #4
    Super Moderator
    Join Date
    Dec 2004
    Posts
    1,525
    Blog Entries
    15
    a complete write sequence for one command

    deleting log file
    Code:
    :\>del c:\Windows\Logs\DISM\dism.log
    Could Not Find c:\Windows\Logs\DISM\dism.log
    windbg automatic seeesion
    Code:
    :\>cdb -c "bp kernelbase!WriteFile \"da /c 100 poi(@esp+8);gc\";g;q" dism /sysdrivedir /? |awk "/Reading/,/quit/"
    0:000> cdb: Reading initial command 'bp kernelbase!WriteFile "da /c 100 poi(@esp+8);gc";g;q'
    ModLoad: 75ad0000 75aef000   C:\Windows\system32\IMM32.DLL
    ModLoad: 75f10000 75fdc000   C:\Windows\system32\MSCTF.dll
    ModLoad: 756f0000 756fc000   C:\Windows\system32\CRYPTBASE.dll
    ModLoad: 58d70000 58dc2000   C:\Windows\System32\Dism\DismCore.dll
    ModLoad: 57f70000 57fa2000   C:\Windows\system32\wdscore.dll
    003247e8  "..Deployment Image Servicing and Management tool..Version: 6.1.7600.16385..............................................................................................."
    
    Deployment Image Servicing and Management tool
    Version: 6.1.7600.16385
    
    ModLoad: 58f10000 58f20000   C:\Windows\System32\Dism\DismCorePS.dll
    ModLoad: 75c60000 75ce3000   C:\Windows\system32\CLBCatQ.DLL
    ModLoad: 751f0000 75206000   C:\Windows\system32\CRYPTSP.dll
    ModLoad: 74f90000 74fcb000   C:\Windows\system32\rsaenh.dll
    ModLoad: 75760000 7576e000   C:\Windows\system32\RpcRtRemote.dll
    ModLoad: 713c0000 714ab000   C:\Windows\system32\dbghelp.dll
    0018f2f8  "..."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   PID=5984 Scratch directory set to 'C:\Users\xx\AppData\Local\Temp\'. - CDISMManager::put_ScratchDir.."
    ModLoad: 57f20000 57f66000   C:\Windows\System32\Dism\dismprov.dll
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   PID=5984 Successfully loaded the ImageSession at "C:\Windows\System32\Dism" - CDISMManager::LoadImageSession.."
    PID=5984 Instantiating the Provider Store. - CDISMImageSession::get_ProviderStorePID=5984 Initializing a provider store for the LOCAL session type. - CDISMProviderStore::Final_OnConnectPID=5984 Attempting to initialize the logger from the Image Session. - CDISMProviderStore::Final_OnConnectPID=5984 Provider has not previously been encountered.  Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProviderPID=5984 Loading Provider from location C:\Windows\System32\Dism\LogProvider.dll - CDISMProviderStore::Internal_GetProviderModLoad: 57d60000 57d88000   C:\Windows\System32\Dism\LogProvider.dll
    PID=5984 Connecting to the provider located at C:\Windows\System32\Dism\LogProvider.dll. - CDISMProviderStore::Internal_LoadProviderPID=5984 Getting Provider OSServices - CDISMProviderStore::GetProviderPID=5984 The requested provider was not found in the Provider Store. - CDISMProviderStore::Internal_GetProvider(hr:0x80004005)PID=5984 Failed to get an OSServices provider. Must be running in local store. Falling back to checking alongside the log provider for wdscore.dll. - CDISMLogger::FindWdsCore(hr:0x80004005)00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger.."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Failed to get and initialize the PE Provider.  Continuing by assuming that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect.."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Finished initializing the Provider Map. - CDISMProviderStore::Final_OnConnect.."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Getting Provider DISMLogger - CDISMProviderStore::GetProvider.."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Provider has previously been initialized.  Returning the existing instance. - CDISMProviderStore::Internal_GetProvider.."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Getting Provider DISMLogger - CDISMProviderStore::GetProvider.."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Provider has previously been initialized.  Returning the existing instance. - CDISMProviderStore::Internal_GetProvider.."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM Manager: PID=5984 Successfully created the local image session and provider store. - CDISMManager::CreateLocalImageSession.."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Getting Provider DISMLogger - CDISMProviderStore::GetProvider.."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Provider has previously been initialized.  Returning the existing instance. - CDISMProviderStore::Internal_GetProvider.."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM.EXE: .."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM.EXE: <----- Starting Dism.exe session ----->.."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM.EXE: .."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM.EXE: Host machine information: OS Version=6.1.7601, Running architecture=x86, Number of processors=1.."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM.EXE: Executing command line: dism /sysdrivedir /? .."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection.."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Provider has not previously been encountered.  Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider.."
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Loading Provider from location C:\Windows\System32\Dism\WimProvider.dll - CDISMProviderStore::Internal_GetProvider.."
    ModLoad: 57cf0000 57d60000   C:\Windows\System32\Dism\WimProvider.dll
    ModLoad: 57800000 57867000   C:\Windows\system32\WIMGAPI.DLL
    00335bd0  "2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Connecting to the provider located at C:\Windows\System32\Dism\WimProvider.dll. - CDISMProviderStore::Internal_LoadProvider.."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM Provider Store: PID=5984 Provider has not previously been encountered.  Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider.."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM Provider Store: PID=5984 Loading Provider from location C:\Windows\System32\Dism\FolderProvider.dll - CDISMProviderStore::Internal_GetProvider.."
    ModLoad: 580b0000 580d0000   C:\Windows\System32\Dism\FolderProvider.dll
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM Provider Store: PID=5984 Connecting to the provider located at C:\Windows\System32\Dism\FolderProvider.dll. - CDISMProviderStore::Internal_LoadProvider.."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM Provider Store: PID=5984 Provider has not previously been encountered.  Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider.."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM Provider Store: PID=5984 Loading Provider from location C:\Windows\System32\Dism\CompatProvider.dll - CDISMProviderStore::Internal_GetProvider.."
    ModLoad: 577b0000 577f5000   C:\Windows\System32\Dism\CompatProvider.dll
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM Provider Store: PID=5984 Connecting to the provider located at C:\Windows\System32\Dism\CompatProvider.dll. - CDISMProviderStore::Internal_LoadProvider.."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Got the collection of providers. Now enumerating them to build the command table..."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: WimManager.."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Getting the help information collection for the provider: WimManager..."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Registering information from the help collection from provider: WimManager..."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Succesfully registered the Help Item with topic(wimcommands) and category(localtoplevelhelp) for the provider(WimManager)..."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Succesfully registered the Help Item with topic(cleanup-wim) and category(wimcommands) for the provider(WimManager)..."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Succesfully registered the Help Item with topic(remount-wim) and category(wimcommands) for the provider(WimManager)..."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Succesfully registered the Help Item with topic(mount-wim) and category(wimcommands) for the provider(WimManager)..."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Succesfully registered the Help Item with topic(unmount-wim) and category(wimcommands) for the provider(WimManager)..."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Succesfully registered the Help Item with topic(commit-wim) and category(wimcommands) for the provider(WimManager)..."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Succesfully registered the Help Item with topic(get-wiminfo) and category(wimcommands) for the provider(WimManager)..."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Succesfully registered the Help Item with topic(get-mountedwiminfo) and category(wimcommands) for the provider(WimManager)..."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: FolderManager.."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: DISM Log Provider.."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: Compatibility Manager.."
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Getting the help information collection for the provider: Compatibility Manager..."
    0034bfc8  "../Image:<path_to_offline_image> [/SysDriveDir:<path_to_bootmgr>]....  Specifies the path to the directory of the bootmgr file. If not..  specified, it defaults to the offline image path.....  This option cannot be used with the /Online option.....    Exam"
    0034c0c8  "ple:..      DISM.exe /Image:C:\test\offline /SysDriveDir:C:\...................................................................."
    
    /Image:<path_to_offline_image> [/SysDriveDir:<path_to_bootmgr>]
    
      Specifies the path to the directory of the bootmgr file. If not
      specified, it defaults to the offline image path.
    
      This option cannot be used with the /Online option.
    
        Example:
          DISM.exe /Image:C:\test\offline /SysDriveDir:C:\
    
    
    00335bd0  "2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Image session has been closed. Reboot required=no..."
    00335bd0  "2020-01-21 19:24:57, Info                  DISM   DISM.EXE: .."
    00335bd0  "2020-01-21 19:24:57, Info                  DISM   DISM.EXE: <----- Ending Dism.exe session ----->.."
    00335bd0  "2020-01-21 19:24:57, Info                  DISM   DISM.EXE: .."
    00335bd0  "2020-01-21 19:24:57, Info                  DISM   DISM Image Session: PID=5984 Disconnecting the provider store - CDISMImageSession::Final_OnDisconnect.."
    00335bd0  "2020-01-21 19:24:57, Info                  DISM   DISM Provider Store: PID=5984 Disconnecting Provider: WimManager - CDISMProviderStore::Internal_DisconnectProvider.."
    00335bd0  "2020-01-21 19:24:57, Info                  DISM   DISM Provider Store: PID=5984 Disconnecting Provider: FolderManager - CDISMProviderStore::Internal_DisconnectProvider.."
    00335bd0  "2020-01-21 19:24:57, Info                  DISM   DISM Provider Store: PID=5984 Found the OSServices.  Waiting to finalize it until all other providers are unloaded. - CDISMProviderStore::Final_OnDisconnect.."
    00335bd0  "2020-01-21 19:24:57, Info                  DISM   DISM Provider Store: PID=5984 Disconnecting Provider: Compatibility Manager - CDISMProviderStore::Internal_DisconnectProvider.."
    00335bd0  "2020-01-21 19:24:57, Info                  DISM   DISM Provider Store: PID=5984 Releasing the local reference to DISMLogger.  Stop logging. - CDISMProviderStore::Internal_DisconnectProvider.."
    PID=5984 Encountered a loaded provider DISMLogger. - CDISMProviderStore::Internal_DisconnectProviderPID=5984 Disconnecting Provider: DISMLogger - CDISMProviderStore::Internal_DisconnectProviderquit:

    file contents post windbg session


    Code:
    :\>cat c:\Windows\Logs\DISM\dism.log
    2020-01-21 19:24:55, Info                  DISM   PID=5984 Scratch directory set to 'C:\Users\xx\AppData\Local\Temp\'. - CDISMManager::put_ScratchDir
    2020-01-21 19:24:55, Info                  DISM   PID=5984 Successfully loaded the ImageSession at "C:\Windows\System32\Dism" - CDISMManager::LoadImageSession
    2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger
    2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Failed to get and initialize the PE Provider.  Continuing by assuming that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect
    2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Finished initializing the Provider Map. - CDISMProviderStore::Final_OnConnect
    2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Getting Provider DISMLogger - CDISMProviderStore::GetProvider
    2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Provider has previously been initialized.  Returning the existing instance. - CDISMProviderStore::Internal_GetProvider
    2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Getting Provider DISMLogger - CDISMProviderStore::GetProvider
    2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Provider has previously been initialized.  Returning the existing instance. - CDISMProviderStore::Internal_GetProvider
    2020-01-21 19:24:55, Info                  DISM   DISM Manager: PID=5984 Successfully created the local image session and provider store. - CDISMManager::CreateLocalImageSession
    2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Getting Provider DISMLogger - CDISMProviderStore::GetProvider
    2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Provider has previously been initialized.  Returning the existing instance. - CDISMProviderStore::Internal_GetProvider
    2020-01-21 19:24:55, Info                  DISM   DISM.EXE:
    2020-01-21 19:24:55, Info                  DISM   DISM.EXE: <----- Starting Dism.exe session ----->
    2020-01-21 19:24:55, Info                  DISM   DISM.EXE:
    2020-01-21 19:24:55, Info                  DISM   DISM.EXE: Host machine information: OS Version=6.1.7601, Running architecture=x86, Number of processors=1
    2020-01-21 19:24:55, Info                  DISM   DISM.EXE: Executing command line: dism /sysdrivedir /?
    2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection
    2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Provider has not previously been encountered.  Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider
    2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Loading Provider from location C:\Windows\System32\Dism\WimProvider.dll - CDISMProviderStore::Internal_GetProvider
    2020-01-21 19:24:55, Info                  DISM   DISM Provider Store: PID=5984 Connecting to the provider located at C:\Windows\System32\Dism\WimProvider.dll. - CDISMProviderStore::Internal_LoadProvider
    2020-01-21 19:24:56, Info                  DISM   DISM Provider Store: PID=5984 Provider has not previously been encountered.  Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider
    2020-01-21 19:24:56, Info                  DISM   DISM Provider Store: PID=5984 Loading Provider from location C:\Windows\System32\Dism\FolderProvider.dll - CDISMProviderStore::Internal_GetProvider
    2020-01-21 19:24:56, Info                  DISM   DISM Provider Store: PID=5984 Connecting to the provider located at C:\Windows\System32\Dism\FolderProvider.dll. - CDISMProviderStore::Internal_LoadProvider
    2020-01-21 19:24:56, Info                  DISM   DISM Provider Store: PID=5984 Provider has not previously been encountered.  Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider
    2020-01-21 19:24:56, Info                  DISM   DISM Provider Store: PID=5984 Loading Provider from location C:\Windows\System32\Dism\CompatProvider.dll - CDISMProviderStore::Internal_GetProvider
    2020-01-21 19:24:56, Info                  DISM   DISM Provider Store: PID=5984 Connecting to the provider located at C:\Windows\System32\Dism\CompatProvider.dll. - CDISMProviderStore::Internal_LoadProvider
    2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Got the collection of providers. Now enumerating them to build the command table.
    2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: WimManager
    2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Getting the help information collection for the provider: WimManager.
    2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Registering information from the help collection from provider: WimManager.
    2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Succesfully registered the Help Item with topic(wimcommands) and category(localtoplevelhelp) for the provider(WimManager).
    2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Succesfully registered the Help Item with topic(cleanup-wim) and category(wimcommands) for the provider(WimManager).
    2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Succesfully registered the Help Item with topic(remount-wim) and category(wimcommands) for the provider(WimManager).
    2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Succesfully registered the Help Item with topic(mount-wim) and category(wimcommands) for the provider(WimManager).
    2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Succesfully registered the Help Item with topic(unmount-wim) and category(wimcommands) for the provider(WimManager).
    2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Succesfully registered the Help Item with topic(commit-wim) and category(wimcommands) for the provider(WimManager).
    2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Succesfully registered the Help Item with topic(get-wiminfo) and category(wimcommands) for the provider(WimManager).
    2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Succesfully registered the Help Item with topic(get-mountedwiminfo) and category(wimcommands) for the provider(WimManager).
    2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: FolderManager
    2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: DISM Log Provider
    2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: Compatibility Manager
    2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Getting the help information collection for the provider: Compatibility Manager.
    2020-01-21 19:24:56, Info                  DISM   DISM.EXE: Image session has been closed. Reboot required=no.
    2020-01-21 19:24:57, Info                  DISM   DISM.EXE:
    2020-01-21 19:24:57, Info                  DISM   DISM.EXE: <----- Ending Dism.exe session ----->
    2020-01-21 19:24:57, Info                  DISM   DISM.EXE:
    2020-01-21 19:24:57, Info                  DISM   DISM Image Session: PID=5984 Disconnecting the provider store - CDISMImageSession::Final_OnDisconnect
    2020-01-21 19:24:57, Info                  DISM   DISM Provider Store: PID=5984 Disconnecting Provider: WimManager - CDISMProviderStore::Internal_DisconnectProvider
    2020-01-21 19:24:57, Info                  DISM   DISM Provider Store: PID=5984 Disconnecting Provider: FolderManager - CDISMProviderStore::Internal_DisconnectProvider
    2020-01-21 19:24:57, Info                  DISM   DISM Provider Store: PID=5984 Found the OSServices.  Waiting to finalize it until all other providers are unloaded. - CDISMProviderStore::Final_OnDisconnect
    2020-01-21 19:24:57, Info                  DISM   DISM Provider Store: PID=5984 Disconnecting Provider: Compatibility Manager - CDISMProviderStore::Internal_DisconnectProvider
    2020-01-21 19:24:57, Info                  DISM   DISM Provider Store: PID=5984 Releasing the local reference to DISMLogger.  Stop logging. - CDISMProviderStore::Internal_DisconnectProvider
    
    :\>

  5. #5
    Blabbs...I was trying to replicate your command line for cdb but it did not like the awk commands at the end. How did you manage to incorporate an awk compiler into Windows?

    I appreciate your effort but maybe I am misleading you through my ignorance of dism. I may be premature with my assumption that tracing into dism will reveal answers.

    Here's more info.

    I removed the awk reference and it ran but it gave me essentially the same o/p I got from running dism /sysdrivedir /? in a command window. It tells me that command cannot be used in the online mode, only with an image. Furthermore, /sysdrivedir refers to the directory of the bootmgr file. If not specified, it defaults to the offline imagepath. Have no idea what that means. Don't know what bootmgr has to do with it unless they are reading boot.ini to get a system path.

    Part of the problem is that I have essentially no idea what I'm doing with dism. I have used it in the past on W7 to check system health and to load drivers into an image but not in this manner where I am simply trying to verify the integrity of an OS. It's suppose to work and according to sources online it should work. However, how is dism supposed to verify the integrity of an OS unless it has a reference offline OS image with which to compare it? Maybe I am supposed to have the installation disk in the optical drive but I tried and it did not work.

    I have read on this for hours on the Net but most articles are about applying commands, not how or what dism is supposed to do. Even Microsoft is vague on the issue.

    If you use the query: dism /online /? it returns "The following commands may be used to service the image:" Since my query was about an online image, meaning the image of a running OS, I would presume that's what image means. But, no, msoft goes on to talk about offline images. Therefore the distinction between 'online' and 'image' is not clear.

    They give an example:

    DISM.exe /Image:C:\test\offline /Get-Features /?

    When I apply that in a W7 install I get an error: 3 ....Unable to access the image.
    Make sure that the image path and the Windows directory for the image exist and you have Read permissions on the folder.

    I mean, this is using dism as it naturally resides on W7. I'll try it on W10, maybe I can access W7 and/or XP offline through W10.

    You are supposed to be able to use dism in conjunction with System File Checker to clean up an operating OS.

    For example, the command:

    dism /online /cleanup-image /checkhealth

    is supposed to simply check the health of the online OS. So, I ran it on w7 and got an error "The checkhealth option is not recognized in this context. For more information, refer to the help.

    This is maddening. If I run it on XP I get this error: 126...An error occurred while attempting to access the image. The crux of the error in the log file is this:

    DISM OS Provider: PID=2224 Defaulting SystemPath to c:\ ~CDISOSServiceManager::Final_OnConnect
    DISM OS Provider: PID=2224 Defaulting Windows folder to C:\Windows - CDISOSServiceManager::Final_OnConnect

    Then it says: Failed to bind the offline servicing stack. Make sure that the Windows directory has been set.

    Then this brilliance [/sarc off]....There were errors when setting the default windows directory to C:/Windows. No kidding!!!!

    Surely the programmers who wrote dism are not that stupid. They have already identified the dism directory as c:\winxp\system32\dism and the windir is stated in the environment variables as c:\winxp.

    I am thinking they are looking for an installation disk or an installation image file with a '.wim' extension. That would explain why they are looking for a windows folder but then it would be in D:\windows on a disk or at a specified image directory.

  6. #6
    Super Moderator
    Join Date
    Dec 2004
    Posts
    1,525
    Blog Entries
    15
    awk is available for windows from gnuwin32 utilities (for x64 awk iirc is available in msys\mingw )

    i am not sure where you get all this info about command lines (the checkhealth is available in windows 10 not in windows 7 and obviously absolutely not in xp)

    in a stock windows 7 dism /online /cleanup-image has only two options /revetpending and /spsuperseded /hidesp

    /revertpending needs an offline image (crap.wim located at say x:\y\z)

    /Cleanup-Image needs an image

    actually there is a system update blah blah that was available forwindows7 which is parent to dism in windows 10



    Code:
    The System Update Readiness Tool verifies the integrity of the following resources:
    
        Files that are located in the following directories:
            %SYSTEMROOT%\Servicing\Packages
            %SYSTEMROOT%\WinSxS\Manifests
        Registry data that is located under the following registry subkeys:
            HKEY_LOCAL_MACHINE\Components
            HKEY_LOCAL_MACHINE\Schema
            HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing
    
    This list may be updated at any time.
    
    When the System Update Readiness Tool detects incorrect manifests, Cabinets, or registry data, it may replace the incorrect data with a corrected version.
    Logging
    
     
    The System Update Readiness Tool creates a log file that captures any issues that the tool found or fixed. The log file is located here:
    
        %SYSTEMROOT%\Logs\CBS\CheckSUR.log
        %SYSTEMROOT%\Logs\CBS\CheckSUR.persist.log
    
    How to fix errors that are found in the CheckSUR.log

    here is an online (running computer ) not an image get-feature /featureinfo result (for game FreeCell (beware of Capitlaization freeCell/Freecell/FR33c311 wontwork)



    Code:
    C:\>DISM.exe /online /Get-Featureinfo /FeatureName:FreeCell
    
    Deployment Image Servicing and Management tool
    Version: 6.1.7600.16385
    
    Image Version: 6.1.7601.17514
    
    Feature Information:
    
    Feature Name : FreeCell
    Display Name : FreeCell
    Description : FreeCell
    Restart Required : Possible
    State : Enabled
    
    Custom Properties:
    
    (No custom properties found)
    
    The operation completed successfully.
    
    C:\>
    Last edited by blabberer; January 22nd, 2020 at 01:45.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •