Change Windows Live Writer’s Posts Directory with PowerShell

While setting up Windows Live Writer 2011, I wanted to change the posts directory to a location under my Dropbox directory, but WLW doesn’t have a setting for doing that. Thankfully, I found a post at 40tech that explains how to use a registry hack to change the posts directory.

The following PowerShell script will make the necessary changes to the registry:

$Path = (Resolve-Path -Path $Path -ErrorAction Stop).Path
$keyPath = 'HKCU:\Software\Microsoft\Windows Live\Writer'
New-ItemProperty -Path $keyPath -Name PostsDirectory -PropertyType String -Value $Path -Force

I named the script Set-WLWPostsDirectory.ps1 and placed it in .\Dropbox\Blog. From each computer that I sync with Dropbox, I run:

 PS C:\Users\Ryan\Dropbox\Blog> .\Set-WLWPostsDirectory.ps1 $PWD

Now posts can be edited from any of my computers with Windows Live Writer.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: