Wed, 08 Aug 2012

Symlink as Regular User (Win7 Home Premium)

Hey Windows, why cant you be more like Unix?


By default Windows allows only an administrator account to create symlinks. This behaviour can easily be changed via the Group Policy Editor. Unless you are stuck with the Home Premium edition, which doesn’t include the Group Policy Editor.

However, the Windows API can be used to add the required privilege to a regular user’s account and enable it. That’s what the following executable does: EnableUserSymlinks.zip.

To use it, run the executable at a command prompt run as administrator, with the user’s name and password as parameters, like this:

EnableUserSymlinks <username> <password>

(You may have to quote your username or password if it contains spaces or other characters that are treated by the console in a special way. Best to always quote them, unless you know what you are doing)

EnableUserSymlinks "JohnDoe" "12345"

Running an executable with elevated privileges and even handing over your user’s credentials is a risky business, so here’s the source code, in case you want to look at it and/or compile the application yourself, to make sure nothing malign is going on under the hood: EnableUserSymlinks.cpp


Enable Javascript to see comments