Ive pulled some ideas off here to edit a line within a text file but after the task completes i some how lose access to the file and cannot verify if it was changed. I could use some help on this one. Ill post my details below…
Thanks in advance for your help!
within the file “C:\WINDOWS\entrust.ini” i want to change the following line from
// iterate through the file replacing lines as necessary
appendfile {concatenation “%0d%0a” of ( if (it starts with “RoamSearchBase”) then "RoamSearchBase=ou=do,o=u.s. " else it as string) of lines of file (parameter “filename”)}
// backup the old file (first delete any old backup files)
After logging in with admin rights i can view the file and see that it was successfully changed. However, i am still faced with the problem that under my non priveledged account the file is now unuseable by the application (Entrust). Why would i lose access to the file after a bigfix task was run on it?
You didn’t actually edit the file. Instead, you created a new file and moved the old one. Since the client runs in the SYSTEM context any new files it writes out will have corresponding permissions and non-privileged accounts won’t have access.