This blog has moved, permanently, to http://software.safish.com.

Thursday, August 18, 2011

Cruise Control Powershell Script with spaces in path

 

I have a powershell script that is executed as a Cruise Control.NET task.  The problem is, the script sat in a length path with spaces in some of the folder names.  The “powershell” task itself doesn’t support spaces, so the solution to this is to use old-school 8 character directory names.

For example, if you script lies in the path “C:\Parent Folder\NotParent Folder”, set your task up as follows:

<powershell>
	<script>myscript.ps1</script>
	<executable>C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe</executable>
	<scriptsDirectory>C:\Parent~1\NotPar~1</scriptsDirectory>
	<description>Build something.</description>
</powershell>