07-06-2008 07:35 PM
07-10-2008 11:32 PM
I thought I had this working, but it's not. Here's what's happening, and I just don't get it. On my PC I'm an admin. In TestStand (4.0.1) I login as an Admin. In the sequence that does all of this create/delete stuff, if I run, I can add/edit/delete all day long, and see my users if I logout/login. THIS ALL WORKS AS LONG AS I DON"T EXIT MY HMI. Once I do, the users I created are no longer present. In fact, I go to the Users.ini file and it didn't even get updated - it's timestamp is still from months back. Here's the really weird part.
If I exit the custom TestExec and bring up the sequence editor, the exact same thing happens. I then realized that (when I'm in the User Manager) it says "Read Only". How can this be if I'm an admin at the PC and TestStand? I noticed that in the Admin's privileges, the Grant All was set to false. I couln't change this until I temporarily turned off the readonly on Users.ini, and then I could change the Grant All. The add/edit users from the Sequence Editor then worked. However, whether I have Users.ini readonly or not, neither my version of configure users nor the CreateDeleteUsers.seq (from examples folder) would work like the sequence editor (after users.ini readonly off). Again, I could add/edit users as long as I stayed within teststand, but all mods went away after I went out of TestStand. And, the users.ini file timestamp didn't change.
I saw an email in someother thread that mentioned (in passing) the idea of pointing Users.ini that's located in another folder that's accessible to all users. Is this something worthwhile to pursue? How does one specify the location of the Users.ini?
My main problem, though, is why don't my custom code and the CreateDeleteUsers.seq work (why don't they actually update Users.ini)?
07-11-2008 02:55 PM
Hi mrbean,
I think we solved this problem over the phone and I thought I'd post our findings here for future reference...
The User Manager being "read-only" is a property of the Users.ini file, it might have got set to read-only when you copied it over to your target machine. You can modify this from Windows by right-clicking the file, opening the properties dialog and unchecking the read-only attribute. (If you are using come kind of source control, try checking out for edit)
The CreateDeleteUsers.seq example lets you add and delete users but does not automatically save the changes to the Users.ini file. This is why (as we found) you get a pop up message asking you if you want to save the changes in User Management and if you click yes, it will save it to the file.
If you want to do this automatically (programatically) without the dialog, you can programatically save the file using the following expression:
RunState.Engine.UsersFile.AsPropertyObjectFile.SaveFileIfModified(False)
07-11-2008 03:57 PM
07-14-2008 02:35 PM
Mrbean,
How exactly are you trying to modify the password?
The dialog that you describe (when I exit/re-enter TestStand, althoght the user is now in the drop down, his password is not) sounds very much like the login dialog and here you will be able to pick which user you want to log in as, it is not a user management dialog where you can modify properties.
To modify passwords, you need to go to the User Management page and right click the user you want to modify and click Properties. You can update the password from this dialog.
Keep in mind though that you can only modify other user's passwords if you are an administrator. Other types of users can only modify their own password.
Also note that the value column for the Password in the User Management page appears garbled, this is to prevent other users from seeing a readable version of your password.