• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Checking current windows version

    Scheduled Pinned Locked Moved
    General
    2
    2
    835
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Z
      zaboxmaster
      last edited by

      So what I am trying to do is when the computer is registered and is put through the fog.inventory file, I am trying to get what current Windows version is installed on the current drive and assign that to a certain image. IE. if it picks up that Windows 10 Home is installed, it then deploys the Windows 10 home image.

      So I can see that we can use chntpw to run the command to determine the OS version.

      chntpw -e /path/to/windisk/Windows/System32/config/SOFTWARE
      cat \Microsoft\Windows NT\CurrentVersion\ProductName
      

      The question is how would I go about doing this if at all possible?
      Where would the best place be to run it from? FOG.MAN.REG ???
      Is the Windows mounted at all during registration?

      george1421G 1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator @zaboxmaster
        last edited by george1421

        @zaboxmaster Another opiton might be to access the windows registry to read out the version. Within the FOG OS (FOS) linux there is the linux reged program. That can be used to read/edit the windows registry.

        Below is an example from one of my tutorials on post install scripts to update a registry key. That is only meant to show you what is needed to make the program work.

        egfile=“/ntfs/Windows/System32/config/SOFTWARE”
        key=“\Microsoft\Windows\CurrentVersion\DevicePath”
        devpath=“%SystemRoot%\DRV;%SystemRoot%\inf;”;
        reged -e “$regfile” &>/dev/null <<EOFREG
        ed $key
        

        The question is how would I go about doing this if at all possible?
        Where would the best place be to run it from? FOG.MAN.REG ???
        Is the Windows mounted at all during registration?

        Is it possible, yes

        Best place, yes probably a customized version of fog.man.reg (I have a tutorial on how to slide an updated version of that into FOS Linux at deploy time). To make the inventory also query the target OS.

        No windows os partition is not mounted during inventory. For FOG inventory its not needed. BUT I have a tutorial on how to find and mount the partition during a post install script for driver injection that you can use as the basis for the inventory process.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post

        235

        Online

        12.0k

        Users

        17.3k

        Topics

        155.2k

        Posts
        Copyright © 2012-2024 FOG Project