View previous topic :: View next topic |
Author |
Message |
argis
Joined: 06 May 2019 Posts: 31
|
Posted: Wed Jul 17, 2019 6:15 pm Post subject: SetFolderVariable -inheritpartly parameter |
|
|
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: | SetCurrentFolder Root\Servers\Server01\
SetFolderVariable fvar_note "." -inheritpartly |
What am I doing wrong? I'm using v11.97. |
|
Back to top |
|
|
argis
Joined: 06 May 2019 Posts: 31
|
Posted: Wed Jul 17, 2019 11:42 pm Post subject: |
|
|
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... |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12792 Location: USA
|
Posted: Thu Jul 18, 2019 12:46 am Post subject: |
|
|
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 |
|
Back to top |
|
|
argis
Joined: 06 May 2019 Posts: 31
|
Posted: Thu Jul 18, 2019 12:51 am Post subject: |
|
|
OK thanks. Maybe it would be useful if it was possible to modify this after a folder has been created? |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12792 Location: USA
|
Posted: Thu Jul 18, 2019 1:08 am Post subject: |
|
|
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 |
|
Back to top |
|
|
|