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. Blender减面修改器

    推荐:使用 NSDT场景设计器 快速搭建 3D场景. 使用Decimate修改器的目的是减少雕刻或 3D 扫描模型的面数. 要使用抽取修改器,请转到对象模式并选择要减少面数的任何模型. 在对象模式中选 ...

  2. Postgresql 全局索引与分区索引对于SQL性能影响的比较及DDL操作后分区全局索引是否会失效

    Postgresql 提供了对于分区表 global index 的支持.global index 不仅提供了对于唯一索引功能的改进(无需包含分区键),而且在性能上相比非global index (l ...

  3. .NET 中创建录音机和播放器应用

    前言 在本博客中,你将了解如何在 .NET MAUI 中开发录音机和播放器.音频播放器将录制和播放音频文件.此应用程序可以在Android和iOS上部署和使用. 预览 以下是该录音机和播放录音的应用程 ...

  4. Appium的触屏操作&设备交互api

    Appium的触屏操作 TouchAction---Appium 2.0以上不在可以使用 官网地址:https://github.com/appium/appium/blob/master/docs/ ...

  5. Python基础语法复习笔记(一):字符串

    python基础复习笔记 个人主页:JoJo的数据分析历险记 个人介绍:小编大四统计在读,目前保研到统计学top3高校继续攻读统计研究生 如果文章对你有帮助,欢迎关注.点赞.收藏.订阅专栏 本专栏主要 ...

  6. NAT模式下Debian无法上网和VIM无法删除字符的处理方法

    NAT模式下Debian无法上网的处理方法 处理方法共分为二种 检测 VM 的 NAT 服务有无开启 查看虚拟机的网络信息设置是否正确 检测 VM 的 NAT 服务有无开启 win+R 输入 serv ...

  7. c++的double转string(转)

    原文地址:https://www.cnblogs.com/finallyliuyu/p/1810071.html c++中double转换成string型(浮点数的格式化)(转)   在日常编程中-- ...

  8. vue中aciton使用的自我总结

    一.需求: 我需要从后台中获取菜单列表在路由守卫中进行限制. 二.遇到的问题: action中setMenuData的方法如下: actions: { setMenuData(context){ ge ...

  9. python调用c/c++方法

    # python调用c/c++方法:一般先将c++代码转化为C类型dll(推荐使用静态dll,否则容易出现各种链接库问题;记得使用extern "C" _declspec(dlle ...

  10. seqsever 查询多个表的条数,并以列的形式展现

    select sum(a) a,sum(b) b,sum(c) c,SUM(d) d,sum(a1) a1,sum(b1) b1,sum(c1) c1,SUM(d1) d1 from( select ...