I was just wondering if there is a way to save the output of the command adb install APK into a text file.
I have tried the normal way of
adb install apk > output.txt.
This only saves "Performing Streamed Install" part of the installation process.
I want to get the next output of this command where it shows me whether it has Succeeded in installing the APK or not
Other solutions that I have tried includes
FOR /f 'tokens=*' %%G IN (adb install APK) DO echo %%G > output.txt
This command still only shows me "Performing Streamed Install" text.
An example of what I want would be the results
adb: failed to install 55bc5294aaf6e7ec291f24791d444af2a91a7c996c06f72b84dfc5dc99abce8d.apk: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
or
Success
saved into a text file
Thank you in Advance
Related
I work with laravel 5 , when i type in windows cmd this command
"touch storage\database.sqlite"
this error message rise
'touch' is not recognized as an internal or external command, operable program or batch file.
any hint to solve it ?
if you are using node.js just use npm to install it on Windows with this command:
npm install touch-cli -g
it will install the command line interface for touch, you can then use it the same as unix...
Fixed after running this command:
npm install touch-cli -g
After that I can run this:
touch .babelrc
The command you're trying to run is a unix/linux based command so it won't work in Windows.
All it does is update the modified timestamps of a file.
There's another question on here that gives you an alternative for Windows: https://superuser.com/questions/10426/windows-equivalent-of-the-linux-command-touch/764716
You have to install Touch CLI, Run below command in CLI
npm install touch-cli -g
You can just use echo> in windows cmd
i.epath/file.sqlite
If you are on windows device just install git bash and type the following command
touch test.html.
The above command will generate a zero kilobyte test.html file for you in your specified directory.
It is applicable to any other type of file.
If you are trying to use TypeScript in ReactNative first run:
npm install touch-cli -g
and then you can use touch, example:
touch rn-cli.config.js
ex:
type nul >test.html in windows CMD & another one ways is
echo.>test.html
both are working 100% fine
Just run it through the GitBash terminal on windows and it works fine
Incase anyone is trying to use the 'touch' command from windows to configure Typescript for a React Native app, or anything else. It works for me by running the 'touch' command either from git bash or by downloading the WSL and running it from there.
You can type the same cmd in git bash in the folder where you want your compose file.
, used with copy to indicate missing parameters. This updates the files
modified date. E.G. copy /b file1,,
I use this syntax in cmd. So far it is working well without installing something.
type nul > (filename)
In my case, I used
type nul > index.js // for creating an empty Javascript file.
If all the solutions above still dont work for you. Try this:
If you already have Git installed, then you also have GIT BASH installed too... To solve this problem navigate to your project directory using the GIT BASH Terminal and try again using touch Procfile. It should work perfectly.
I was reading a solution in the GitHub community and it's effective for me.
If you are using VSCode and you would like to do something like Linux you can use git bash and it works the same. You can add git bash into VSCode by the following:
File -> Preferences -> Setting ( Or Ctrl + , ).
Now, looking the top right and choose the icon "Open Settings (JSON)".
Add this to the last of the Setting file:
"terminal.integrated.profiles.windows": {
"Git Bash": {
"path": "C:\\Program Files\\Git\\bin\\bash.exe"
},
},
"terminal.integrated.defaultProfile.windows": "Git Bash"
Finally reopen the VSCode and open the git bash terminal in your VSCode.
Notice: Make sure you have already installed Git Bash. Good luck!
You may be using PowerShell. The team helped me Add-Content.
Link to the page
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/add-content?view=powershell-7.2&viewFallbackFrom=powershell-7.1
Example: Add-Content -Path .\Test.txt //Test.txt - name of file
run this code in cmd then Finish:)))))))
npm install touch-cli -g
I am trying to install a program on a remote computer using a command line argument and a batch script. For testing, I'm installing Notepad++ as the program.
Here is the command line I'm using to access the remote computer:
psexec \\comp-2 -h -u localAdmin -p password -c -f C:\install-npp.bat
This is the batch file code I've written:
#echo off
#echo Hello this creates a pointless temp file >C:\temp\EmptyFile.txt
xcopy \\FILESVR\Shared\npp.exe C:\temp\npp.exe
start C:\temp\npp.exe
pause
(Please note: the second line is only to make sure that the script is in fact doing something).
When I run the psexec command listed above from my first computer, the EmptyFile.txt is created, and npp.exe is copied over to the temp directory, but the executable is never run.
What am i doing wrong? the machines are in a windows workgroup.
Thanks in advance!
the start command is waiting a title as first argument so try start "" c:\temp\npp.exe.
BTW looking at http://coreworx.blogspot.fr/2010/07/unattended-installation-notepad.html I saw you will have to add /S to make a silent install of npp
I am working with the cmd prompt in Windows 7 (Win32). I have a txt file with a list of URLs of the files I would like to download. Similar to cURL HTTP transfer data, I am using the following command:
C:\...\Desktop>for i in `cat curltest.txt`; do curl $i -OL -s; done
and I get the following error:
i was unexpected at this time
I have been able to successfully run an even simpler command (i.e., curl http://gooogle.com).
I read at cURL HTTP transfer data that
"It looks like you are attempting to run some sort of Unix style shell command in the windows 7 command prompt."
And, rather than running it in a Windows Powershell command prompt, I would like to run it in the Windows command prompt.
Does anyone know how I might modify this command so that it will run using Windows cmd.exe?
Thanks ahead of time.
for /f "delims=" %u in (curltest.txt) do curl -OLs "%u"
In windows, for command sintax is different. This is the equivalent in windows of the code in your question.
If it will be included in a batch file, it will be necessary to double the percent signs
for /f "delims=" %%u in (curltest.txt) do curl -OLs "%%u"
I'm trying to script the installation of a number of patches using a batch file since powershell doesn't properly install the patches. The command I'm running is this:
dism /online /add-package /PackagePath:"C:\<path>\5cbb03ca-7a2a-4326-952f-80ad8052a886\windows6.1-kb2836942-x64-express.cab"
That works perfectly when run directly from the command line. But if I put it in a file called example.bat it fails with the following message:
'þd' is not recognized as an internal or external command
I think your batch file is saved as Unicode.
Re-open it in Notepad and re-save it, making sure the Encoding field is set to ANSI.
I just installed gVim, and tried using the usual "vim myfile.java" technique that usually works for linux to open up a file and edit it. But unfortunately, this doesn't seem to work. I've also tried "gvim myfile.java", but that doesn't work either.
Does anyone know how to open up vim (and use it like you do in linux) using Windows Powershell, or some other technique?
When you install gVim:
Please make sure [✓] Create .bat files for command line use is checked.
It'll create several .bat files in C:\Windows\:
C:\>cd %windir%
C:\WINDOWS>dir /b *.bat
evim.bat
gview.bat
gvim.bat
gvimdiff.bat
view.bat
vim.bat
vimdiff.bat
vimtutor.bat
Notice that: C:\WINDOWS is already in the PATH environment variable.
When you type vim in command line, C:\WINDOWS\vim.bat will be launched.
If you leave the checkbox mentioned above unchecked, you need to modify PATH manually.
Just to supplement, I'm on a fairly highly controlled Windows workstation right now, and don't have access to much. Downloading the "executable installer" that I usually use did not create the bat files nor, for some reason, vim.exe, though gvim.exe was installed in the vim74 dir for me and worked fine. So though I also needed to set the PATH, that there was no bat file in C:\WiNDOWS nor any command line executable in my VIm runtime folder to call meant that callingvim from the command line (or Powershell) didn't work.
I'm guessing some portion of the install that's creating the command-line related stuff, apparently including vim.exe, isn't recovering gracefully when you don't have admin permissions.
Either way, the "right" thing to do appears to be to set your PATH to your vim executable folder as usual (note that this might be a little more difficult than usual if you don't have admin privs), then download the "Win32 console executable" from the usual download page that matches the version of gvim that you've already installed, dig vim.exe out of that zip you just downloaded, and place that into the same folder as gvim.exe.
Looking on another box where the executable installer did work "fully", there's some jive in the vim.bat file that wasn't installed for me about "collect the arguments in VIMARGS for Win95" and if .%OS%==.Windows_NT goto ntaction, etc etc, but not having any of that doesn't seem to be a problem on Win7, at least. ;^)
Windows 10 has linux subsystem for windows. So you can install bash in windows and from bash you can use vim.I found it more convenient.
Install gVim on your window and enable ".bat" when you install gvim and click next, done.
You can use vim on window.
Because of restrictions on my workstation, I had to install my instance of vim locally to the following folder: %LocalAppData%\Vim
But just changing an environmental variable like others suggest is insufficient because the batch files aren't in the installation directory (such as vimdiff). So I figured out where these come from, and made my own batch files to add them to an environmental variable. To help you make these batch files, I've provided the list of commands below for you to run in the vim installation directory (if saving the commands to an install.bat file first, replace all % characters with %% to escape it):
echo #echo off > evim.bat
echo gvim.exe -y %* >> evim.bat
echo #echo off > view.bat
echo vim.exe -R %* >> view.bat
echo #echo off > gview.bat
echo gvim.exe -R %* >> gview.bat
echo #echo off > vimdiff.bat
echo vim.exe -d %* >> vimdiff.bat
echo #echo off > gvimdiff.bat
echo vim.exe -d %* >> gvimdiff.bat
Then you have to go to Start > Search 'Edit environment variables for your account' > Find 'Path' > Edit > Add a new subentry for %LocalAppData%\Vim\vim82. Last you may need to close and open the command prompt, or kill explorer.exe and restart it.