batch file - Pin shortcut (.lnk) to start menu -


i'm making installation script using .cmd file. here code:

if exist "%userprofile%\desktop\opslag\opslag.hta" (  start "" "%userprofile%\desktop\opslag\opslag.lnk" /secondary /minimized msg "%username%" program installed. exit  ) else (  xcopy %source% %destination% /d /e /c /r /i /k /y start "" "%userprofile%\desktop\opslag\opslag.lnk" /secondary /minimized msg "%username%" setup complete! exit ) 

the %source% , %destination% set earlier in script.

when folder has been copied want file %userprofile%\desktop\opslag\opslag.lnk added start menu.

i have seen earlier posts like: how pin start menu using powershell, cannot make work.

i'm testing on home laptop runs windows 7 danish language. machine need runs windows 7 english language. therefore think $verb different scripts i've found, haven't tested on work station.

furthermore work station has limited uac, , therefore not have administrator rights. , please not comment on how should not done users, administrators/it, know i'm doing.

i hope can me pin opslag.lnk start menu, preferably on both languages (danish , english).

find location of start menu folder:

for /f "tokens=3*" %%g in ('reg query "hkcu\software\microsoft\windows\currentversion\explorer\user shell folders" /v "start menu" ^|find "reg_"') call set _startmenu=%%h echo %_startmenu% pause 

Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -