cmd

Set proxies via command line (windows)

倖福魔咒の 提交于 2020-05-12 11:04:06
问题 How to set proxy to each profile I have in waterfox via command line or script who do this automatically. I have 50 profiles by the way. This what I want to do but via cmd-line: 回答1: I don't know waterfox, but if it is similar to firefox the first lines in prefs.js state: > pushd "%APPDATA%\Mozilla\Firefox\Profiles\*.default" > more prefs.js // Mozilla User Preferences // DO NOT EDIT THIS FILE. // // If you make changes to this file while the application is running, // the changes will be

Set proxies via command line (windows)

不羁岁月 提交于 2020-05-12 11:03:21
问题 How to set proxy to each profile I have in waterfox via command line or script who do this automatically. I have 50 profiles by the way. This what I want to do but via cmd-line: 回答1: I don't know waterfox, but if it is similar to firefox the first lines in prefs.js state: > pushd "%APPDATA%\Mozilla\Firefox\Profiles\*.default" > more prefs.js // Mozilla User Preferences // DO NOT EDIT THIS FILE. // // If you make changes to this file while the application is running, // the changes will be

passing JSON string via command line

守給你的承諾、 提交于 2020-05-10 21:33:14
问题 I'm serialize an object to json string and passing that to an app through command line but when I receive the arguments in the app, this is no longer a json string but a regular string . I'm using below code to create json string var jsonStr = new JavaScriptSerializer().Serialize(obj); string that I'm passing - "{"name":"abc","place":"xyz"}" string that I receive - "{name:abc,place:xyz}"; How can I maintain the structure of the json string ? 回答1: I guess double quots are wiped out because

passing JSON string via command line

点点圈 提交于 2020-05-10 21:33:08
问题 I'm serialize an object to json string and passing that to an app through command line but when I receive the arguments in the app, this is no longer a json string but a regular string . I'm using below code to create json string var jsonStr = new JavaScriptSerializer().Serialize(obj); string that I'm passing - "{"name":"abc","place":"xyz"}" string that I receive - "{name:abc,place:xyz}"; How can I maintain the structure of the json string ? 回答1: I guess double quots are wiped out because

passing JSON string via command line

老子叫甜甜 提交于 2020-05-10 21:32:55
问题 I'm serialize an object to json string and passing that to an app through command line but when I receive the arguments in the app, this is no longer a json string but a regular string . I'm using below code to create json string var jsonStr = new JavaScriptSerializer().Serialize(obj); string that I'm passing - "{"name":"abc","place":"xyz"}" string that I receive - "{name:abc,place:xyz}"; How can I maintain the structure of the json string ? 回答1: I guess double quots are wiped out because

How to split large text file in windows?

一笑奈何 提交于 2020-05-09 17:45:27
问题 I have a log file with size of 2.5 GB. Is there any way to split this file into smaller files using windows command prompt? 回答1: If you have installed Git for Windows, you should have Git Bash installed, since that comes with Git. Use the split command in Git Bash to split a file: into files of size 500MB each: split myLargeFile.txt -b 500m into files with 10000 lines each: split myLargeFile.txt -l 10000 Tips: If you don't have Git/Git Bash, download at https://git-scm.com/download If you

create a command line argument .bat file that can change all .exe file compatibility settings in a specific directroy

£可爱£侵袭症+ 提交于 2020-05-09 06:50:50
问题 I have multiple drives with a different directory structures. I have a directory called "test files" with of several .exe files that I need to change the compatibility settings to "run this program as administrator" Is it possible to create a windows .bat file that runs as Admin and that can change all the .exe files compatibility settings in a specific directory and all its sub-directories, regardless of where "test files" is located, to "run this program as an Administrator" This is what I

Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output - while installing auto-py-to-exe through pip

北城余情 提交于 2020-05-09 05:57:09
问题 I am trying to download auto-py-to-exe on a different (windows) device than I usually use through pip. However when run I get the error (sorry it is so very very long): ERROR: Command errored out with exit status 1: command: 'c:\users\tom\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\tom\\AppData\\Local\\Temp\\pip-install-aplljhe0\\gevent\\setup.py'"'"'; __file__='"'"'C:\\Users\\tom\\AppData\\Local\\Temp\\pip-install

Get CPU temperature in CMD/POWER Shell

眉间皱痕 提交于 2020-05-08 04:45:08
问题 In my computer I am trying to get the CPU temperature. Searching on StackOverflow I found this: C:\WINDOWS\system32>wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature But I get this error: Node - ADMIN ERROR: Description = Not supported 回答1: you can use this code : function Get-Temperature { $t = Get-WmiObject MSAcpi_ThermalZoneTemperature -Namespace "root/wmi" $returntemp = @() foreach ($temp in $t.CurrentTemperature) { $currentTempKelvin = $temp / 10

Unable to pipe cmdlet objects in cmd

对着背影说爱祢 提交于 2020-04-30 07:35:43
问题 i am using this powershell command to fetch a particular user profile "Get-WmiObject -Class Win32_UserProfile | Where-Object {$_.LocalPath -eq 'C:\Users\Pela'}" But when i am using this same command in cmd by invoking powershell i am getting 'Where-Object is not recognized as an internal or external command,operable program or batch file' The command i am running in cmd is as follows :- "powershell Get-WmiObject -Class Win32_UserProfile | Where-Object {$_.LocalPath -eq 'C:\Users\Pela'}" I