windows
The filename, directory name, or volume label syntax is incorrect inside batch
set myPATH=”C:\Users\DEB\Downloads\10.1.1.0.4″ cd %myPATH% The single quotes do not indicate a string, they make it starts: ‘C:\ instead of C:\ so %name% is the usual syntax for expanding a variable, the !name! syntax needs to be enabled using the command setlocal ENABLEDELAYEDEXPANSION first, or by running the command prompt with CMD /V:ON. Don’t use PATH … Read more
How can I run a docker windows container on osx?
I know I am late to the party but as of 2021, this is the easiest setup to get a windows container running on macOS: https://github.com/StefanScherer/windows-docker-machine Install vagrant and virtual box Clone the repository above and change directory into it vagrant up –provider virtualbox 2019-box docker context use 2019-box I followed this setup and I … Read more
Extract private key from pfx file or certificate store WITHOUT using OpenSSL on Windows
I had the same problem and solved it with the help of PSPKI Powershell module from PS Gallery. While I understand that you look for a solution that preferably uses some built in functionality in Windows, installing a module from PS Gallery might be acceptable. At least it was in my case. First install the … Read more
On Windows what is the difference between Git Bash vs Windows Power Shell vs Command prompt
Git bash is bash, which is IIRC also the default shell on MacOS. It is not the default shell on Windows, although several implementations exist (CygWin, MinGW, …). Git is bundled with a number of POSIX (UNIX/Linux/etc.) utilities in addition to bash; in order to avoid “collisions” with similarly named Windows commands, the most common … Read more
Why is RDP so fast compared to other remote control software?
RDP is a specific protocol which allows to transmit low-level screen drawing operations. It is also aware of pixmap entities on the screen. For example it understands when an icon is drawn and caches it (typically in a lossy compressed format) on the client side. Other software does not have this low-level access: It waits … Read more
Where exactly Git Bash for Windows’ prompt is defined?
Git on Windows almost always uses a bash shell. So, it’s not Git setting the prompt as much as Bash does. There are two ways to set prompts in Bash. One is the PS1 command which is fairly flexible, but is limited to a particular set of escape character sequences. Unfortunately, Git information isn’t one … Read more
Execute Batch file in Windows Subsystem for Linux
Unfortunately at the moment you cannot do so without either using: cmd.exe /c foo.bat …or the following hack using binfmt: sudo sh -c “echo :WindowsBatch:E::bat::/init: > /proc/sys/fs/binfmt_misc/register” You could then just type: foo.bat The problems with this method are that you’d need to be root, run it each time you opened a bash window, probably … Read more
How do I get the equivalent of dirname() in a batch file?
for %%F in (%filename%) do set dirname=%%~dpF This will set %dirname% to the drive and directory of the file name stored in %filename%. Careful with filenames containing spaces, though. Either they have to be set with surrounding quotes: set filename=”C:\MyDir\MyFile with space.txt” or you have to put the quotes around the argument in the for … Read more
Windows command to tell whether a .dll file is 32 bit or 64 bit?
DUMPBIN is included with Visual C++ and can provide this information with the /HEADERS switch. Example output from a 32-bit image: FILE HEADER VALUES 14C machine (i386) 6 number of sections 306F7A22 time date stamp Sun Oct 01 22:35:30 1995 0 file pointer to symbol table 1D1 number of symbols E0 size of optional header … Read more