How do I add VSCode to the PATH for PowerShell? - powershell

The Code documentation suggests that it is added to the PATH during installation, but that did not seem to work for me (at least not in PowerShell). Where is it installed such that I can add it myself?

The install path is C:\Users\username\AppData\Local\Code
C:\Users\username\AppData\Local\Code\bin is added to the PATH by the installer, but it might be that tools such as PowerShell will pick this change up only until after a log off/log on or a restart

On macOS, VS Code these days seems to have a Command Palette (shift + Cmd + P) command to install it to the path called "Shell Command: Install 'code' command in PATH".

It seems that a good old restart of the box fixed the issue. Interestingly, merely restarting PowerShell or logging out and back in didn't fix it.

Modern Software Installation.
Many of the larger software packages have finally caught-up with the times. Make sure the correct choice(s) are made during the software download and during the software installation.
Most individual PC users are the sole users of their PCs. Yet many software packages have always defaulted the installation processes to assume otherwise. This is why so many software packages install to a path that includes C:\ .... user\ ...
But most of us individual PC users don't want the software installation including a path that involves using the ... user\ ... path. And instead we want the software installed into the default C:\ path without the "user name".
Some of the most common software installation packages are becoming available for the individual PC user and these packages install on the PC in our preferred path - (not involving a path through the ... user\ ... ).
And if there is not a separate download package for the individual PC user, then during installation make sure to closely read each step which will often now include a checkbox of whether the installation is for a "user" or for "all users". Select all users.

Related

How to install vim which is cloned from github.com?

I've cloned it but I didn't find any .exe file, Nor do i see it in programs list in Control Panel of windows. I'am a bit confused as to what cloning means. I know that there is direct download .exe file on vim.org website. Its for sure that I'am beginner for all these. Please help. Thanks for the help in advance.
reading the "installation" section found in the README.md of the vim repo, you can see the filenames containing the instructions that will help you with the installation, depending on your OS.
README_ami.txt Amiga
README_unix.txt Unix
README_dos.txt MS-DOS and MS-Windows
README_mac.txt Macintosh
README_haiku.txt Haiku
README_vms.txt VMS
So, for the full information I suggest you go to those files, or go to the vim website where there is also good information about the installation.
Anyway, I will briefly explain below the information that those files and the vim website say for most common operating systems
If you're on Unix:
git clone https://github.com/vim/vim.git
cd vim/src
make
If you're on Mac
The Macintosh binaries are not on the Vim ftp site. They are produced by a few Macintosh lovers. Often they lag behind a few versions.
MacVim has more a Mac look and feel, is developed actively and most people prefer this version. Most of MacVim was made by Björn Winckler.
MacVim can be downloaded here: link
Or if you prefer, here is the MacVim homepage.
If you're on Windows:
The next instructions were copied from here.
Option A: Using the self-installing .exe
Go to vim.org/download.php and click on self-installing executable (or just click here) and follow the prompts.
Watch out for:
When an existing installation is detected, you are offered to first remove
this. The uninstall program is then started while the install program waits
for it to complete. Sometimes the windows overlap each other, which can be
confusing. Be sure the complete the uninstalling before continuing the
installation. Watch the taskbar for uninstall windows.
When selecting a directory to install Vim, use the same place where other
versions are located. This makes it easier to find your _vimrc file. For
example "C:\Program Files\vim" or "D:\vim". A name ending in "vim" is
preferred.
After selecting the directory where to install Vim, clicking on "Next" will
start the installation.
Option B: Using .zip files
Go to the directory where you want to put the Vim files. Examples:
cd C:\
cd D:\editors
If you already have a "vim" directory, go to the directory in which it is
located. Check the $VIM setting to see where it points to:
set VIM
For example, if you have
C:\vim\vim82
do
cd C:\
Binary and runtime Vim archives are normally unpacked in the same location,
on top of each other.
Unpack the zip archives. This will create a new directory "vim\vim82",
in which all the distributed Vim files are placed. Since the directory
name includes the version number, it is unlikely that you overwrite
existing files.
Examples:
pkunzip -d gvim82.zip
unzip vim82w32.zip
You need to unpack the runtime archive and at least one of the binary
archives. When using more than one binary version, be careful not to
overwrite one version with the other, the names of the executables
"vim.exe" and "gvim.exe" are the same.
After you unpacked the files, you can still move the whole directory tree
to another location. That is where they will stay, the install program
won't move or copy the runtime files.
Change to the new directory:
cd vim\vim82
Run the "install.exe" program. It will ask you a number of questions about
how you would like to have your Vim setup. Among these are:
You can tell it to write a "_vimrc" file with your preferences in the
parent directory.
It can also install an "Edit with Vim" entry in the Windows Explorer
popup menu.
You can have it create batch files, so that you can run Vim from the
console or in a shell. You can select one of the directories in your
$PATH. If you skip this, you can add Vim to the search path manually:
The simplest is to add a line to your autoexec.bat. Examples:
set path=%path%;C:\vim\vim82
set path=%path%;D:\editors\vim\vim82
Create entries for Vim on the desktop and in the Start menu.
That's it!
Vim is open source software, and its source code, i.e. all the technical files that make up Vim is (nowadays) hosted at GitHub.
Cloning that repository means you'll download all of those files to your computer (and with Git as the underlying revision control system, you'll even get the full history of all changes ever done). As Vim supports a very big set of very diverse platforms (Windows, Linux, Mac, ...), the repository itself does not (and should not) contain pre-built binaries, nor a full installer that most users expect to run. So, unless you have the intention to actively contribute to Vim by submitting bug fixes or enhancements, you don't need to clone or do anything with GitHub. If you do want to get technical, src/INSTALLpc.txt contains the instructions for building Vim on Windows. This includes choosing a compiler, installing it and the required dependencies, configuring the build, building, and then finally copying the files to a permanent location on your PC, either manually or by building and then running an installer.
For plain passive consumption of Vim (which is rewarding in itself, but may even lead you to eventually also programming it), the Downloading Vim page on vim.org has all the information that you need, with links to the most popular installers right at the top.
a word on versions
For a casual user, using the latest stable version is recommended; this is 8.2 right now; gvim82.exe is a corresponding installer for Windows. This offers the best compromise between stability and latest features. In the case of Vim, expect a new release roughly every year.
You'll also find development builds (something like 8.2.0740); these usually function as well and have the very latest features under development, but often are less stable. I would use these only if you really need a leading-edge feature, or want to report a bug. You should then probably update very frequently, and from there it's only a small step to actually cloning the repository and building everything on your own!

How to uninstall berrybrew—perlbrew for Windows?

I have been running berrybrew on Windows
(here's the home page and GitHub repository).
I'm having some trouble with it and I want to uninstall and reinstall it, but I can't figure out how to do that.
I am hoping it is as simple as just deleting the directory where it was installed and C:\berrybrew, which is where it seems to keep files, but I don't know for sure. The instructions contain installation instructions, but no uninstallation instructions.
Disclaimer: berrybrew author here...
To uninstall and return your system back to default:
berrybrew off
berrybrew unconfig
then delete the directory you downloaded it to, as well as the installation directory (by default, C:\berrybrew)
Edit your PATH variable to remove any entries that start with C:\berrybrew (or the base install directory if you've changed it from the default). One of the path entries will point to C:\berrybrew\bin, and there may be one more that points to the currently in-use Perl installation (also under C:\berrybrew\...). Technically speaking, there shouldn't be any after the first two commands are run, but one should always verify
Essentially, there's really nothing to "uninstall". It comes down to removing $ENV{PATH} ie. specific environment variables that point to a) berrybrew.exe binary itself, and b) the Perl installation that you last used.
I will update the documentation to provide more clarity in this regard.

Install software using command prompt start command with target directory

I am trying to install software using command prompt using below command
start /wait /d "C:\abc" C:\Users\abc.exe /silent /norestart
I want to install software in c:\abc folder but it is installing in the software default directory. Is there any way to install it into the custom directory using the start command or are there any other alternatives to install the software on the target directory.
SHORT VERSION:
This may be the most "accessible" and "quick" explanation for your particular case: http://unattended.sourceforge.net/installers.php
If you are dealing with an MSI file, you should use the admin install feature to extract all the installation files first and then customize your install by setting public properties or utilizing a transform to configure the install. Details here: How to make better use of MSI files.
See the link towards the bottom to find a list of different parameters you can use for different types of setup.exe files.
DETAILS:
A setup.exe file can be "anything". It can be an old, legacy Installshield or Wise installer, a modern Windows Installer file (MSI) embedded in a setup.exe launcher, an Inno setup file (non MSI), an embedded Advanced Installer MSI setup, a compressed and self-extracting zip file, a unique and custom made installer (proprietary), or any number of other technologies, the list goes on and on and on - it is impossible to tell what tool or technology was used to create your setup.exe from the information supplied.
Just for reference, let's link to installsite.org's information on different setup technologies and available tools. Most likely your setup.exe is made using one of these tools:
Non-MSI installer tools: http://www.installsite.org/pages/en/tt_nonmsi.htm
Windows installer tools: http://www.installsite.org/pages/en/msi/authoring.htm
This may also be of help: Wix - How to run/install application without UI.
The point is, naturally, that every, different technology has its own way to enable silent installation and to customize installation parameters. So the first step for you is to determine what this file really is. Right click the file, select properties and check the details tab for any clues. Or just run the setup.exe interactively and see what the window title is (top window title bar). It will generally indicate what tool was used to create the setup.exe.
Rather than rewriting it all, and since it is a stackoverflow link (unlikely to be removed), I will just link to a similar answer on how to install setup.exe files silently: How can I use powershell to run through an installer?. See the "some links" section for links to documentation for various tools.

Failed to install 'cordova-plugin-facebook4'

I was tried to install cordova plugin facebook but it's can't install this plugin
this image
It fails because your project is in a path that contains non-ascii (cyrilic?) characters.
I'm talking about the
E:\<non-ascii foldername>\Turtle\platforms\android\...
You could rename that folder or move the contents elsewhere and see if it works.
WARNING: renaming or moving the folder may probably break many installations that depend on that, environment variables, etc.
I strongly advise that you uninstall any software development programs you installed on E:\ and reinstall it somewhere else (any path that doesn't have weird foldernames).

Difference between AddLocal and AddSource?

When you install your product locally, all the needed files are stored in the machine.
When you set the features to Advertise, files will be installed locally when the user launches the application.
What happens then when yo set the features to "run-from-source"? I Googled it and was only able to find this: http://msdn.microsoft.com/en-us/library/aa367538%28v=vs.85%29.aspx
Thanks!
This is a rarely used feature of Windows Installer and I don't normally reccomend using it. It was invented back in a day when hard drives were small and the thought was you 'advertised' ( pretend install aka install source ) a feature and that when the user clicks the shortcut it would go to the source and finish the installation of the feature ( aka install local )
It just adds a lot of complexity to your servicing model. It's not worth it IMO.
When placing all installation files next to the MSI (similar to advertised installation), you can install features from source. This means that all files in these features will be used from the MSI location (they are not copied in the target folders during install).
Running from source can be used when the installer remains permanently on the target machine. So the application can use the installer directly instead of using installed files.