04-26-2016 12:17 AM - edited 04-26-2016 12:21 AM
Hi,
I want to edit windows host file located in C:\Windows\System32\drivers\etc\host .But it shows permission error when I'm trying to do this. I tried with running as administrator also. Still I can edit networks file located in the same folder (C:\Windows\System32\drivers\etc\networks) with same security permissions as of host file . I can edit the host file by opening it in the notepad as administrator. Is there any other method to edit the host file using LabVIEW.
04-26-2016 02:09 AM
04-26-2016 02:57 AM - edited 04-26-2016 02:58 AM
Thanks for the reply. Already tried as administrator. But no use.
04-26-2016 03:36 AM - edited 04-26-2016 03:37 AM
Have you tried changing the permissions on the file itself?
Microsoft is generally against having applications running as users modify important system files and/or do things like edit the registry.
04-26-2016 04:07 AM
I can edit another file with same security permissions and in the same location. For the host file it shows error even after giving full permission.
04-26-2016 04:26 AM
04-28-2016 12:25 AM
At last, I got a .bat file to add an entry in windows host file. Then run using the systemExec.vi. Now my code works exactly as it finds the server IP and adding it in the host file.
12-14-2019 04:08 PM
Hello ,
i m trying the same in one project ..
it s possible to post the solution?
thanks