Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hello,
I need support on setting preferences in MKS using command line interface
I found that I need to use the setprefs command but I do not know how to make the checkbox in teh attached image to be checked by cli.
I need this for all prefs: Integrity Client; Workflows and Documents and Config Management
Thank you very much in advace for helping!!
Solved! Go to Solution.
Ficut,
The following command will set the values for each preference:
si setprefs --save --command=connect server.hostname=<hostname> server.port=<portnumber> server.user=<userid> server.credential=<userpassword>
The next cmd will set the client so that it never asks you again for the already stored information:
si setprefs --save --command=connect --ask --ui=cli server.user=never server.hostname=never server.port=never server.credential=never
In place of 'never' other options are 'always' and 'prompt'.
Ficut,
The following command will set the values for each preference:
si setprefs --save --command=connect server.hostname=<hostname> server.port=<portnumber> server.user=<userid> server.credential=<userpassword>
The next cmd will set the client so that it never asks you again for the already stored information:
si setprefs --save --command=connect --ask --ui=cli server.user=never server.hostname=never server.port=never server.credential=never
In place of 'never' other options are 'always' and 'prompt'.
Hello,
First of all, thank you very much for your support!
I tried the command but changed the --ui=gui instead of cli and it checked the box for prompting for port and hostname. The problem is that if I check the box via the command in cli it doesn't actually do what it has to do, meaning it doesn't prompt me for hostname and port in MKS client. Instead, if I delete the settings I set via command and check the box manually in the client, then whenever I import a new viewset or close the source part and then go to Projects->View Projects it first asks me for hostname and port.
This is the reason why I need it to prompt me for hostname and port, so I can switch between different servers.
Do you know why it has this behaviour? manually works but via command it doesn't prompt me ( even if in Edit Preferences the checkbox for prompting is checked )
Thank you.
Hi again,
Just wanted to say that I managed to make it work eventually, I used option =once instead of prompt or always and it does what it should.
Thank you so much for your help!