I have an appx file which was generated elsewhere and I would like to test it in my Windows 10 machine.
The appx file is already available to me and I can deploy it to other devices using the WinAppDeployCmd, which works for the XBox One. This works perfectly with the following command:
WinAppDeployCmd install -file "!MY_FILE!" -ip "!DEVICE_IP!" -pin "!DEVICE_PIN!"
My question is, is there a similar command to simply run my .appx in the windows machine where it currently is? Is there perhaps even a way to use the WinAppDeployCmd to install it in the current machine?
I don't know about cmd, but in PowerShell you can use
Add-AppxPackage -Path C:\Users\User\MyApp.appx
If the package is unsigned, you will need to enable developer mode in Windows 10 before it can be installed.
Open Settings.
Click on Update & security
Click on For developers.
Under “Use developer features”, enable Developer mode.
More information on Add-AppxPackage: https://technet.microsoft.com/en-us/library/hh856048.aspx
Update: Regarding using WinAppDeployCmd for this see: Can I Use WinAppDeployCmd install, update on pc itself
Related
Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 21 days ago.
The community reviewed whether to reopen this question 21 days ago and left it closed:
Original close reason(s) were not resolved
Improve this question
On my work are not allowed to install apps from the Microsoft Store. Yes, this is a bank, that not supported Windows 10 (it's hell).
Is it possible to install Ubuntu in WSL without downloading it from the app store?
Or is it possible to download Ubuntu app without Microsoft Store and then install it?
Yes, it is possible to download the app without the Store. Some available distributions are listed in the Manual Installation section of the MS guide (https://learn.microsoft.com/en-us/windows/wsl/install-manual)
The actual manual installation instructions are hidden in the Server Install section of the manual (https://learn.microsoft.com/en-us/windows/wsl/install-on-server), but my understanding is that you can just run the .appx file you downloaded and it should work anyway.
Whether it's wise to install WSL/Ubuntu on a work computer that you don't control is another question, but one which only you can answer.
I had the same problem, could do it like this (from PowerShell):
# go into some folder into which you want the file to be downloaded
cd <somefolder>
# download Ubuntu 20.04
Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing
# install downloaded *.appx file
Add-AppxPackage .\Ubuntu.appx
Afterwards I did Windows+S and typed "Ubuntu" to show the installed app, then executed it to finish setup (new user name + password must be given).
I checked the success doing: wsl --list --verbose and received this:
NAME STATE VERSION
Ubuntu-20.04 Running 1
So finally, I needed to convert my Ubuntu to WSL2 like this:
wsl --set-version Ubuntu-20.04 2
Voila!
I created a powershell script to install wsl2 with optional X-Windows and Pulse Audio support. I also captured my experience with installing wsl without Store access in the Readme.md.
For the detail see here: https://github.com/andras-varro/wsl2i
I believe these are the most important points:
Check if your installation supports WSL2: Windows logo key + R, type winver [enter]. You should have Version 1903 or higher, with Build 18362 or higher
Enable WSL2
Open an admin prompt (Press shift+ctrl and click on PowerShell/cmd)
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Reboot your computer
Download and install the WSL2 kernel from: https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
Open a PowerShell or cmd and execute:
wsl --set-default-version 2
Install a Linux distro
Please only download an available distro from here: https://learn.microsoft.com/en-us/windows/wsl/install-manual
Explanation: if you install through appx installer without Windows Store enabled, you might run into a 'File not found' or 0x80070002 error.
Create a location on your system drive (see: https://learn.microsoft.com/en-us/windows/wsl/install-win10#troubleshooting-installation, but it works for me on D: drive) where you want your distro to run from (like c:\work\wsl)
Extract the downloaded distro appx file using your favorite zip tool (7Zip or WinZip or ..) into the selected location (Right click on the appx and extract to the created folder (like c:\work\wsl))
Set access rights for your Linux installer folder so that everybody has all the rights
Open a cmd or PowerShell and execute: icacls [your folder] /t /grant Everyone:(OI)(CI)F
Example: icacls c:\work\wsl /t /grant Everyone:(OI)(CI)F
Start the setup as Administrator. Example with Ubuntu: right click on ubuntu2004.exe and select Run as adminsitrator
Follow the on screen instructions
Test your WSL2
After the setup finished and you have the Linux command prompt try to start bash from Windows' Run (Win+R)
Exit from the started bash and from the bash you got after the installation
Start bash from Windows' Run (Win+R) (again)
Yes, It is possible to install Ubuntu without opening the store.
Open settings in windows and enable developer mode.
Once the developer mode is enabled, Go to Windows search and Type Bash.
It will open Bash command prompt. Allow it to download Ubuntu automatically.
Cheers!!!
You can use winget (Windows Package Manager):
winget install -e --id Canonical.Ubuntu
To get another version than the "latest", search for them via:
winget search -s winget Ubuntu
If you omit the -s winget option, the versions from other sources like the Microsoft store will be displayed too.
In an administrator PowerShell or Windows Command Prompt and then restarting your machine:
wsl --install --distribution Ubuntu
You can get distributions list by:
wsl --list --online
The application that I compiled via Visual Basic 6 can run on my Windows XP computer. But when I execute the same executable on my other computer that runs Windows 8, I always get Runtime Error 52-Bad File name or number as soon as I launch it. I can't run the program even if there is no "Shell command" in that program which leads to a "Bad file name" error.
I used "Package and Deployment wizard" for the packaging process.
And also I registered the needed DLL's on the Windows 8 PC manually via the regsvr32 command line utility.
I also cleaned the whole registry via a registry cleaner (Wise Registry Cleaner). I used compatibility mode for Windows XP but nothing solved the problem.
Additional informations:
XP Version - SP 2
Windows 8 Version-8.1
VB - VB 6.0
Assuming that your code is
If Dir("C:/file.txt") = "" Then...
Change it to a backslash ("\")
After some research I found the answer for the problem. That was not a problem in the coding; it was ALL about windows 8 compatibility.
Go to the “Compatibility” tab of the properties window of the file and select “Windows XP SP2” under the “Compatibility mode”. That’s all
Windows 8 no longer allows you to write programmatically in the root of drive C:\ (and in many others 'system' folders like Program Files, Windows, System32, ...).
Try to use a sub-folder.
I have a python file in my Bash on Windows environment.
Is it possible to debug it with Visual Code or Visual Studio?
Can a debugger be attached to the Linux python version that exists in the Bash on Windows environment?
I think you've got a few options for this. If you're attempting to debug a python file that's saved on your home directory in Bash on Windows, you can navigate to your home directory in Windows by going to "C:\Users\[windows username]\AppData\Local\lxss\home\[ubuntu username]\". Then you can open any of your projects or files saved on your home folder in Ubuntu. You can even make a shortcut on your desktop or something to make it easier to access this folder.
However, if you need the environment that you have on Bash for dependencies or python modules, your other option is to install a GUI and Linux-compatible IDE of your preference on Ubuntu, and use Xming on Windows to run the IDE on your screen. A tutorial on how to do this can be found here.
If you need to debug a linux python program from Visual Studio, a simple Google search yielded this. I haven't tried it but this seems to be the solution you are looking for. For connecting over the network to Bash on Windows from Windows, use localhost for the host.
Your best bet might be to just move the file. Your normal windows system is mounted under /mnt/c.
You can just copy it to your desktop by doing
cp (path to your file) /mnt/c/(your username)/Desktop
When you need to access or edit it from bash, just cd to that location (or wherever else you choose to store it).
Interesting other idea: you could mount cloud storage (e.g. google drive) via fuse in linux then set it up in windows. Copy the python to it and you can edit in windows and access in linux as needed. (Google is your friend here; look into google-drive-ocamlfuse or gdrivefs).
Hope this helps!
jBit
I would suggest making use of the Remote - WSL extension for Visual Studio code. It allows you to easily access your Windows Subsystem for Linux (WSL) and use it as a full-time dev environment.
Here is an article on how to set up Visual Studio Code Remote-WSL.
After that is set up, you can quickly load your python file in the VS Code editor using a command like: code path/to/python_file.py
I am unable to find a reliable way to install elastic's packetbeat on windows. I know I'll have to download source and create my own windows package. However, all instructions are outdated and are from before it moved to elastic's domain.
Anyone know how to compile this package for windows?
Download and install WinPcap from this page. WinPcap is a library that uses a driver to enable packet capturing.
Download the Packetbeat Windows zip file from here.
Extract the contents of the zip file into C:\Program Files.
Rename the packetbeat--windows directory to Packetbeat.
Open a PowerShell prompt as an Administrator (right-click the PowerShell icon and select Run As Administrator). If you are running Windows XP, you may need to download and install PowerShell.
Run the following commands to install Packetbeat as a Windows service:
PS > cd 'C:\Program Files\Packetbeat'
PS C:\Program Files\Packetbeat> .\install-service-packetbeat.ps1
Note
If script execution is disabled on your system, you need to set the execution policy for the current session to allow the script to run. For example: PowerShell.exe -ExecutionPolicy UnRestricted -File .\install-service-packetbeat.ps1.
Before starting Packetbeat, you should look at the configuration options in the configuration file, for example C:\Program Files\Packetbeat\packetbeat.yml or /etc/packetbeat/packetbeat.yml
Here is the link to the documentation of installing packetbeat on windows.
Follow the instructions on this page to install packetbeat on your windows machine.
Note:
winpcap.dll is required for packetbeat to function on a windows machine. WinPCap itself isn't currently supported, so the current best practice is to use npcap in winpcap compatibility mode instead. See this section of the Packetbeat FAQ
You can download npcap's installer here.
The command line call to install npcap (version 0.86) in winpcap compatibility mode is:
npcap-0.86.exe /winpcap_mode=yes
The silent install would be:
npcap-0.86.exe /S /winpcap_mode=yes
I had this issue and couldn´t find any answer. The issue was that I was trying to use Azure cdmlets to connect to O365 via c# code, but I couldn´t get the connect-msolservice.
""The term is not recognized" error when you try to run administrative Windows PowerShell cmdlets in Office 365"
After reviewing Microsoft's TechNet article "Azure Active Directory Cmdlets" -> section "Install the Azure AD Module", it seems that this process has been drastically simplified, thankfully.
As of 2016/06/30, in order to successfully execute the PowerShell commands Import-Module MSOnline and Connect-MsolService, you will need to install the following applications (64-bit only):
Applicable Operating Systems: Windows 7 to 10
Name: "Microsoft Online Services Sign-in Assistant for IT Professionals RTW"
Version: 7.250.4556.0 (latest)
Installer URL: https://www.microsoft.com/en-us/download/details.aspx?id=41950
Installer file name: msoidcli_64.msi
Applicable Operating Systems: Windows 7 to 10
Name: "Windows Azure Active Directory Module for Windows PowerShell"
Version: Unknown but the latest installer file's SHA-256 hash is D077CF49077EE133523C1D3AE9A4BF437D220B16D651005BBC12F7BDAD1BF313
Installer URL: https://technet.microsoft.com/en-us/library/dn975125.aspx
Installer file name: AdministrationConfig-en.msi
Applicable Operating Systems: Windows 7 only
Name: "Windows PowerShell 3.0"
Version: 3.0 (later versions will probably work too)
Installer URL: https://www.microsoft.com/en-us/download/details.aspx?id=34595
Installer file name: Windows6.1-KB2506143-x64.msu
After hours of searching and trying I found out that on a x64 server the MSOnline modules must be installed for x64, and some programs that need to run them are using the x86 PS version, so they will never find it.
[SOLUTION]
What I did to solve the issue was:
Copy the folders called MSOnline and MSOnline Extended from the source
C:\Windows\System32\WindowsPowerShell\v1.0\Modules\
to the folder
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules\
And then in PS run the Import-Module MSOnline, and it will automatically get the module :D
The solution with copying 32-bit libs over to 64-bit did not work for me. What worked was unchecking Target Platform Prefer 32-bit check mark in project properties.
I'm using a newer version of the SPO Management Shell. For me to get the error to go away, I changed my Import-Module statement to use:
Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking;
I also use the newer command:
Connect-SPOService
Connects to both Office 365 and Exchange Online in one easy to use script.
REMINDER: You must have the following installed in order to manage Office 365 via PowerShell.
Microsoft Online Services Sign-in Assistant:
http://go.microsoft.com/fwlink/?LinkId=286152
Azure AD Module for Windows PowerShell
32 bit - http://go.microsoft.com/fwlink/p/?linkid=236298
64 bit - http://go.microsoft.com/fwlink/p/?linkid=236297
MORE INFORMATION FOUND HERE:
http://technet.microsoft.com/en-us/library/hh974317.aspx
The following is needed:
MS Online Services Assistant needs to be downloaded and installed.
MS Online Module for PowerShell needs to be downloaded and installed
Connect to Microsoft Online in PowerShell
Source: http://www.msdigest.net/2012/03/how-to-connect-to-office-365-with-powershell/
Then
Follow this one if you're running a 64bits computer:
I’m running a x64 OS currently (Win8 Pro).
Copy the folder MSOnline from (1) –> (2) as seen here
1) C:\Windows\System32\WindowsPowerShell\v1.0\Modules(MSOnline)
2) C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules(MSOnline)
Source: http://blog.clauskonrad.net/2013/06/powershell-and-c-cant-load-msonline.html
Hope this is better and can save some people's time