摘要: 在部署执行SSIS包的时候出现这个错误Failed to decrypt protected XML node "DTS:Property" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is av 阅读全文
posted @ 2011-12-13 17:19 Simon_Chen 阅读(1825) 评论(0) 推荐(0) 编辑
摘要: Read-Host 获取用户输入值Write-Host 输出回显$newName=Read-Host"Pleaseinputthenewnameforthestring'test',leaveasdefault,pressEnter:"Write-Host"Processing..."$newLine=[System.Environment]::NewLine$dir=(Get-Location).Path+"\"$file=$dir+"test.txt"$a+=Get-Content$fileif 阅读全文
posted @ 2011-12-13 16:49 Simon_Chen 阅读(1080) 评论(0) 推荐(0) 编辑
摘要: for /f "tokens=*" %%a in ('powershell Get-ExecutionPolicy') do (set originPolicy=%%a)通过for循环查找功能来将 powershell 命令的值赋给 batch file 变量@echooffsetdir=%CD%setscriptPath=%dir%\example.ps1for/f"tokens=*"%%ain('powershellGet-ExecutionPolicy')do(setoriginPolicy=%%a)powershe 阅读全文
posted @ 2011-12-13 16:40 Simon_Chen 阅读(1896) 评论(0) 推荐(0) 编辑
摘要: @echo on 是否输出命令行 若为off 则仅输出命令行中的输出显示%CD% 可获取当前文件所在的路径,其中CD实为 命令行 命令delims= 按指定字符查找每行,分隔成对应列的字符串并给每行加行号tokens=* 按指定值取对应列,* 为取全部字符串for /f "delims=" %%a in ('findstr /n .* %ofile%') do 循环变量文件中每行的字符串,findstr /n .* 为匹配所有字符,并赋值给变量%%afor /f "delims=" %%a in ('type %ofile% 阅读全文
posted @ 2011-12-13 16:33 Simon_Chen 阅读(14620) 评论(0) 推荐(0) 编辑