by sqlpadawan at 2013-02-21 11:09:42
I’m having trouble with spaces in the args.by ArtB0514 at 2013-02-21 12:49:39
# sql server 2008 path
$DTSPath = (Get-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\100\SSIS\Setup\DTSPath").‘(default)’
#C:\Program Files\Microsoft SQL Server\100\DTS\Binn<br>$BinnPath = = $DTSPath + "BINN"
#C:\Program Files\Microsoft SQL Server\100\DTS\Packages<br>$PackagePath = $DTSPath + "Packages"
$BinnPath = $DTSPath + "BINN"
$PackagePath = $DTSPath + "Packages"
$cmd = $BinnPath + "dtutil.exe"
$arg1 = "-file C:\Users\bullenkr\Documents\Visual Studio 2008\Projects\TestDeployment\TestDeployment\bin\Deployment\TestDeployment.dtsx"
$arg2 = "-copy FILE`;$PackagePath\TestDeployment.dtsx’";
& $cmd $arg1 $arg2;
Write-Host $LastExitCode;
When I run it, it pops an error on $arg1;
Option "Studio" is not valid.
6
I know this should be easy, but I can’t seem to get it today.
Any ideas?
See if this way (an extra set of quote marks) works:$arg1 = '-file "C:\Users\bullenkr\Documents\Visual Studio 2008\Projects\TestDeployment\TestDeployment\bin\Deployment\TestDeployment.dtsx"'