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:

param(
    [parameter(Mandatory=$true)]
    $Path
)
$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.

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: