问题解决方案

1. windows

1.1. 无法访问自定义操作的vbscript运行时间

1
2
无法访问自定义操作的vbscript运行时间
Could not access VBScript run time for custom action.
1
2
reg delete "HKCU\SOFTWARE\Classes\Wow6432Node\CLSID\\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}" /f
c:\windows\syswow64\regsvr32 vbscript.dll
1
2
reg delete "HKCU\SOFTWARE\Classes\CLSID\\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}" /f
c:\windows\system32\regsvr32 vbscript.dll	

1.2. 递归删除目录下的exe文件

1
ls | xargs -i% find %  -name '*.exe' -type f -print0 | xargs -0 rm -rf

2. cygwin

2.1. rake等命令无法执行

rake generate
C:\Myprogram\huanjing\ruby\Ruby200-x64\bin\ruby.exe: No such file or directory – /cygdrive/c/Myprogram/huanjing/ruby/Ruby200-x64/bin/rake (LoadError)

环境变量下面含有Linux下的程序,Cygwin优先执行该程序,所以没法运行。

配置环境变量,将相关的命令别名成.bat
alias gem=’gem.bat’
alias rake=’rake.bat’
alias erb=’erb.bat’
alias irb=’irb.bat’
alias rdoc=’rdoc.bat’
alias ri=’ri.bat’
alias rspec=’rspec.bat’
alias cucumber=’cucumber.bat’
alias bundle=’bundle.bat’

2.2. clear请屏问题

1) ctrl + l
2) 如上面方法,修改.bashrc 添加 alias cls=’echo -e “\E[2J”’
3) 在cygwind中install ncurses (in Utils) (PS: 未测试,Ctrl+L比较好使)