Making a Windows shortcut start relative to where the folder is?

后端 未结 15 2472
自闭症患者
自闭症患者 2020-11-30 20:36

I have a game that uses this file structure:

GAME FOLDER
->data
->data->run.bat

I want to put a shortcut to run.bat i

15条回答
  •  孤独总比滥情好
    2020-11-30 21:03

    The method that proposed by 'leoj' does not allow passing parameters with spaces. Us it:

        cmd.exe /v /c %CD:~0,2%"%CD:~2%\bat\bat\run.bat" "Par1-1 Par1-2" Par2
    

    Which will be similar double quote written as in path

        C:"\Program Files\anyProgram.exe" "Par1-1 Par1-2" Par2
    

提交回复
热议问题