when I run the below script from the desktop it copies everything over but once packed to sfx
I get "File not found - VLC Media Player" I know I created the sfx correctly because
the games files within sfx copy over but when going outside and trying to copy from program files
then that's when I get the error..I tried doing a set Pathname=%programfiles% and pushd %Pathname%
etc. but still same error. Thanks for any help on this, driving me crazy..

Code: Select all
@echo off
:: Copy from program files..
xcopy /Y /I "%programfiles%\VLC Media Player\VLC Media Player" "%ProgramData%\Microsoft\Windows\Start Menu\Programs\VLC Media Player\">nul
:: Copy from games folder..
xcopy /Y "games\Games Explorer.lnk" "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Games\">nul
exit