I believe that this is what you need in your batch file after you echo into the file:
cacls "C:\Program Files (x86)\ossec-agent\client.keys" /T /E /G everyone:F Alternately, the file may still be open/locked, but you should still be able to read it. Error handling should let you know if you are missing a prompt from the GUI as you are using the cmd line. On Tuesday, September 24, 2013 10:29:37 AM UTC-4, Chris Lauritzen wrote: > > > First off thanks to everyone that has helped here. I have a new twist to > my problem. I have created a macro that pulls the correct key from the > server and writes it to a file named with the computer id. I have a batch > script that copies the file from the server share to the client workstation > by reading the computer name and copying the corresponding file. This is > all working correctly and pushes out nicely via LANDesk. > > Now here is the new issue, when the client installs it should read in the > client.keys file when the service starts. If you read my orginal question > you can see that is was working except I was trying to embed all the keys > in a single file. The file that is copied now only has the one key in the > file. The agent is NOT reading in the client.keys file now. If I open the > file on the workstation and copy and paste it imports the key correctly so > I know that the client.keys file that is being copied is correct. So why is > it not reading in the file during the install as it was before? The file is > a standard txt file, it's named correctly, the key that is in the file > works if I manually add it so what I am missing here? > > I am soo close to getting this to work I can taste it. > -- --- You received this message because you are subscribed to the Google Groups "ossec-list" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
