I am using a simple batch file via GPO to install an application to a series of machines.
The batch file simply looks for a directory, if it doesn't exist, it installs the application. What I would like the batch file to do is write back to a log file, that the machine (name) did actually install, or that it already had the application. The code I am using thus far is attached.
Using this method, I AM getting the "ECHO" part written to the listed log file... but what I need is the actual "MACHINE NAME" or even the "USER LOGON" name appended to the file... how do I call those variables from MSDOS or create them and actually send them with the append request?
If anyone could help, this would be greatly appreciated!
If exist C:\PROGRA~1\"Trend Micro" goto end
ECHO Machine Has Application >> \\anchovy\GPO_Apps\OfficeScan\alreadyinstalled.txt