webstorm添加右键批处理文件(.bat)

新建一个webstorm右键注册.bat,把下面的直接复制进去 (注意:webstorm的地址根据自己的改一下)

:: Check for administrative privileges
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto AdminAccess )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    echo UAC.ShellExecute "cmd.exe", "/c ""%~f0""", "", "runas", 1 >> "%temp%\getadmin.vbs"
    "%temp%\getadmin.vbs"
    del "%temp%\getadmin.vbs"
    exit /B

:AdminAccess
    REM Step 01: Navigate to HKEY_CLASSES_ROOT\Directory\shell and create a new key named "WebStorm"
    reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm" /f
    
    REM Step 02: Set the default value of the "WebStorm" key to "Open Folder as WebStorm Project"
    reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm" /ve /d "Open as WebStorm" /f
    
    REM Step 03: Create a new string value named "Icon" with the path to WebStorm executable
    reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm" /v "Icon" /d "C:\Users\10915\AppData\Local\Programs\WebStorm\bin\webstorm64.exe" /f
    
    REM Step 04: Create a new key named "command" under "WebStorm"
    reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm\command" /f
    
    REM Step 05: Set the default value of the "command" key to the command to open WebStorm with the folder
    reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm\command" /ve /d "\"C:\Users\10915\AppData\Local\Programs\WebStorm\bin\webstorm64.exe\" \"%%V\"" /f
    
    REM Step 11: Navigate to HKEY_CLASSES_ROOT\Directory\shell and create a new key named "WebStorm"
    reg add "HKEY_CLASSES_ROOT\Directory\shell\WebStorm" /f
    
    REM Step 12: Set the default value of the "WebStorm" key to "Open Folder as WebStorm Project"
    reg add "HKEY_CLASSES_ROOT\Directory\shell\WebStorm" /ve /d "Open Folder as WebStorm Project" /f
    
    REM Step 13: Create a new string value named "Icon" with the path to WebStorm executable
    reg add "HKEY_CLASSES_ROOT\Directory\shell\WebStorm" /v "Icon" /d "C:\Users\10915\AppData\Local\Programs\WebStorm\bin\webstorm64.exe" /f
    
    REM Step 14: Create a new key named "command" under "WebStorm"
    reg add "HKEY_CLASSES_ROOT\Directory\shell\WebStorm\command" /f
    
    REM Step 15: Set the default value of the "command" key to the command to open WebStorm with the folder
    reg add "HKEY_CLASSES_ROOT\Directory\shell\WebStorm\command" /ve /d "\"C:\Users\10915\AppData\Local\Programs\WebStorm\bin\webstorm64.exe\" \"%%V\"" /f
    
    REM Step 21: Navigate to HKEY_CLASSES_ROOT\Directory\shell and create a new key named "WebStorm"
    reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\WebStorm" /f
    
    REM Step 22: Set the default value of the "WebStorm" key to "Open Folder as WebStorm Project"
    reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\WebStorm" /ve /d "Open Folder as WebStorm Project" /f
    
    REM Step 23: Create a new string value named "Icon" with the path to WebStorm executable
    reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\WebStorm" /v "Icon" /d "C:\Users\10915\AppData\Local\Programs\WebStorm\bin\webstorm64.exe" /f
    
    REM Step 24: Create a new key named "command" under "WebStorm"
    reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\WebStorm\command" /f
    
    REM Step 25: Set the default value of the "command" key to the command to open WebStorm with the folder
    reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\WebStorm\command" /ve /d "\"C:\Users\10915\AppData\Local\Programs\WebStorm\bin\webstorm64.exe\" \"%%V\"" /f
    
    
echo Registry keys have been successfully created.
pause
  • 5
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
WebStorm中独立运行Vue 3的.vue文件,你可以按照以下步骤进行操作: 1. 首先,确保你已经安装了Vue CLI。Vue CLI是一个用于快速搭建Vue项目的脚手架工具,它内部已经包含了webpack等必要的配置。 2. 在WebStorm中,打开你的Vue项目文件夹。 3. 在终端中,使用Vue CLI创建一个新的Vue项目。你可以使用以下命令: ``` npx @vue/cli create my-vue-project ``` 这将创建一个名为"my-vue-project"的Vue项目。 4. 进入到项目文件夹中: ``` cd my-vue-project ``` 5. 启动开发服务器: ``` npm run serve ``` 6. 现在,你可以在浏览器中访问http://localhost:8080(默认端口号)来查看你的Vue应用程序。 请注意,以上步骤假设你已经安装了Vue CLI并且已经创建了一个Vue项目。如果你还没有安装Vue CLI,请参考引用\[1\]中的说明来安装它。另外,如果你想在WebStorm中使用别名(alias),你可以按照引用\[2\]中的说明来配置alias.config.js文件。最后,如果你想使用Vue CLI的init命令来创建项目,你可以参考引用\[3\]中的命令用法。 #### 引用[.reference_title] - *1* *3* [WebStorm项目--Vue.js入门](https://blog.csdn.net/feiying0canglang/article/details/109410006)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [WebStorm 中 VUE 设置 alias.config.js 别名后,点击 @/utils/request @/router/ 时不能跳转到指定文件](https://blog.csdn.net/peng2hui1314/article/details/120773899)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Dawn·张

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值