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. http协议介绍,token和session原理

    1.http协议 https://www.cnblogs.com/lauhp/p/8979393.html 1. 定义 http Hyper Text Transfer Protocol,超文本传输协 ...

  2. async异步编程屏蔽凡人

    为提高效率与增加逼格,墙裂建议引入async异步编程,这不比基于threading的线程.基于multiprocessing的进程香?这些大家伙太重量级了,代码又啰里啰唆的一点也不pythonic,只 ...

  3. JZOJ 2020.02.16【NOIP提高组】模拟A 组

    2020.02.16[NOIP提高组]模拟A 组 呼呼呼呼呼呼呼呼 今天暴力分可真多啊 第一次 \(A\) 组进前 \(5\) ! 呼呼呼呼呼呼呼呼 总有人虐场,总有人在场中被虐······ 总结 3 ...

  4. 跳板攻击之:Socks 代理转发

    跳板攻击之:Socks 代理转发 目录 跳板攻击之:Socks 代理转发 1 Socks 代理转发原理 2 实验环境 2.1 客户端配置 2.2 服务端配置 2.3 利用 Socks 代理扫描内网主机 ...

  5. Jquery 点击弹窗,将弹窗内容赋值到各个项demo

    <div class="qb"> <div class="box"> <div class="qtt f_16 fbd& ...

  6. LeetCode-156 上下翻转二叉树

    来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/binary-tree-upside-down 题目描述 给你一个二叉树的根节点 root ,请你 ...

  7. LVS的NAT,TUN,DR原理及区别

    原理及其区别 Linux Virtual Server是通过ipvs内核模块和ipvsadm用户空间命令行工具来实现负载均衡的它支持三种工作模式: NAT模式:LVS调度器将请求转发给后端服务器,同时 ...

  8. Python实现XX短视频加密算法抓包分析及刷邀请

    Python实现XX短视频加密算法抓包分析及刷邀请 出自:https://zhuanlan.zhihu.com/p/466929667?utm_id=0 Python彳余 一个会常常更新互联网,编程的 ...

  9. WPF项目需要不断更新前台图片时,碰到“System.IO.IOException: 文件“xxx”正由另一进程使用“问题的解决

    问题描述 项目中要求能不断拍照并更新显示图片,使用FileStream在本地创建了图片文件: 当下次重新拍照前删除之前拍过的图片时,提示"System.IO.IOException: 文件& ...

  10. mybatis动态标签——sql标签

    mapper接口 Emp getEmpById(@Param("id") Integer id); mapper.xml <!-- sql片段:可以记录一段sql,在需要用的 ...