Monthly Archives: June 2013
How to disable FlashPlayerPlugin process
With the release of Flash player 11.3 Adobe has changed their player so it uses a different process when playing flash videos in the browser. The main reason for that was to ensure that if for whatever reason the flash player encounters a problem the browser will be unaffected. In some cases users expressed that the new process was causing issues for them which means that the ideal thing to do in that case is to disable flash’s protected mode.
In order to disable flash’s protected mode follow the next steps:
- Navigate to C:\Windows\SysWOW64\Macromed\Flash (Windows 64-bit systems) or C:\Windows\System32\Macromed (Windows 32-bit systems) depending on what Windows bit version you are running
- Locate and open the file with the name mms.cfg
- Then simply change the line
ProtectedMode
line from ProtectedMode=1 to ProtectedMode=0 - Restart your browser
Now flash player should no longer start a separate process everytime a flash video is being played in your browser.
Posted in Software Tips.
Tagged Adobe, flash player, FlashPlayerPlugin, ProtectedMode
How to get the short path of a directory
In some occasions it might be necessary to use a directory’s short path. This is possible with the use of the Windows GetShortPathName
function.
Implementation:
1 2 3 4 5 6 7 8 9 | [DllImport("kernel32.dll", CharSet = CharSet.Auto)] public static extern uint GetShortPathName(string lpszLongPath, StringBuilder lpszShortPath, uint cchBuffer); private static string GetShortPath(string longPath) { StringBuilder shortPath = new StringBuilder(255); GetShortPathName(longPath, shortPath, 255); return shortPath.ToString(); } |
Simply call the GetShortPath
with the directory you want to get the short path as an argument.
Example:
1 | string applicationShortPath = GetShortPath(Application.ExecutablePath); |
Posted in C#.
Tagged C#, csharp, GetShortPathName, short path, snippet, winforms
Lower your ping by disabling Nagle’s algorithm
By default Windows uses the Nagle’s algorithm when handling messages. That means that in order for your connection to send a message, that message needs to be at least the size of MSS (maximum segment size), which in most cases it is inefficient when dealing with small sized packets and situations that deal with real-time systems. Because these reasons disabling Nagle’s algorithm can considerably lower your latency/ping.
In order to disable Nagle’s algorithm simply following these steps:
- Open up the Registry Editor.
Click start --> Run
and type in regedit - Navigate to the following key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces
- You will notice that there are a few interfaces with the following format:
{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
. Simply navigate to all of them and look for clues (usually the value of DhcpIPAddress) that will indicate which is your default interface. Alternative you can do the next steps for all interfaces that are not empty if you want to disable Nagle’s algorithm on all devices. - Right click on an empty space in the right window and select New –> DWORD (32-bit) Value and set its name to TcpAckFrequency. Then double click the key in order to modify it and change its
value data
to 1 - Repeat step 4 but this time set the name of the DWORD (32-bit) Value key to TCPNoDelay. Then again make sure to modify the key and change its
value data
to 1 - Restart your Windows and you are done!
Posted in Software Tips.
Tagged latency, Nagle's algorithm, tcp, TcpAckFrequency, TCPNoDelay