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. 00-DLL劫持&C语言远程加载shellcode

    0x01 杀软拦截检测规则引导-DLL劫持上线 准备工具 cs vs2019 dll劫持工具:https://bbs.pediy.com/thread-224408.htm 极速PDF:https:/ ...

  2. 权限维持之:DSRM 域控权限维持

    目录 1 修改 DSRM 密码 2 DSRM 域后门操作过程 3 DSRM 域后门防御 目录服务恢复模式(DSRM,Directory Services Restore Mode),是Windows服 ...

  3. [EULAR文摘] TNFi治疗3年对384例强柱患者脊柱放射学进展的影响

    TNF拮抗剂治疗3年对384例强直性脊柱炎患者脊柱放射学进展的影响 Maksymowych WP, et al. EULAR 2015. Present ID: OP0144. 背景: 既往开放标签的 ...

  4. 使用flex布局(多行,一行三个),换行后最后一行左右对齐问题

    <html> <head> <style> html, body, ul { margin: 0; padding: 0; } ul { width: 100%; ...

  5. java HashMap的四种获取key,value的方式

    初学java不久,我觉得这样将学到的东西总结下来非常好,如果有一天有些地方忘记了 可以回过头来翻看,不用来回的找,非常好,也是一个很好的习惯 今天主要将记录获取hashMap的key,value的几种 ...

  6. Docker 架构演进之路

    转载:https://developer.aliyun.com/article/673009 前言 Docker已经推出了5年,在这5年中它极大的改变了互联网产品的架构,推进了新的产品开发.测试和运维 ...

  7. div溢出横向滚动

    需求:div在一行内需要溢出滚动 方案: 1:父类元素需要设置 overflow-x: auto;  //横向方向溢出元素 white-space: nowrap; //溢出的元素不换行 2:子元素需 ...

  8. Linux常用的性能分析

    参考文档:https://www.runoob.com/w3cnote/linux-common-command-2.html 一.ps -aux ps -aux ps -ef -a:所有进程. -u ...

  9. 使用oledb读写excel出现“操作必须使用一个可更新的查询”的解决办法

    使用oledb读写excel出现"操作必须使用一个可更新的查询"的解决办法 转自:http://www.cnblogs.com/Richinger/archive/2008/09/ ...

  10. java8 Stream API之reduce

    通过前面那篇文章,我们已经对Stream API有了初步的认识,并对它在集合处理中的增强作用表示了肯定.同时我们上篇中示例了forEach.fiter.sum这些常用的功能,本篇我们只讲reduce. ...