• AHK – Detect MCT ISO info

    Home » Forums » Developers, developers, developers » DevOps Lounge » AHK – Detect MCT ISO info

    Author
    Topic
    #2513226

    I have MCT (Media Creation Tool) USB installers and sometimes it’s difficult to keep track of them.

    I don’t know how to use PowerShell to ‘select file’ so I used AutoHotkey as a simple GUI wrapper for DISM:

    #SingleInstance, Force
    If !A_IsAdmin
    Run *RunAs "%A_AhkPath%" "%A_ScriptFullPath%"
    Process, Priority, , H
    Clipboard := "" ; Clear the clipboard of any content
    FileSelectFile, SelectedFile, 3, , Select an install file, (install.wim; install.esd)
    if (SelectedFile = "")
    {
    MsgBox, The user didn't select anything.
    ExitApp
    }
    RunWait, %comspec% /c "dism /get-wiminfo /wimfile:%SelectedFile% /index:1 |clip",,hide ;Pass the parameters to DISM
    MsgBox, %Clipboard% ; Display the result
    ExitApp

    It’s a very simple script that uses ‘Run as administrator’ to show a dialog to select either a .WIM or .ESD file from an MCT installer USB then leverages DISM (which needs elevation) to show you some of its properties.

    Example:

    Detect_ISO_select

    Detect_ISO_02-1

    Hope this helps…

    • This topic was modified 2 months, 3 weeks ago by Rick Corbett.
    • This topic was modified 2 months, 3 weeks ago by Rick Corbett.
    • This topic was modified 2 months, 3 weeks ago by Rick Corbett.
    Reply To: AHK – Detect MCT ISO info

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: