Compare cert salaries and plan your next career move
woodworm wrote: Copy it over with a startup script? I'm not too good at scripting ... But this would check to see if the newfile.txt exists, if it doesn't it will copy it over and then write the name of the PC to "hostname.txt" if not exist "%allusersprofile%\desktop\newfile.txt" goto newfile exit :newfile copy c:\new\newfile.txt "%allusersprofile%\desktop\newfile.txt" hostname >> \\server1\share\hostname.txt This would need to be a startup script in GPO rather than a logon script as users do not have write access to the 'All Users' profile.
sprkymrk wrote: This is on the right track, but there may be a couple of problems. First of all it depends on what he wants the users to do with the file. By copying it to the "All Users" desktop, they cannot modify the file. This might be a good thing, but then again maybe not. Second, it will log the computer name regardless of whether the file copy was successful or not. Third, by running it as a startup script it actually could not copy the log to a network share. I think a better idea would be to run it as a login script to copy it to the users own desktop, rather than the "All Users" desktop. Then on a network share accessable to users (I like to use a hidden share and just give users "write" access, but not read) you can log the results. So it would look something like this:IF NOT EXIST %USERPROFILE%\DESKTOP\NEWFILE.TXT GOTO NEWFILE GOTO END :NEWFILE COPY \\SERVER1\SHARE$\NEWFILE.TXT %USERPROFILE%\DESKTOP && ECHO FILE COPIED TO %COMPUTERNAME% FOR USER %USERNAME% >> \\SERVER1\SHARE$\FILECOPY.LOG :END Note that the line starting with COPY below :NEWFILE is all one contiuous line, I see that it was too long and wrapped. Make sure to keep it all on one line in the batch file. The "&&" makes the echo statement conditional on whether the file copy was successful, it will not log the computer name if the file copy fails.
nel wrote: hey. thanks theres some good ideas there. basically the file that will be copied to the desktop is just a a shortcut to a intranet site within the company. i know i could put it in the users favourites in IE through group policy but i want it available upon the users desktops so i can specifically say it is directly there in front of you as you login, because lets face it i dont wanna make it to hard for them by makin them goto their favourites because i know a large majority will not know how to do so! so do you think this would be the best route?
Compare salaries for top cybersecurity certifications. Free download for TechExams community.