2

How can I get the path of the start up folder from a batch file? The only way I found was to look in the registry but I don't think thats possible with CMD.

4

2 回答 2

2

这将设置STARTUP为启动文件夹的位置:

for /F "skip=4 tokens=3*" %%j in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Common Startup"') do set STARTUP=%%k

skip=4适用于 XP,skip=2适用于 Windows 7。我没有 vista 来尝试那里的命令)
也可用(更改 /v 之后的值)
Common AppData
Common Programs
Common Documents
Common Desktop
Common Start Menu
CommonPictures
CommonMusic
CommonVideo
Common Templates
Common Favorites
Common Startup
Common Administrative Tools

于 2012-06-25T20:58:11.663 回答
1

在windows xp中你可以这样访问

导入的CountToMainTable

CD %HOMEDRIVE%%HOMEPATH%\Start Menu\Programs\Startup
于 2012-06-23T08:54:22.130 回答