Updating third-party programs from install.wim offline images

Page 1 of 2 12 LastLast

  1. Posts : 16
    windows 10 x 64 20H2, Ubuntu 2010 & MAC
       #1

    Updating third-party programs from install.wim offline images


    Hi,

    I have an unattended install with 7zip, vlc, Java, etc, I am looking for a way to update the install.wim file when they update without having to capture a new image.

    Any option to be able to update third party programs without having to capture a new image in install.wim?

    Some tutorial or link in which I can see how to do it, I have searched the forum, but I did not find anything on this subject, I do not know if it would be possible, it would also help me to know where to leave the exe or msi so that they will be updated in the installation ol finish it.

    Sorry for my bad English.

    Thanks a lot.
      My Computer


  2. Posts : 4,187
    Windows 11 Pro, 22H2
       #2

    drotha2,

    First, your English is just fine .

    Unfortunately, you won't be able to this. Installation of application involves not only placement of files in various locations of the Windows installation, but it can involve registry changes, updating various configuration files, and a whole lot more. All of these operations are handled by the installation program which is designed to run within a running instance of Windows.

    As a result, the only real way to update your install.wim would be to maintain a reference system, update it with application updates when they become available, and then re-image that system.

    At first I thought that you might be able to add a "setupcomplete.cmd" to your your install.wim and inject the installers for the programs that you want to update, but I'm starting to think that this might not work because setupcomplete.cmd runs before any user is logged on.

    In the meantime, I'll try to research this more to see if I can find any other ideas.
      My Computers


  3. Posts : 4,187
    Windows 11 Pro, 22H2
       #3

    Status update:

    I think I know how we can make this work. Here is my idea, but I will need to test this.

    I don't know if you are using specifying any files to be run automatically when a user logs on, but we might be able to add something to this location in your image:

    C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

    I typically put a file there called RunOnce.bat which will run only one time and then delete itself. We could do the same thing here and add commands that will run the installers for your apps so that they are upgraded to the new versions.

    I have not this myself but I think that it should work. I'll do a test and let you know if I get it to work.I'm not certain that I will have the time today, but I'll do so as soon as I can.
      My Computers


  4. Posts : 16
    windows 10 x 64 20H2, Ubuntu 2010 & MAC
    Thread Starter
       #4

    Thank you very much for your help.

    His idea seems acceptable, thinking that he would have to put the executables in a folder in which he could put the programs, deleted once updated so that there are no residents after installation.

    I do not know if you know of another way to edit a WIM, I tried 7ZIP and it allows me to add, delete, etc., if you know a more optimal way to do it, tell me.

    I can do tests and thus not bother him so much.

    Sorry to bother you, I hope I can return the favor one day.
    I'm really grateful to you.

    Thank you so much for everything.
      My Computer


  5. Posts : 4,594
    several
       #5

    I used a .cmd file in startup folder on Vista to install net frame updates and my own vista winre.wim etc.

    Or you could use runonce key.
      My Computer


  6. Posts : 4,187
    Windows 11 Pro, 22H2
       #6

    @drotha2, I can tell you exactly how to edit a WIM. For me, that part is easy . The problem is that I have some other details I still need to work out, as you'll see from my questions below.

    @SIW2, thanks for your response, but there is one piece that is stumping me. I was thinking precisely as you noted, using the runonce. But how do I get Windows to copy my own files from the installation media to the PC during the unattended installation?

    For example, I would need to have it copy the the installer files for VLC, 7ZIP, etc. Once they are copied, then it would be easy to run them from the runonce, but I'm just not sure how to get the unattended setup to copy those files.
      My Computers


  7. Posts : 4,594
    several
       #7

    One way is to call a .cmd file from startup or runonce .

    That .cmd file can search the installation media for the what you want to install. E.g. put a text file on the installation media called

    installstuff.txt

    Then the cmd file searches all drives for the tag installstuff.txt

    FOR %%I IN (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%I:\installstuff.txt SET INSTALLMEDIADRIVE=%%I:


    That way, there could be a folder on the installation media called e.g. Stuff

    the cmd file then installs from %INSTALLMEDIADRIVE%\stuff .


    Another way is to put a folder called stuff ( with msi and exe etc files inside it ) in sources\$OEM$\$1\

    windows setup copies the contents of sources\$OEM$\$1\ folder to the installation drive. So you get C:\stuff

    Your cmd file would then just need to install from %systemdrive%\stuff folder.
    Last edited by SIW2; 26 Jan 2021 at 17:48.
      My Computer


  8. Posts : 4,187
    Windows 11 Pro, 22H2
       #8

    Ah yes! That makes perfect sense.

    Okay, time to do some testing

    Thank you.
      My Computers


  9. Posts : 4,187
    Windows 11 Pro, 22H2
       #9

    @drotha2, the suggestion that @SIW2 provided was the missing piece for me. I tested and I have this working but with one one minor problem so far.

    I did my test with VLC and it doesn't look like VLC has a true silent install option. The result is that when the user logs on the first time they will see the installer for VLC and they will need to click through the screens to complete the installation. If that's a problem, there appear to be articles on the internet with workarounds, but I'll let you research that part for now. Hopefully this won't ruin the whole plan for you.

    Unfortunately, I'm just flat out of time at the moment, but I'll write up a detailed procedure either late tonight or tomorrow morning.
      My Computers


  10. Posts : 4,594
    several
       #10

    You might need to give it the language code

    vlc-whatever.exe /L=1033 /s

    I think then when the user runs VLC for the first time, then it asks privacy questions.

    If the os language code (OSLCID) needs to be found, I eventually... found out a way to do that when making one of my pebuilding things.There might be a simpler way.

    Code:
    @ECHO OFF
    for /f "Skip=1 Tokens=3" %%a in ('REG QUERY "HKEY_CURRENT_USER\Control Panel\International" /v "Locale"') do (
    set Ldata=%%a
      )
    echo.
    set Ldata=%Ldata: =%
    echo.
    setlocal enabledelayedexpansion
    echo.                                      
    set /a decstring=0x!Ldata!                                     
        set pad=                                                           
        if !decstring! leq 9999 set pad=!pad!                             
        if !decstring! leq 999 set pad=!pad!                              
        if !decstring! leq 99 set pad=!pad!                               
        if !decstring! leq 9 set pad=!pad!                                
        set decstring=!pad!!decstring!                                     
        echo.
        echo !decstring! > lcid.txt  
      echo. 
    endlocal
    
    for /f "tokens=1* " %%a in (lcid.txt) do ( SET OSLCID=%%a)
    echo.
    echo  L DATA is %Ldata%
    echo.
    echo  OS LCID is %OSLCID%
    echo.
    pause
     ::IF EXIST "lcid.txt" DEL /Q "lcid.txt"
    Last edited by SIW2; 26 Jan 2021 at 20:36.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:08.
Find Us




Windows 10 Forums