英文:
Run pinned taskbar apps at windows startup?
问题
如何在启动时运行所有固定到任务栏的应用程序?
似乎是一个理想的功能。我将应用程序固定到任务栏,因为我希望在Windows登录后立即点击它们。
批处理文件没有成功:
for %1 in (%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*.lnk) do "%1"
英文:
How to run all apps that are pinned to taskbar at startup?
Seems like an ideal feature. I pin apps because I click them all once windows logs in.
No luck with batch file:
for %1 in (%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*.ink) do "%1"
答案1
得分: 1
这最终成为了最佳解决方案。
英文:
Loop Files, %A_AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*.lnk
{
FileGetShortcut, %A_LoopFileLongPath%, ShortcutTarget
SplitPath, ShortcutTarget, , , , name
Process, Exist, %name%.exe
If (!ErrorLevel)
{
Run, %ShortcutTarget%
}
}
return
This ended up being the best solution.
答案2
得分: 0
这是您要翻译的代码部分:
Loop Files, %A_AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*.lnk
Run %A_LoopFilePath%,, UseErrorLevel
Run "shell:startup" or type that into the explorer bar to navigate to startup folder and place a shortcut to the saved script file there.
Loop Files, %A_AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*.lnk
{
FileGetShortcut, %A_LoopFilePath%, path
SplitPath, path, name
If (name = "")
continue
; exclude unwanted windows
If name contains mspicons.exe,OneDrive.exe
continue
; skip already running processes
If WinExist("ahk_exe" name)
continue
Run %A_LoopFilePath%,, UseErrorLevel
}
请让我知道如果您需要更多帮助。
英文:
-
Create an autohotkey script and add this code to it:
Loop Files, %A_AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*.lnk Run %A_LoopFilePath%,, UseErrorLevel
-
Run "shell:startup" or type that it into the explorer bar to navigate to startup folder and place a shortcut to the saved script file there.
EDIT:
To exclude unwanted windows or skip already running processes, try this:
Loop Files, %A_AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*.lnk
{
FileGetShortcut, %A_LoopFilePath%, path
; MsgBox, %path%
SplitPath, path, name
; MsgBox, %name%
If (name = "")
continue
; exclude unwanted windows
If name contains mspicons.exe,OneDrive.exe
continue
; skip already running processes
If WinExist("ahk_exe" name)
continue
Run %A_LoopFilePath%,, UseErrorLevel
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论