I'm trying to copy a file from a network location to a local file folder on a laptop. The following script will work to put the file into the documents folder of the users profile.
xcopy /y /d "\\networkaddress\tablet config.exe" "c:\users\%username%\documents\"
That will put the file tablet config.exe into the documents folder. The problem is I want it in c:\programdata\microsoft\windows\start menu\programs so when you go to the start menu and type in tabet config it appears under programs, not documents.
When I change the destination to that, it doesn't work. The file doesn't go anywhere. The only thing I can think of is because it requires elevation to copy files to that folder and I'm not sure how to make it work.
Does anyone know how to make a file copy to c:\programdata\microsoft\windows\start menu\programs using a script?