cmd

enable Win10 inbuild hotspot by cmd/batch/powershell

你。 提交于 2020-01-22 12:42:45
问题 as the title says I search for a way to enable/disable the Hotspot inbuild in Win10 via the command prompt/powershell/a batch file. In the GUI it can be easily done with the third button in the network panel (see image below), but I want to automate it. I already found some hundred tutorials how to create a new hotspot via netsh, but as I understand it this would create another, different hotspot. Instead I want to use the already configured one. Or does Win10 the same and everytime creates a

Suppress “The program can't start because X.dll is missing” error popup

雨燕双飞 提交于 2020-01-22 12:32:46
问题 I have a Python program which uses os.system to execute various commands. (It can't use subprocess because it has to be backward compatible all the way to Python 2.0.) On Windows, sometimes the command references DLLs in an unusual directory, and so I get the infamous "The program can't start because X.dll is missing" error popup. My question is not about how to make the command find all its DLLs. I already know how to do that. What I want to know is, how do I tell Windows not to show this

Convert all CR to CRLF in text file using CMD

瘦欲@ 提交于 2020-01-22 07:32:13
问题 Is there a way to convert all CRs to CRLFs in a text file? When I open a text file from Linux server on Windows, all text is displayed in one line, but actually it's a multi line one. I'd like to perform the conversion in a batch file. Can anyone advice, please? 回答1: Line separators and line terminators have been a source of compatibility friction between systems as long as there has been more than one kind of system and an urge to exchange data. The Wikipedia article on the Newline has a

Using FOR or FORFILES batch command to individually archive specific files

我与影子孤独终老i 提交于 2020-01-22 02:19:07
问题 I have a set of .iso files in different directories and sub-directories: <folder1> app1.iso app2.iso app3.iso <subfolder1> app1a.iso app2a.iso <subfolder2> app2b.iso app3b.iso <folder2> app4.iso app5.iso <subfolder5> app20.iso Using a batch file and having 7-zip pre-installed (with PATH environment variable configured), I want to be able to archive each .iso to it's own individual .7z archive file. I don't want to archive all .iso's in a current folder into one archive. I attempted to create

how to create a textfile with UTF-8 encoding through vbscript?

寵の児 提交于 2020-01-21 20:21:08
问题 I have written the following code segment: strVar = "one line that I want to write in the text file with extension .csv" 'Set fso = CreateObject("Scripting.FileSystemObject") 'fso.CreateTextFile(str2) 'Set f = fso.OpenTextFile(str2,2,True) 'f.WriteLine(str4) 'str2 holds the name of the file, say abc.csv //this is a comment the default encoding for text files, I think, is ANSI. However, I want to encode it to IUTF-8. the reason I want to do so is that I have a .temp file encoded in UTF-8

Run ipconfig command with php

China☆狼群 提交于 2020-01-21 16:58:10
问题 I use this code to understand some information of visitors (clients). It has been running on my virtual server on Xampp, but I can`t run on my main server (host). I see just a blank page. $info = system('ipconfig /all'); echo $info; 回答1: this might help you Server IP You can get the server IP address from $_SERVER['SERVER_ADDR'] . Client IP address You can get the client IP from $_SERVER['REMOTE_ADDR'] Edit : you ask in comments how to get the output of an external command - one way is to use

Run ipconfig command with php

家住魔仙堡 提交于 2020-01-21 16:58:08
问题 I use this code to understand some information of visitors (clients). It has been running on my virtual server on Xampp, but I can`t run on my main server (host). I see just a blank page. $info = system('ipconfig /all'); echo $info; 回答1: this might help you Server IP You can get the server IP address from $_SERVER['SERVER_ADDR'] . Client IP address You can get the client IP from $_SERVER['REMOTE_ADDR'] Edit : you ask in comments how to get the output of an external command - one way is to use

Run ipconfig command with php

China☆狼群 提交于 2020-01-21 16:57:10
问题 I use this code to understand some information of visitors (clients). It has been running on my virtual server on Xampp, but I can`t run on my main server (host). I see just a blank page. $info = system('ipconfig /all'); echo $info; 回答1: this might help you Server IP You can get the server IP address from $_SERVER['SERVER_ADDR'] . Client IP address You can get the client IP from $_SERVER['REMOTE_ADDR'] Edit : you ask in comments how to get the output of an external command - one way is to use

Simple jq filters not working in Windows shell, various quoting issues

99封情书 提交于 2020-01-21 15:22:32
问题 I am trying really hard to get the Windows shell working with jq and failing miserably. I want this type of thing to work echo '["a","b","c"]' | .\Downloads\jq.exe -r '{ "data": map({ "{#SNAME}": . })}' But I get an error: jq: error: syntax error, unexpected '.' (Windows cmd shell quoting issues?) at , line 1: If i just do echo '["a","b","c"]' | .\Downloads\jq.exe -r '.' then it's happy but as soon i i add in other characters such as echo '["a","b","c"]' | .\Downloads\jq.exe -r '{.}' then it

Simple jq filters not working in Windows shell, various quoting issues

此生再无相见时 提交于 2020-01-21 15:21:12
问题 I am trying really hard to get the Windows shell working with jq and failing miserably. I want this type of thing to work echo '["a","b","c"]' | .\Downloads\jq.exe -r '{ "data": map({ "{#SNAME}": . })}' But I get an error: jq: error: syntax error, unexpected '.' (Windows cmd shell quoting issues?) at , line 1: If i just do echo '["a","b","c"]' | .\Downloads\jq.exe -r '.' then it's happy but as soon i i add in other characters such as echo '["a","b","c"]' | .\Downloads\jq.exe -r '{.}' then it