11-21-2006 02:33 AM
11-21-2006 06:50 AM
you could use the "runas" - command on the command line to execute the program changes as an other user. to hide the password of the administrator inside your code you could protect the VI with a password. type "runas" on the command line to get more information.
11-21-2006 07:04 AM
Thanks Chris,
The software will be running as an executable so protecting the password would not be an issue. However, we are forced by our administrators to change passwords every 2 months so hardcoding would not really be feasible.
Maybe I could get a user set up specifically to perform this operation which would be exempt from the above rule.
Regards,
Paul.
11-21-2006 07:25 AM
11-21-2006 08:06 AM
I change the password but will not normally be logging on to this machine. This is a test facility in our factory which should hopefully run without my intervention. Unfortunately, I have no control of the administration of the site network and have to pacify the people who do.
Regards,
Paul.
11-27-2006 04:18 AM
Chris,
Sorry, still stuggling with this one.
I have a local account set up on this machine with admin rights which will not require its password to be changed.
In the command editor I can launch another cmd window running as the local administator which allows access to the IP settings required but the password must be entered when promted. I'm not sure how I can integrate this into my LabVIEW application.
Any help would be much appreciated.
Thanks & regards,
Paul.
11-27-2006 05:56 AM
11-29-2006 06:20 AM
Hi Chris,
This is driving me insane!
It appears that a scheduled task created by an administrator can not be run or even viewed by the user.
There must be a way of doing this. I can't believe I'm the only person who has tried to run an application which has a higher level of access rights than the user. Is this a security thing preventing viruses etc?
Thanks v.much for your time.
Paul.
11-29-2006 09:00 AM
oh boy......
have you checked the "security" settings of the task (right-click on the task and open the properties page)? is it possible that YOU run the script from an other computer over the network so that YOU have to enter the password on your local machine? the /s option of schtasks gives you the opportunity to run a script on a remote host.
12-05-2006 04:30 AM
Hi Chris,
Unbelievably I am still working on this... on and off anyway.
There is something preventing the scheduled task from running correctly when it has been set to run under a different account to the one logged on. I have tried this with local and network accounts, both with admin access, all with the same result. All permissions have been set correctly. In the task list the task status changes to "running" but nothing happens. "Running" status remains until the task is ended manually.
The task runs fine when the "Run as" user is the same as the logged in user.
I have now spent many hours looking for solutions on the web and trying anything I can think of to make this work, all to no avail.
I am starting to think that there is some global security setting on our network that is preventing this from running correctly although I can not understand why the task status reports running and there are no errors in the schedule log.
Any more assistance would be appreciate although I realise this has now strayed a long way from LabVIEW.
Regards,
Paul.