This is my first post so I hope I get it right!
I am trying to write a simple batch file for the company I work for which will shut down Microsoft Lync (I have sussed that bit) and then delete 2 files from the following location as we are having address book update issues:
C:\Users\myusername\AppData\Local\Microsoft\Communicator\
[email protected]\GalContacts.db
C:\Users\myusername\AppData\Local\Microsoft\Communicator\
[email protected]\GalContacts.db.idx
This is the script I wrote for MY account:
-------------
echo off
taskkill /f /im communicator.exe
echo Communicator has shut down
pause
C:
del "C:\Users\myusername\AppData\Local\Microsoft\Communicator\
[email protected]\GalContacts.db"
del "C:\Users\myusername\AppData\Local\Microsoft\Communicator\
[email protected]\GalContacts.db.idx"
echo Files Deleted
pause
-------------
Now, the problem I have is that I have been asked to create this for any user that logs in to a machine in our board room.
How can I change it so that the users username will be inserted where 'myusername' and '
[email protected]' is?
I am quite new to scripting so any help would be greatly appreciated!
Kind regards