admin管理员组

文章数量:1293316

i have this "open.bat" file, it supposed to open VS and VSCODE with my current project, leave them open, and close the cmd

Start  "" /b "C:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\Code.exe" 

Start  "" /b "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe" "C:\mycode\mycode.sln"

Exit

what happens is that they both open, but the CMD doesnt closes. if i close manually the cmd then the VSCODE closes, and only VS is left open

i added it to shell:startup

EDIT

when batch is run via shell:startup this is the output

C:\Windows\system32>Start "" "C:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\Code.exe"

C:\Windows\system32>Start "" "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe" "C:\mycode\mycode.sln"

[main 2025-02-12T23:49:22.291Z] update#setState disabled [main 2025-02-12T23:49:22.293Z] update#ctor - updates are disabled due to running as Admin in user setup (node:344) [DEP0168] DeprecationWarning: Uncaught N-API callback exception detected, please run node with option --force-node-api-uncaught-exceptions-policy=true to handle those exceptions properly. (Use Code --trace-deprecation ... to show where the warning was created)

本文标签: cmdclose batch file without closing programs started by batchStack Overflow