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

后端 未结 15 2441
自闭症患者
自闭症患者 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 20:54

    If you can set a system variable (something like %MyGameFolder%), then you can use that in your paths and shortcuts, and Windows will fill in rest of the path for you (that is, %MyGameFolder%\data\MyGame.exe).

    Here is a small primer. You can either set this value via a batch file, or you can probably set it programmatically if you share how you're planning to create your shortcut.

提交回复
热议问题