How do I keep SSH connection alive on Windows 10?
In C:\Users\yourusername\.ssh make a new file named config, and add the lines below: Host * ServerAliveInterval 40
In C:\Users\yourusername\.ssh make a new file named config, and add the lines below: Host * ServerAliveInterval 40
On Linux there are mutiple options The typical used one is touch touch bar.txt However you may also use echo if you want to create and write to the file right away The following command tells to create bar.txt and put foo inside of it echo foo > bar.txt You may also use >> which … Read more
Solution is: using System.Runtime.InteropServices; [DllImport(“shell32.dll”, CharSet = CharSet.Auto)] static extern bool ShellExecuteEx(ref SHELLEXECUTEINFO lpExecInfo); [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SHELLEXECUTEINFO { public int cbSize; public uint fMask; public IntPtr hwnd; [MarshalAs(UnmanagedType.LPTStr)] public string lpVerb; [MarshalAs(UnmanagedType.LPTStr)] public string lpFile; [MarshalAs(UnmanagedType.LPTStr)] public string lpParameters; [MarshalAs(UnmanagedType.LPTStr)] public string lpDirectory; public int nShow; public IntPtr hInstApp; public IntPtr … Read more
A Raymond’s post: Do not write in-process shell extensions in managed code. A recent follow-up: Now that version 4 of the .NET Framework supports in-process side-by-side runtimes, is it now okay to write shell extensions in managed code? The bottom line is, no, it is not okay: The Guidance for implementing in-process extensions has been … Read more
As ever so often Zarco Gajic has a solution: Capture the output from a DOS (command/console) Window. This is a copy from his article for future reference: The example runs ‘chkdsk.exe c:\’ and displays the output to Memo1. Put a TMemo (Memo1) and a TButton (Button1) on your form. Put this code in the OnCLick … Read more
“C:\Program Files (x86)\Git\bin\sh.exe” –login -i -c “git archive master | tar -x -C $0” “%~1”
Process.Start. Note that advanced uses (printing etc) require using a ProcessStartInfo and setting the Verb property.
Unless someone here happens to work on the Windows Shell team, I doubt that you’re going to get an answer that really addresses the technical limitations and how they affect the design choice. But I’ll try… My guess is that there isn’t any technical limitation, or at least there isn’t one now. The real reason … Read more
Ran across this today — it’s a few months old, but it got the job done for me (on Win7, extracting thumbnails on MPEG-4 files): Source : https://github.com/dbarros/WindowsAPICodePack Nuget : https://www.nuget.org/packages/WindowsAPICodePack-Shell Code: ShellFile shellFile = ShellFile.FromFilePath(pathToYourFile); Bitmap shellThumb = shellFile.Thumbnail.ExtraLargeBitmap; Hope it helps!