Checking current windows version
-
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? -
@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.