0. the goal

make vscode poratable together with its extensions, so that the offline pc could make use of vscode and its extensions.

1. how

1.1 on the PC with Internet connection

download the portable verison of vscode from the official website https://code.visualstudio.com/download

1.2 on the PC1 without Internet connection

  1. copy the zip file to the PC1 by some way.
  2. unzip it to some where you want to.
  3. double click code.exe to launch vscode.
  4. if you want to add this vscode to you file explorer contenxt menu check the following section.

1.3 add portable version vscode to file explorer content menu

  1. create a file named vscode to context menu.reg.
  2. open it with any text editor.
  3. past the following code into it, modify the pathes in code and save.
  4. right click the reg file, run it as administrator.
  5. done.
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Edit with VS Code"
"Icon"="C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\vscode]
@="Open Folder as VS Code Project"
"Icon"="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\shell\vscode\command]
@="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click INSIDE a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode]
@="Open Folder as VS Code Project"
"Icon"="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\",0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\vscode\command]
@="\"C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe\" \"%V\""

ref

VSCode Portable: How to get the Official Version

https://linuxpip.org/vscode-portable/

How to Setup VS Code to Be Portable

https://www.howtogeek.com/devops/how-to-setup-vs-code-to-be-portable/

add vscode to context menu after installation Code Example

https://www.codegrepper.com/code-examples/whatever/add+vscode+to+context+menu+after+installation

Adding Visual Studio Code to Your Context Menu – OSH Garage

https://oshgarage.com/adding-visual-studio-code-to-your-context-menu/

make vscode portable together with its extensions的更多相关文章

  1. 同步vscode的setting.json和extensions

    vc 详情 $ npm i -g vscode-config $ vc config --token <your github token> $ vc config --id <yo ...

  2. VsCode插件开发之插件初步通信

    参考了Egret Wing,想像Egret Wing那样在上方titlebar最右边上面增加一个menu(这个menu相对于一个按钮,当点击这个按钮时会出现一个window弹框,这个window弹框里 ...

  3. VSCode 预览 .md 文件

    VSCode安装md插件 选择Extensions, 输入Markdown Theme Kit,下面会出现相应插件,点击install(截图中因为我已经安装,所以是设置) 或者安装插件Markdown ...

  4. 现在记录几款好用的vscode的插件

    vscode 插件 Rainbow Brackets编码过程中,尤其在我们使用js进行函数式编程时,代码里会有很多的花括号,想要保证它们对称十分困难,所以就出现了上面小粉同学的尴尬局面,相信很多人都遇 ...

  5. ubuntu 下vscode 修改主题 注释斜体

    找到vscode的程序目录 全局搜索extensions 找到目录 /home/your_usr_name/.vscode/extensions 这里修改 注释字体 直接删掉fontStyle for ...

  6. 配置VSCode的C/C++语言功能

    0. 前言 主要是在网上找的方法都没试成功过,在各种机缘巧合下终于成功了. 这篇文章基于个人经验,而且没有走寻常路. 1. 需要的软件和插件 软件: VSCode (https://code.visu ...

  7. 在windows系统下用vscode构造shell脚本IDE

    1.基础环境搭建 安装Visual Studio Code(VScode ) 下载地址:https://code.visualstudio.com/Download 下载完双击文件,选择路径安装即可, ...

  8. 当使用VS CODE 时,如果窗口中打开的文件无法识别HTML的话,可以使用以下方法添加要识别的文件类型

    找到该文件并修改\Microsoft VS Code\resources\app\extensions\html\package.json{ "name": "html& ...

  9. Visual Studio Code之常备快捷键

    官方快捷键大全:https://code.visualstudio.com/docs/customization/keybindings Visual Studio Code是个牛逼的编辑器,启动非常 ...

  10. The IBM Blockchain Platform: Develop pre-requisites

    Installing pre-requisites The IBM Blockchain Platform: Develop pre-requisites can be installed on Ub ...

随机推荐

  1. .NET 8 预览版 1:NativeAOT 升级和新的Blazor United

    .NET团队 今天在官方博客上 发布了.NET 8的第一个预览版,.NET 8 是一个长期支持 (LTS) 版本[1],.NET 的版本包括产品.库.运行时和工具,是 Microsoft 内部和外部多 ...

  2. nodejs pm2 详解

    一.PM2是什么 pm2是可以用于生产环境的Nodejs的进程管理工具,并且它内置一个负载均衡.它不仅可以保证服务不会中断一直在线,并且提供0秒reload功能,还有其他一系列进程管理.监控功能.并且 ...

  3. LeetCode-630 课程表Ⅲ

    来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/course-schedule-iii 题目描述 这里有 n 门不同的在线课程,按从 1 到 n  ...

  4. 关于centos8yum源失效问题

    [CentOS8遇到错误]Error: Failed to download metadata for repo 'powertools'... 原因: CentOS Linux 8 已于 2021 ...

  5. 利用socket以及多线程、文件流等方法实现通信,互发文本信息以及文件

    服务器端: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data ...

  6. 网络储存服务ip-san搭建

    简单的介绍一下SAN(存储区域网络存储区域网络和SAN协议,简称SAN),它是一种高速网络实现计算机与存储系统之间的数据传输.常见的分类是FC-SAN和IP-SAN两种.FC-SAN通过光纤通道协议转 ...

  7. SAP BW/4HANA学习笔记2

    2.Data Modeling BW/4HANA Data Modeling简介 Data Quality:数据质量问题: silos(桶仓):大量重复冗余的主数据,独立计算统计: 数据silos缺点 ...

  8. 【Shell】DBeaver Enterprise Edition 5.1.1 Download

    DBeaver Enterprise Edition 5.1.1 Download mkdir -p /opt/downloads/dbeaver/dbeaver-ee-5.1.1 mkdir -p ...

  9. 【MySQL】MySQL时区问题、数据库时间相差8小时问题解决

    解决:修改MySQL系统时区,改为东8区. 在命令行界面或者可视化工具下(如:Navicat)依次运行以下命令. 1.查询当前系统时间 select now(); 2.检查MySQL系统时区 show ...

  10. JS中两个数组对象筛选

    const arr1 = [ {id: 1, name: 'aaa'}, {id: 2, name: 'bbb'}, {id: 3, name: 'ccc'}, {id: 4, name: 'ddd' ...