Run X11 Server (VcXsrv) from Windows Powershell - powershell

I would like to set up an X11 Server so that I can run graphical Linux applications using the Windows Subsystem for Linux (WSL 2). I have tried following the instructions on this site.
The command
choco install vcxsrv
completed successfully. But I cannot see how to start XLaunch (VcXsrv).
I already have Cygwin/X X Server installed on my machine and I am still able to launch that successfully. But when I try the following command,
PS C:\WINDOWS\system32> vcxsrv
I get the following error message,
vcxsrv : The term 'vcxsrv' is not recognized as the name of a cmdlet, function, script file, or operable program.
I have spent quite a bit of time trying to figure out how to start XLaunch (VcXsrv) without any success.

Try to look on default folder installation:
"C:\Program Files\VcXsrv\xlaunch.exe"

Try this command to run VcXsrv
xfsettingsd --sm-client-disable; xfce4-panel --sm-client-disable --disable-wm-check &
or
C:\Program Files\VcXsrv\xlaunch.exe
Refer the following link to understand VcXsrv installation and it's usage,
Running WSL GUI Apps on Windows 10

Related

Installing files via Composer via Command Line | "'$' is not recognized as an internal or external command, operable program or batch file."

So I am attempting to install some files from Send Grid via Composer usind the CommandLine.
I am following a tutorial with the link here https://www.youtube.com/watch?v=fEobqi3N7zw
The guy in the video has no problem using Composer via the Command Line in the Windows Command Prompt, but when I input the command $ go_www, my PC whines and stamps it's feet, giving me the following line:
'$' is not recognized as an internal or external command,
operable program or batch file.
In a nutshell, why?
System Information:
Windows 10 64x
I have looked at other posts on here, to no avail, I have tried opening the Command Line too as System Administrator, but to avail. I have tried restarting the system, to no avail, I can confirmed I have composer installed into the correct directory, to no avail .
$ in a shell indicates the shell is not owned by a superuser, it is not part of the command. Try running go_www. Also, the video you linked seems to be using a bash shell, whereas you appear to be running a Windows command prompt from the error message you included in your question, which might be a problem too.
In any case, go_www is an alias the video author uses to quickly navigate to the folder of interest. Try manually navigating there using cd.

Unable to invoke ssh.exe in PowerShell even on providing the full path via UiPath Studio

The following works on my windows machine using PowerShell
ssh username#example.com
Now, I am trying to run the same command within PowerShell using UiPath Studio for RPA but I get the standard invalid command error -
Invoke Power Shell: the term 'ssh username#example.com' is not recognized as the name of a cmdlet, function, script file, or operable program...
However ssh.exe does exist on the machine and I even tried providing the absolute path, same result.
Are there any additional configurations to be done on the UiPath / system end to make ssh executable via UiPath Studio?
Thanks in advance
I had a similar issue with Invoke-SSH, what I did was to do Import-Module Posh-SSH, but that resulted to:
Import-Module: Could no load file or assembly 'Renci.Ssh.Net
So in UiPath Studio I went to Manage Packages and installed the Nuget package for Renci SSH. Afterwards, the Import worked, and then the Invoke-SSH command worked too.
Got this tip from this video: https://www.youtube.com/watch?v=y2VnY48MJQE&ab_channel=techu

How to install telnet client on windows nano server container?

I need to test network access from a windows container, using the telnet client.
The only image i found for this is microsoft nano server, that does not come with telnet client.
I try to add it but seams the installer is not part of nano server image either.
How can i install it?
For clarity, here the steps i try:
docker run -it microsoft/dotnet:nanoserver powershell
// gives the error: Add-WindowsFeature : The term 'Add-WindowsFeature' is not recognized as the name of a cmdlet, function, script file,or operable program.
PS> powershell -Command Add-WindowsFeature "telnet-client"

PostgreSQL 9.5.1 fails to install on Windows 7 64 bit

Both 64 bit and 32 bit installers fail with the message:
There has been an error.
The environment variable COMSPEC does not seem to point the cmd.exe or there
is a trailing semicolon present. Please fix this variable and restart installation.
I checked the COMSPEC variable and there doesn't seem to be a problem. I double checked with:
%COMSPEC%" /C "echo test ok"
Everything seems ok. I am lost here. Couldn't find anything to help. I am also attaching the installer log:
Log started 03/15/2016 at 10:37:37
Preferred installation mode : qt
Trying to init installer in mode qt
Mode qt successfully initialized
Executing D:\TEMP/postgresql_installer_79c6abfe43/temp_check_comspec.bat
Script exit code: 1
Script output:
Script stderr:
'"D:\TEMP\POSTGR~1\TEMP_C~1.BAT"' is not recognized as an internal or external command,
operable program or batch file.
Error running D:\TEMP/postgresql_installer_79c6abfe43/temp_check_comspec.bat : '"D:\TEMP\POSTGR~1\TEMP_C~1.BAT"' is not recognized as an internal or external command,
operable program or batch file.

Check installed Windows Server Features with NSIS

I'm trying to install a custom build software on Windows Server 2008R2, 2008 and 2003. The software needs the "Desktop-Experience" feature from Windows to be installed.
I know I can check with servermanagercmd.exe (even though it's kind of cumbersome) in 2003 and 2008 - unfortunately, this does no longer work in 2008R2 (64bit) from inside an NSIS installer - it does work if I just run the command. Called from the installer, I'm getting a "servermanagercmd.exe is not recognized as an internal or external command, operable program or batch file."-error, even if I'm setting the working directory to c:\windows\system32 (yes, on a 64 bit machine, but there's no servermanagercmd.exe in sysWOW64).
Here's the line of code inside NSIS:
nsExec::ExecToStack 'servermanagercmd.exe -query | findstr "Desktop-Experience"'
In 2008R2, I thought the situation would actually improve, as PowerShell is now installed by default. However, when trying to get the information, I need to first load the ServerManager module inside PowerShell - but this module is not available for reading for Trusted Installer . So I'm facing the same situation again: If I'm running my powershell command from a command line, it works, but not from inside the NSIS installer.
Again, here's the line of code inside NSIS:
nsExec::ExecToStack 'powershell.exe "& "Import-Module ServerManager"'
The three(!) (double)quotation marks are actually correct.
So, does anybody know of a way to check whether Desktop-Experience is installed (and install it if not) in Windows Server 2008R2 from inside an NSIS installer? The solution does not need to work on Server2003 or 2008, because the string parsing from servermanagercmd.exe works there.
Are you using the macros in x64.nsh to turn off WOW64 redirection? (Or use "$windir\sysnative\servermanagercmd.exe")