prettypwnie Posted January 15, 2021 Report Share Posted January 15, 2021 Hi LabVIEW experts, I have noticed that VIPM appears to automatically set this checkbox if it's the first time you've tried to connect to LabVIEW: This is good because without it, VIPM can't connect to LabVIEW and new users would be confused because nothing would work. (Although I'm not sure why this is allowed to do from a security standpoint - but it is convenient) I would like to do the same thing in the MGI Solution Explorer, since we have the same problem. New users who are using it for the first time (and haven't yet used VIPM either) will get an error because it can't connect and will be confused. Does anyone have any secret inside knowledge about how VIPM does this? Does it just set a flag in the LabVIEW .ini file - or is there more secret sauce to it? Also, how does VIPM decide when to do it - it appears to happen only on a fresh (ish?) installation. If I switch the checkbox back myself and then startup VIPM it doesn't change anything. So how does it know whether it's a "fresh" install? Quote Link to comment
kosist90 Posted January 15, 2021 Report Share Posted January 15, 2021 I've tested it just now, using latest VIPM 2020. After VIPM is installed, TCP/IP checkbox is not set for LabVIEW. And, when trying to install some toolkit the following error is shown: But, when I've opened Settings -> LabVIEW tab -> pressedVerify (connection) button, then VIPM restarted LabVIEW, set TCP/IP checkbox, and was able to successfully connect to LabVIEW. 6 hours ago, prettypwnie said: So how does it know whether it's a "fresh" install? Such trick could be done by Post-Install Action (for example, if it is VIPM package). LabVIEW installers also support option "run executable at end of installation", so I guess other kinds of installers could support similar post-install actions. Quote Link to comment
ShaunR Posted January 15, 2021 Report Share Posted January 15, 2021 (edited) 10 hours ago, prettypwnie said: Hi LabVIEW experts, I have noticed that VIPM appears to automatically set this checkbox if it's the first time you've tried to connect to LabVIEW: This is good because without it, VIPM can't connect to LabVIEW and new users would be confused because nothing would work. (Although I'm not sure why this is allowed to do from a security standpoint - but it is convenient) I would like to do the same thing in the MGI Solution Explorer, since we have the same problem. New users who are using it for the first time (and haven't yet used VIPM either) will get an error because it can't connect and will be confused. Does anyone have any secret inside knowledge about how VIPM does this? Does it just set a flag in the LabVIEW .ini file - or is there more secret sauce to it? Also, how does VIPM decide when to do it - it appears to happen only on a fresh (ish?) installation. If I switch the checkbox back myself and then startup VIPM it doesn't change anything. So how does it know whether it's a "fresh" install? I don't know how VI manager does it but here are the things I do know. A fresh install has no tcp settings in the LabVIEW.ini. If you change the VI Server settings then the following settings are added to the LabVIEW ini depending on what you change from the defaults - the prominent ones are: server.tcp.enabled= server.tcp.port= server.tcp.access= There are also property nodes that relate to those settings. Access via these nodes (externally) requires that the VI server is available (i.e enabled). You can turn it off, but not on. In 2020? a new variable was added to the ini which is server.tcp.acl= I don't know much about that one but it will probably bite me in the backside at some point since I know what an ACL is Edited January 15, 2021 by ShaunR Quote Link to comment
LogMAN Posted January 15, 2021 Report Share Posted January 15, 2021 3 hours ago, ShaunR said: You can turn it off, but not on. You could run a VI via CLI to turn it on. Quote Link to comment
Rolf Kalbermatter Posted January 15, 2021 Report Share Posted January 15, 2021 (edited) The fact that VIPM does require a restart of LabVIEW is probably a good indication as to what it does. 1) enumerate all installed LabVIEW versions 2) read the labview.ini in that location and extract the VI server settings 3) if user changes the settings for a LabVIEW version, update the LabVIEW.ini file and require a restart On restart LabVIEW reads the LabVIEW.ini file and all is according to what VIPM wanted it. Simple and no hidden vodoo magic at all. Edited January 15, 2021 by Rolf Kalbermatter Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.