What is Windows PowerShell?

PowerShell is a new command shell and scripting language for Windows. It is cool for a lot of reasons: The language is sane, especially when compared to CMD. Scripts and command line share a language. CMD had many small but important differences. CScript and Windows Scripting Host are not interpreted. Command line usage can be … Read more

What directories do the different Application SpecialFolders point to in WindowsXP and Windows Vista

There’s no single answer to that. In fact, that’s precisely why these “SpecialFolder”s are defined. You use those instead of a hardcoded path. Environment.SpecialFolder.ApplicationData is the most common one. This folder holds per-user, non-temporary application-specific data, other than user documents. A common example would be a settings or configuration file. Environment.SpecialFolder.CommonApplicationData is similar, but shared … Read more

C#: What is the fastest way to generate a unique filename?

A GUID would be extremely fast, since it’s implementation guarantees Windows can generate at least 16,384 GUIDS in a 100-nanosecond timespan. (As others pointed out, the spec doesn’t guarantee, only allows for. However, GUID generation is really, really fast. Really.) The likelihood of collision on any filesystem anywhere on any network is very low. It’s … Read more

IntelliJ IDEA git Permission denied (publickey)

I faced this problem while connecting bitbucket cloud from my Intellij 2019.2 , which thankfully got solved with the following steps. Please note that these steps are to be carried out after you successfully generate and add ssh-public key to your bitbucket/github/gitlab profile. Open Git-SCM ssh_config file present in Git-SCM installation directory.It’s default location in … Read more

How to detect inactive user

To track a user’s idle time you could hook keyboard and mouse activity. Note, however, that installing a system-wide message hook is a very invasive thing to do and should be avoided if possible, since it will require your hook DLL to be loaded into all processes. Another solution is to use the GetLastInputInfo API … Read more