PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, October 19, 2022

[FIXED] How to run VSCode from the command prompt

 October 19, 2022     admin, cmd, runas, visual-studio-code, windows     No comments   

Issue

I for security reasons cannot run VSCode plainly. I have opened it in the past, but now due to specific reasons, I may only run VSCode from the command prompt. I've tried

start "path/to/file" code and start code "path/to/file"
but none work I'm on Microsoft Windows [Version 10.0.17134.407]

how may I run this by going to Windows+R then 'cmd' then start/ run?

Also it would be great if I could use this for a separate user.

I'm looking for something like:
Runas /user:user\admin /savecred "C:\Program Files (x86)\vs-code.exe"


Solution

Well shoot, as it turns out that after doing some experimentation I found out that there's a way. Do this:

  1. Simply stick this:

    runas /user:Techtiger255\admin /savecred "C:\Users\Admin\AppData\Local\Programs\Microsoft VS Code\Code.exe"
    

    inside of a shortcut (.lnk file)

 

  1. Open your command line of choice (Powershell or Cmd) and enter the exact file path of your shortcut ex: "C:\Users\Standard\Desktop/VSCODE.lnk" and hit go, stupidly simple really, just had to find the code.exe file path.


Answered By - 255.tar.xz
Answer Checked By - David Marino (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing