A new Flexera Community experience is coming on November 18th, click here for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Clarify $(ProgramData);$(ProgramFiles);$(ProgramFiles(x86)) Includedirectory use

Ronny_OO7
By Level 8 Champion
Level 8 Champion

Hello I would like to know what is exactly included for files scanning if you use: 

$(ProgramData);$(ProgramFiles);$(ProgramFiles(x86))

Gathering Inventory mentioned:

Values
Values / range The valid folder name where applications are installed.
Default values Default values respectively on a 32-bit platform are:
Program Files
Program Files
"" (empty value).
Default values on a 64-bit platform are:
Program Files
Program Files (x86)
Program Files
Example values -o ProgramFiles=”D:\Program Files”

So does that cover all installations of software in D:\Program Files” E:\Program Files” F drive etc and 32 and 64 bit?

 

Also what system setting is this depending on? Path?

Also can Flexera share an list with all supported $(paramaters)

Thanks and Regards

Ronald

 

(1) Solution

Here's a shot at answering these questions:


1:  Would like to know what is exactly included for files scanning if you use the paramater? So what are they designed to collect information from? On what system paramaters? 

The inventory gathering process will collect details about executable files that are found in or under any directories specified by the IncludeDirectory FlexNet agent preference. On Windows, the gathered details include the filename, path, size, and selected properties from WinPE header information in the executable file (if available). Here is an example from what you may see in an inventory NDI file showing data gathered about an executable file:

<Content MD5="NO_MD5" Size="461824">
	<Instance Path="C:\Program Files\7-Zip\7z.exe" DateTime="20180430T180000"/>
	<Property Name="CompanyName" Value="Igor Pavlov"/>
	<Property Name="LegalCopyright" Value="Copyright (c) 1999-2018 Igor Pavlov"/>
	<Property Name="OriginalFilename" Value="7z.exe"/>
	<Property Name="ProductName" Value="7-Zip"/>
	<Property Name="ProductVersion" Value="18.05"/>
	<Property Name="FileVersion" Value="18.05"/>
	<Property Name="WinPE Version" Value="18.5.0.0"/>
	<Property Name="FileDescription" Value="7-Zip Console"/>
	<Property Name="InternalName" Value="7z"/>
	<Property Name="Language" Value="1033"/>
</Content>

 


2: How exact the values for these preferences are obtained

FlexNet agent preference values are taken from:

  1. Command line options when invoking the appropriate process (for example: ndtrack.exe -o IncludeDirectory=c:\); or
  2. The registry (for example, HKLM\SOFTWARE\Wow6432Node\ManageSoft Corp\ManageSoft\Tracker\CurrentVersion\IncludeDirectory=C:\) - see [Registry] Explained for more info

If you specify any directories to be included in inventory on the Inventory Settings page in the FlexNet Manager Suite web UI, then those details will end up in the agent policy. When the agent applies its policy the value will get stored in the registry entry noted above to be picked up when the inventory gathering process is executed.

 


3: If this works also in the Zerotouch agent

If ndtrack is invoked in a zero-touch manner (i.e. without the agent fully installed) then preference values won't be stored in or taken from the registry. Non-default preference values will only be obtained from the command line that is used to invoke ndtrack in this case.

 


4: Do the paramater cover all Flavours of programdata and programfiles on C,D,E etc and 32 and 64 bit

The $(ProgramFiles), $(ProgramFilesX86) and $(ProgramData) agent preference references correspond to the similarly named folder IDs described on the following Microsoft docs page: KNOWNFOLDERID. That page discusses the how the semantics of these values differ between 32 and 64 bit operating systems.

Each installation of Windows only has a single formal ProgramFiles/ProgramFilesX86/ProgramData directory, which is what the agent preferences here refer to. Even if you have (say) a D:\Program Files directory that exists on the filesystem, Windows likely won't recognize it as the operating system's ProgramFiles directory which would normally be on the C:\ drive.

 

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)

View solution in original post

(12) Replies

@Ronny_OO7 

AFAIK these parameters refer to the Windows parameters set, e.g. for my laptop:

ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)

Thanks,

Thanks John,
What Windows paramaters exacly? I would like to know the exact way it is designed.

Regards
Ronald

@Ronny_OO7  - These parameters are seldom used because the Windows Folders to include or exclude are specified on the Inventory Settings page in the FNMS User Interface (see attached image).

By default, File Scanning is not enabled.  On the Inventory Settings page, you can enable File Scanning for Windows.  In general, this is all that is needed.  When this is specified, then all folders on the local drives of the device are scanned, except the $(WindowsFolder) is always excluded

If you want to change the above behavior, then you can specify specific folders to Include or Exclude within the Inventory Settings.

Additional details on File Evidence gathering can be found in the On-Line Help.

https://docs.flexera.com/fnms/EN/WebHelp/index.html#tasks/InvSet-FileInvSection.html

 

 

Thanks Kirk, but I already knew that but this doesnt answer my question.  pleaset let me clarify on Chris his reply

@Ronny_OO7 - are you wanting to know how the values for these preferences are obtained?

Generally these preferences default (on Windows operating systems) to values obtained through the SHGetKnownFolderPath function available from the Windows Shell API. For example, the default value for the ProgramFiles preference is obtained by calling SHGetKnownFolderPath with a KNOWNFOLDERID value of FOLDERID_ProgramFiles.

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)

Thank Chris, yes also so to summarize:

1:  Would like to know what is exactly included for files scanning if you use the paramater? So what are they designed to collect information from? On what system paramaters? 

2: How exact the values for these preferences are obtained

3: If this works also in the Zerotouch agent

4: Do the paramater cover all Flavours of programdata and programfiles on C,D,E etc and 32 and 64 bit

I am asking this so that if you would like to troubleshoot or verify you can simply logon to an system and check the system settings or location.  For example some systems have c:\programfiles on c, other or D or F in 32 bit and 64 bit different options on systems and I would like to make sure 100% is being covered with these paramaters.

 

Regards

 

Ronald

 

Here's a shot at answering these questions:


1:  Would like to know what is exactly included for files scanning if you use the paramater? So what are they designed to collect information from? On what system paramaters? 

The inventory gathering process will collect details about executable files that are found in or under any directories specified by the IncludeDirectory FlexNet agent preference. On Windows, the gathered details include the filename, path, size, and selected properties from WinPE header information in the executable file (if available). Here is an example from what you may see in an inventory NDI file showing data gathered about an executable file:

<Content MD5="NO_MD5" Size="461824">
	<Instance Path="C:\Program Files\7-Zip\7z.exe" DateTime="20180430T180000"/>
	<Property Name="CompanyName" Value="Igor Pavlov"/>
	<Property Name="LegalCopyright" Value="Copyright (c) 1999-2018 Igor Pavlov"/>
	<Property Name="OriginalFilename" Value="7z.exe"/>
	<Property Name="ProductName" Value="7-Zip"/>
	<Property Name="ProductVersion" Value="18.05"/>
	<Property Name="FileVersion" Value="18.05"/>
	<Property Name="WinPE Version" Value="18.5.0.0"/>
	<Property Name="FileDescription" Value="7-Zip Console"/>
	<Property Name="InternalName" Value="7z"/>
	<Property Name="Language" Value="1033"/>
</Content>

 


2: How exact the values for these preferences are obtained

FlexNet agent preference values are taken from:

  1. Command line options when invoking the appropriate process (for example: ndtrack.exe -o IncludeDirectory=c:\); or
  2. The registry (for example, HKLM\SOFTWARE\Wow6432Node\ManageSoft Corp\ManageSoft\Tracker\CurrentVersion\IncludeDirectory=C:\) - see [Registry] Explained for more info

If you specify any directories to be included in inventory on the Inventory Settings page in the FlexNet Manager Suite web UI, then those details will end up in the agent policy. When the agent applies its policy the value will get stored in the registry entry noted above to be picked up when the inventory gathering process is executed.

 


3: If this works also in the Zerotouch agent

If ndtrack is invoked in a zero-touch manner (i.e. without the agent fully installed) then preference values won't be stored in or taken from the registry. Non-default preference values will only be obtained from the command line that is used to invoke ndtrack in this case.

 


4: Do the paramater cover all Flavours of programdata and programfiles on C,D,E etc and 32 and 64 bit

The $(ProgramFiles), $(ProgramFilesX86) and $(ProgramData) agent preference references correspond to the similarly named folder IDs described on the following Microsoft docs page: KNOWNFOLDERID. That page discusses the how the semantics of these values differ between 32 and 64 bit operating systems.

Each installation of Windows only has a single formal ProgramFiles/ProgramFilesX86/ProgramData directory, which is what the agent preferences here refer to. Even if you have (say) a D:\Program Files directory that exists on the filesystem, Windows likely won't recognize it as the operating system's ProgramFiles directory which would normally be on the C:\ drive.

 

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)

Hi Chris

Thanks for  your extensive answeres this is what I was looking for!

Regarding the Zerotouch. What I ment was? Does the Zerotouch also take the Variables, but I understand the answer is Yes.

Unfortunate the $(ProgramData);$(ProgramFiles);$(ProgramFiles(x86)) then are not what I was hoping for: an simple way to cover all flavours of installations no mather on what drive installed.  It turns out is good to cover installations on C drive but not for the rest. 

I did an test see screenshot.

 

KnownFolderID.png

One last question: Does the agent accept all KNOWNFOLDERID variables? Or is it configured to only accept these three?

 

Thanks Chris!

 

Regards

Ronald

 

 

 

 

@Ronny_OO7  - 

To ensure all relevant local folders are scanned for File Evidence, just use the default configuration of the agent and do not specify any specific folders to include.

In effect, the agent will scan all local folders on all local drives (C:, D:, E:, etc.), but will automatically exclude the main Windows folder.

Thanks @kclausen 

That is what we are not trying to do. You never know how big the disks are and how long such a scan it creates.

Secondly it creates miljons of file evidence records and that causes the compliance import to take twice as long. That is why I rather preffer to go for the strict way of targeted folders file scanning.

Not all KNOWNFOLDERID values are available as preferences in the inventory agent, but many are.

While I can't imagine situations where most of these would be helpful or used, for completeness here is a list of preferences that can be referenced to get system folder paths when using the agent.

  • AdminToolsFolder
  • AppDataFolder
  • CommonAdminToolsFolder
  • CommonAppDataFolder
  • CommonDesktopDirectory
  • CommonDocumentsFolder
  • CommonFavoritesFolder
  • CommonFilesFolder
  • CommonFilesNativeFolder
  • CommonFilesWow64Folder
  • CommonFilesX64Folder
  • CommonFilesX86Folder
  • CommonProgramMenuFolder
  • CommonStartMenuFolder
  • CommonStartupFolder
  • CommonTemplatesFolder
  • CookiesFolder
  • DesktopDirectory
  • DesktopFolder
  • FavoritesFolder
  • FontsFolder
  • HistoryFolder
  • InternetCacheFolder
  • LocalAppDataFolder
  • MyPicturesFolder
  • NethoodFolder
  • PersonalFolder
  • PrinthoodFolder
  • ProfileFolder
  • ProgramFilesFolder
  • ProgramFilesNativeFolder
  • ProgramFilesWow64Folder
  • ProgramFilesX64Folder
  • ProgramFilesX86Folder
  • ProgramMenuFolder
  • RecentFolder
  • SendToFolder
  • StartMenuFolder
  • StartupFolder
  • SystemFolder
  • SystemX86Folder
  • TempFolder
  • TemplateFolder
  • WindowsFolder

 

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)

Thanks Chris, very usefull!