SetFolderVariable -inheritpartly parameter

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
argis
Posts: 31
Joined: Mon May 06, 2019 8:30 pm

SetFolderVariable -inheritpartly parameter

Post by argis »

When I use -inheritpartly with SetFolderVariable in a script I understand it should set varlable inheritance to "Inherit from parent folder: folder variables may overwrite inherited values".

However when I do this, while it sets the variable correctly, when I go to the folder properties Variables tab it remains on "Use folder variables only".

The script looks like this:

Code: Select all

SetCurrentFolder Root\Servers\Server01\
SetFolderVariable fvar_note "." -inheritpartly
What am I doing wrong? I'm using v11.97.
argis
Posts: 31
Joined: Mon May 06, 2019 8:30 pm

Post by argis »

Well I can answer my own question here. I was trying to modify folders I had already created, so I deleted all the folders and re-created them using "-inheritpartly" in the script and it worked perfectly.

So the trick is to do the job properly the first time... :)
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Depends on current folder settings.
If default option "Inherit all from parent" is used then HostMonitor sets option specified in the script.
Otherwise HostMonitor does not change mode of inheritance, just sets the variable

Regards
Alex
argis
Posts: 31
Joined: Mon May 06, 2019 8:30 pm

Post by argis »

OK thanks. Maybe it would be useful if it was possible to modify this after a folder has been created?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

May be, but we think its better the way it works now (its not a bug, it was designed this way), it works for long time this way..

Regards
Alex
Post Reply