Copy to individual profiles
Posted: 24 Jun 2010 08:38
So I am wanting to copy a shortcut to an individual user's profile. I currently have a batch file that will allow me to find all of the usernames on my local machine. What I would like to do is to then use these usernames that this batch comes up with to apply a shortcut to the individual user's desktop using the usernames drawn up from this original batch.
Any suggestions on how to achieve this?
The original batch that get's the usernames.
I suspect that I should be able to send the variables I get from this first batch to another batch file that then installs the shortcut based on the usernames it receives. Any help would be greatly appreciated
Any suggestions on how to achieve this?
The original batch that get's the usernames.
@echo off &setlocal
pushd "C:\Documents and Settings"
for /f "delims=: tokens=1*" %%a in ('dir /ad /b^|findstr /n .') do set "userVar%%a=%%b"
popd
:: display all
set userVar
pause
I suspect that I should be able to send the variables I get from this first batch to another batch file that then installs the shortcut based on the usernames it receives. Any help would be greatly appreciated