??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美日韩日日夜夜,日韩av在线中文字幕,亚洲免费资源在线播放http://www.aygfsteel.com/xiaomage234/category/35224.html生命本就是一ơ凄的漂流Q记忆中放不下的Q永q是孩提时代的那一份浪漫与U真Q?/description>zh-cnWed, 06 Apr 2016 15:50:31 GMTWed, 06 Apr 2016 15:50:31 GMT605 Unexpectedly Useful Command Line Tools You Might Overlookhttp://www.aygfsteel.com/xiaomage234/archive/2016/04/06/429990.html马?/dc:creator>马?/author>Wed, 06 Apr 2016 07:08:00 GMThttp://www.aygfsteel.com/xiaomage234/archive/2016/04/06/429990.htmlhttp://www.aygfsteel.com/xiaomage234/comments/429990.htmlhttp://www.aygfsteel.com/xiaomage234/archive/2016/04/06/429990.html#Feedback0http://www.aygfsteel.com/xiaomage234/comments/commentRss/429990.htmlhttp://www.aygfsteel.com/xiaomage234/services/trackbacks/429990.htmlfrom:http://zeroturnaround.com/rebellabs/5-unexpectedly-useful-command-line-tools-you-might-overlook/

My previous RebelLabs post showed us that there still is a nice amount of interest among the developers in neat command line tools. This is great news as it means there are still lots of geeks reaching for their maximum l33t potential! This post will, as the title suggests, jump into 5 more tools that will hopefully tickle your fancy.

Whilst it is hard to find a set of tools relevant for every different command line professional or enthusiast, I can still wholly recommend glancing over these tools briefly. You never know when you’ll get stuck in a terminal only environment or will need to impress a friend with your exceptional command line skills. So without further ado, here are 5 more command line tools you should consider using!

z

1. Install it once
2. Forget it’s even there
3. Profit from its productivity: z.

OK, but what’s it all about? Well, z allows you to quickly jump from folder to folder, without having to bother writing the full absolute or relative paths. To achieve this, it simply records all the folders you visit, and then ranks them based on a combination of the frequency and time of last use. Now all you need to do is type z part/of/path and hit enter. With this, z will automagically guide you to the highest ranking match.

To install z, download z.sh and source it in ~/.zshrc or ~/.bashrc, if you still haven’t made the inevitable jump to ZSH. Now go about your regular flow, cd-ing all over the place, and you are done!

Alternatively, if you use the oh-my-zsh framework, simply add it in the plugins listing of ~/.zshrc.

 $ vim ~/.zshrc  plugins=(brew git mercurial mvn osx sbt scala vi-mode z) 

By default, z stores its data in ~/.z, below are my contents after I cleared them and moved around a bit. After printing the data, you can see I moved to 2 different folders by specifying only a small part of the path, irrespective of the current folder. Take note that the directory name was matched mid-word in a case insensitive way — very handy!

All in all I highly recommend this great tool to anyone that spends any amount of time at the command line, whatever your background, interest or use case may be.

z

youtube-dl

The second tool of this post is the excellent youtube-dl. A cross-platform tool allowing you to, unsuprisingly, download Youtube videos. The easiest way to install is either via Homebrew orpip as shown below. Other download options can be found via the link above.

 $ brew install youtube-dl  $ sudo pip install --upgrade youtube_dl 

At times, for whatever reason, you may want to download a presentation for archiving’s purposes. Or better yet, imagine you spend the weekend in the Estonian countryside, devoid of internet, yet you really wanted to see the latest Virtual JUG sessions. A simple youtube-dl https://youtu.be/PQPvZkA-6bg suffices at this point.

youtube-dl

Other nice things to take note of:

  • You are not limited to downloading from Youtube only, Vimeo for example is also supported.
  • Simply point to a Youtube playlist and youtube-dl will be smart enough to automatically download the full list.
  • As shown in the example image, youtube-dl will happily follow shortened URLs for you.
  • By default the highest quality video will be downloaded, however a simple youtube-dl -f $FORMAT $LINK will override this. You find available formats with the -F flag.
  • A veritable host of additional options are nicely documented and easily accessible via man youtube-dl.

shellcheck

I will assume that anyone spending significant some time at the command line will want to automate tasks using shell scripts. Bash itself is renowned for its many pitfalls, and even advanced scripters will from time to time bump into something unexpected. Unfortunately for us, a shell script has no undo button, and “unexpected” results may well be synonymous with “catastrophic” results.

Long intro short: we have a valuable tool on our side to guard ourselves against exactly this,shellcheck! In essence, it is a static analyser that will tell you where your script goes wrong.

Install shellcheck via your package manager of choice: Homebrew, Pacman, APT; build it from source, or run it inside your browser.

 $ brew install shellcheck  # pacman -S shellcheck  # apt-get install shellcheck 

This list may be of particular interest to you as it describes code samples that shellcheck can protect you against. To run, simply execute shellcheck my-script, it will read the shebang (#!) directive to decide whether to analyse as shbash or ksh.

shellcheck

As shown in the example output above, there is one syntax error, it’s marked in red: spaces surrounding the assignment. However, shellcheck goes beyond that. In yellow markings is a warning of a potentially catastrophic event: what if toDelete is ever empty? Granted, the example is somewhat contrived, without –no-preserve-root there will be no damage should the statement resolve to /, but my point still stands! Finally, in green you will find general warnings on potential future mishaps that are best not to be ignored.

As a closing remark on shellcheck: use the neat Syntastic Vim plugin to integrate the tool inside Vim itself, configuring when it should run, how it should behave, etc. The same script that generated the ouput above now looks like the following, from our favorite text editor.

shellcheck-vim

multitail

For the sys-admins and dev-opses amongst us: stop using tail -f, and start using, multitail, tail on steroids! This ultimate log-viewer allows you to do a couple of really cool things that make it worth mentioning. Alternatively you could always either use tmux or screen to get in-shell multiplexing, or just use a modern terminal emulator allowing you to do the splitting like that, such as iTerm2 or Terminator, however in these cases you may miss some of the features below.

  • Show multiple windows at the same time, in the same shell using ncurses.
  • Merge multiple logs in the same window, for example the stdout and the stderr log of the same application.
  • Perform filtering dynamically via in-menu editable regexes.
  • Use the predefined color highlighters to make the logs more legible, or define your own, again with regular expressions.

You know the drill how to install:

 $ brew install multitail  # pacman -S multitail  # apt-get install multitail 

For an actual example, here is a screenshot of a window where I’m developing JRebel by attaching it to Tomcat, running the infamous petclinic project. At that time I needed both Tomcat’s own output and the JRebel one. Take note of the -CS flag, signifying “use this color scheme for all subsequent files”, followed by the name of the scheme.
As both logs color nicely with the Apache rules, they are set, finally followed by the actual paths of the logfiles.

 $ multitail -CS apache "$TOMCAT_HOME/logs/catalina.out" "$HOME/.jrebel/jrebel.log" 

multitail

tree

Our final tool in this post is the essential tree utility. Tree prints a nice, structured, tree-view of your directories, allowing you to instantly get an idea about the structure of your data, without having to lscd or z all over the place. If it is not yet pre-installed in your favourite *NIX, then grab it via your favourite package manager.

 $ brew install tree  # pacman -S tree  # apt-get install tree 

In its most basic form, you simply type $ tree to print the current folder’s structure.

tree

Personally, I prefer to spice it up just a little bit, adding some flags to print human readable filesizes, hidden files, and a nice total sizecount: $ tree -ah --du.

tree-fancy

And that is about all I have to tell you about tree. It’s really convenient to grep its output, it gives you an awesome representation of the filesystem, and I’m sure you’ll love it from the first moment.

That concludes my list of command line tools that you won’t think will change you live, but sure enough after some time you won’t imagine yourself not using them. In fact, you’ll likely curse every time you use a command-line-muggle’s computer without these great tools installed. What are the hidden gems of your command-line-fu? Share your favorite command line utilities in the comments below, I really would like to learn new tricks.



]]>
5 command line tools you should be usinghttp://www.aygfsteel.com/xiaomage234/archive/2016/04/06/429988.html马?/dc:creator>马?/author>Wed, 06 Apr 2016 06:49:00 GMThttp://www.aygfsteel.com/xiaomage234/archive/2016/04/06/429988.htmlhttp://www.aygfsteel.com/xiaomage234/comments/429988.htmlhttp://www.aygfsteel.com/xiaomage234/archive/2016/04/06/429988.html#Feedback0http://www.aygfsteel.com/xiaomage234/comments/commentRss/429988.htmlhttp://www.aygfsteel.com/xiaomage234/services/trackbacks/429988.htmlfrom:http://zeroturnaround.com/rebellabs/5-command-line-tools-you-should-be-using/

Working on the command line will make you more productive, even on Windows!

There’s an age-old discussion between the usability and friendliness of GUI programs, versus the simplicity and productivity of CLI ones. But this is not a holy war I intend to trigger or fuel. In the past, RebelLabs has discussed built-in JDK tools and received amazing feedback, so I feel an urge to share more non-JDK command line tools which I simply couldn’t live without.

I do firmly believe every developer who’s worth their salt should have at least some notion of how to work with the command line, if only because some tools only exist in CLI variants. Plus, because geek++!

All other nuances that people pour words over, like the choice of operating system (OSX of course, they have beautiful aluminum cases), your favorite shell (really it should be ZSH), or the preference of Vim over Emacs (unless you have more fingers than usual) are much less relevant. OK, that was a little flamewar-like, but I promise that will be the last of it!

So my advice would be that you should learn how to use tools at the command line, as it will have a positive impact on your happiness and productivity at least for half a century!

Anyway, in this post I want to share with you four-five lesser-known yet pretty awesome command line gems. As an added bonus I will also advise the proper way to use shell under Windows, which is a pretty valuable bit of knowledge in itself.

The reason I wanted to write this post in the first place is because I really enjoy using these tools myself, and want to learn about other command line tools that I don’t yet know about. So please, awesome reader, leave me a comment with your favourite CLI tools — that’d be grand! Now, assuming we all have a nice, workable shell, let’s go over some neat command line tools that are worth hearing about.

0. HTTPie

 

The first on my list is a tool called HTTPie. Fear not, this tool has nothing to do with Internet Explorer, fortunately. In essence HTTPie is a cURL wrapper, the utility that performs HTTP requests from the command line. HTTPie adds nice features like auto-formatting and intelligent colour highlighting to the output making it much more readable and useful to the user. Additionally, it takes a very human-centric approach to its execution, not asking you to remember obscure flags and options. To perform an HTTP GET, you simply run http, to post you http POST, what can be easier or more beautiful?

sample httpie output

Almost all command line tools are conveniently packaged for installation. HTTPie is no exception, to install it, run the following command.

  • On OSX use homebrew, the best package manager to be found on OSX: brew install httpie
  • All other platforms, using Python’s pip: pip install --upgrade httpie

I personally use HTTPie a lot when developing a REST API, as it allows me to very simply query the API, returning nicely structured, legible data. Without doubt this tool saves me serious work and frustration. Luckily the usage does not stop at just REST APIs. Generally speaking, all interactions over HTTP, whether it’s inputting or outputting data, can be done in a very human-readable format.

I’d encourage you to take a look at the website, spend the 10 seconds it takes to install and give it a go yourself. Try to get the source of any website and be amazed by the output.

How unstoppable you can be with proper tools

Protip: Combine the HTTPie greatness with jq for command line JSON manipulation or pup for HTML parsing and you’ll be unstoppable!

1. Icdiff

 

At ZeroTurnaround I am blessed to work with Mercurial, a very nice and easy to use VCS. On OSX the excellent GUI program SourceTree makes working with Mercurial an absolute breeze, even with the more complex stuff. Unfortunately I like to keep the number of programs/tabs/windows I have open to an absolute minimum. Since I always have a terminal window opened it makes sense to use the CLI.

All was fine and well apart from one single pitfall in my setup. This was a feature I could barely go without: side-by-side diffs. Introducing icdiff. Of all the tools I use each day, this is the one I most appreciate. Let’s take a look at a screenshot:

example of icdiff at work

By itself, icdiff is an intelligent Python script, smart at detecting which of the differences are modifications, additions or deletions. The excellent colour highlighting in the tool makes it easy to distinguish between the three types of differences mentioned.

To get going with icdiff, do the following:

  • Via homebrew once again: brew install icdiff
  • Manually grab the Python script from the site above and put it in your PATH

When you couple icdiff with a VCS such as Mercurial, you’ll see it really shine. To fully integrate it, you’ll need to complete two more configuration steps, already documented here. The gist of the instructions is to first add a wrapping script that allows the one-by-one file diff of icdiff to operate on entire directories. Secondly you need to config your VCS to actually use icdiff. The link above shows the details of configuring it for Mercurial, but porting this to Git shouldn’t be so hard.

2. Pandoc

 

In the spirit of “practice what you preach” I set out to write this entire blogpost via a CLI. Most of the work was done using MacVim, in iTerm2 on OSX. All of the text was written and formatted using standard MarkDown syntax. The only issue to arise here is that it’s pretty difficult sometimes to accurately guess how your eventual text will come out.

This is where the next tool comes in: Pandoc. A program so powerful and versatile it’s a wonder it was GPL’d in the first place. Let’s take a look at how we might use it.

pandoc -f markdown -t html blogpost.md > blogpost.html 

Think of a markup format, any markup format. The chances are, Pandoc can convert it from one format to any other. For example, I’m writing this blogpost in Vim and use Pandoc to convert it from MarkDown into HTML, to actually see the final result. It’s a nice thing, needing only my terminal and a browser, rather than being tied to a particular online platform, fully standalone and offline.

Don’t let yourself be limited by simple formats like MarkDown though, give it some docx files, or perhaps some LaTeX. Export into PDFepub, let it handle and format your citations. The possibilities are endless.

Once again brew install pandoc does the trick. Did I mention I really like Homebrew? Maybe that should have made my tool list! Anyway, you get the gist of what that does!

3. Moreutils

 

The next tool in this post is actually a collection of nifty tools that didn’t make it into coreutils:Moreutils. It should be obtainable under moreutils in about any distro you can think of. OSX users can get all this goodness by brewing it like I did throughout this post:

brew install moreutils 

Here are a list of the included programs with short descriptions:

  • chronic: runs a command quietly unless it fails
  • combine: combine the lines in two files using boolean operations
  • ifdata: get network interface info without parsing ifconfig output
  • ifne: run a program if the standard input is not empty
  • isutf8: check if a file or standard input is utf-8
  • lckdo: execute a program with a lock held
  • mispipe: pipe two commands, returning the exit status of the first
  • parallel: run multiple jobs at once
  • pee: tee standard input to pipes
  • sponge: soak up standard input and write to a file
  • ts: timestamp standard input
  • vidir: edit a directory in your text editor
  • vipe: insert a text editor into a pipe
  • zrun: automatically uncompress arguments to command

As the maintainer hints himself sponge is perhaps the most useful tool, in that you can easily sponge up standard input into a file. However, it is not difficult to see the advantages of some of the other commands such as chronicparallel and pee.

My personal favourite though, and the ultimate reason to include this collection, is without doubtvipe.

You can literally intercept your data as it moves from command to command through the pipe. Even though this is not a useful tool in your scripts, it can be extremely helpful when running commands interactively. Instead of giving you a useful example I will leave you with a modified fortune!

sample vipe command

4. Babun

 

These days the Windows OS comes packaged with two different shells: its classic command line, and PowerShell. Let’s completely ignore those and have a look at the proper way or running command line tools under Windows: Babun! The reason this project is amazingly awesome is because it actually brings all the goodness of the \*NIX command line into Windows in a completely pre-configured no-nonsense manner.

Moreover, its default shell is my beloved ZSH, though it can very easily be changed to use Bash, if that’s your cup of tea. With ZSH it also packages the highly popular oh-my-zsh framework, which combines all the benefits of ZSH with no config whatsoever thanks to some very sane defaults and an impressive plugin system.

By default Babun is loaded with more applications than any sane developer may ever need, and is thus a rather solid 728 MBs(!) when expanded. In return you get essentials like Vim pre-installed and ready to go!

screenshot of babun termina;

Under the hood Babun is basically a fancy wrapper around Cygwin. If you already have a Cygwin install you can seamlessly re-use that one. Otherwise it will default to its own packaged Cygwin binaries, and supply you with access to those.

Some more points of interest are that Babun provides its own package manager, which again wraps around Cygwin’s, and an update mechanism both for itself and for oh-my-zsh. The best thing is that no actual installation is required, nor is the usual requirement of admin rights necessary, so for those people on a locked down PC this may be just the thing they need!


I hope this small selection of tools gave you at least one new cool toy to play with. As for me, it seems it is time to look at command line browsers before writing a following blogpost, to fully ditch the world of the GUI!

By all means fire up any comments or suggestions that you have, and let’s get some tool-sharing going on. If you just want to chat just ping RebelLabs on Twitter: @ZeroTurnaround, they are pretty chatty, but great smart people.



]]>
DVD隐藏技术【h工光盘坏道?如何查看 http://www.aygfsteel.com/xiaomage234/archive/2014/10/27/419069.html马?/dc:creator>马?/author>Mon, 27 Oct 2014 01:45:00 GMThttp://www.aygfsteel.com/xiaomage234/archive/2014/10/27/419069.htmlhttp://www.aygfsteel.com/xiaomage234/comments/419069.htmlhttp://www.aygfsteel.com/xiaomage234/archive/2014/10/27/419069.html#Feedback0http://www.aygfsteel.com/xiaomage234/comments/commentRss/419069.htmlhttp://www.aygfsteel.com/xiaomage234/services/trackbacks/419069.html人工光盘坏道

目前最新的加密ҎQ原理是该VCD带防盗圈Q这个圈的作用是在光头读盘到防盗圈处时是个坏道,从物理上让光p不过去,你会发现光盘可以昄定wQ但打开目录却没有Q何文Ӟ市面上的无间?、天地英雄、大块头有大智慧{最新VCD都是采用q种加密Ҏ?

破解ҎQ?

步骤1Q首先我们需要CloneCDq个软gQ下载地址Q天极网下蝲频道。注意不能用NERO{其他光pYӞ因ؓNEROMq坏道,可能造成L的情c?

首次q行在Language语言栏内选择SIMP.ChineseQ界面显CZؓ中文。点?#8220;文g→L映像文g”Q在弹出的对话框中选择物理光驱的盘W,注意不能选择虚拟盘符。选择后CloneCD会对整个VCDq行扫描Q由于制作的是视频镜像,所以选择multimedia audio cdQ然后选择镜像文g保存目录Q右面已l显C出扫描后光盘的定w、片断、轨道数{一些信息(?Q?

CloneCD读取的整个光盘内容制作成镜像文Ӟ中途在记录框中出现d扇区p|的信息,同时光驱中会出现咔咔咔咔的响声音Q这个是正常现象。cloneCD能制作镜像的原理是能真实地按照1∶1 全盘复制CDQ不是否有保护或加密之c,它都会蟩qh|的坏道把有用部分镜像制作出来?

跌坏道大概用时两三分钟Q视你的光驱ȝ能力而定Q在昄跌伪扇区后l过十多分钟可以把q个光盘制作成镜像文Ӟ最后显C取完成后在目录下会出现image.img{四个文件?

步骤2Q已l得C的IMG镜像文gQ还不能使用其他虚拟光驱工具来打开它,q时你会发现q是一无所莗接下来的工作是提取镜像文g中的视频文gQ我们还需要IsoBusterq个工具Q下载地址Q天极网下蝲频道q行IsoBusterQ点?#8220;file→open image file”来打开image.img文gQ在ȝ面中应该出现光盘的卷标和目录l构Q在track 01上右击,?#8220;extract track 01→treat as video onlyextract but filter only m2f2 mpeg video framesQ.mpgQ?#8221;Q然后选择文g存放目录Q最后经q几分钟的时间就得到了原始的MPG视频文gQ用来复制VCD或在PC上观看就d选择了?br />如果以上Ҏq不能解冻I说明加密的是最新的技术,暂时q没破解的方?/pre>

]]>
图文详解Keepass使用教程http://www.aygfsteel.com/xiaomage234/archive/2013/04/18/398037.html马?/dc:creator>马?/author>Thu, 18 Apr 2013 08:45:00 GMThttp://www.aygfsteel.com/xiaomage234/archive/2013/04/18/398037.htmlhttp://www.aygfsteel.com/xiaomage234/comments/398037.htmlhttp://www.aygfsteel.com/xiaomage234/archive/2013/04/18/398037.html#Feedback0http://www.aygfsteel.com/xiaomage234/comments/commentRss/398037.htmlhttp://www.aygfsteel.com/xiaomage234/services/trackbacks/398037.htmlKeePass Password SafeQ以下简UKeePassQ是一套类似数据库理的密码管理YӞ通过密码和密钥,它能够提供一个够安全的密码存储I间。只要你Cq一个管理密码,妥善保管好密钥文件和数据库文Ӟ基本上可以安枕无忧了。同时KeePass也有强大的密码生成功能,l对比你自己想的要安全。它的操作方式也极ؓ 单,没有复杂的步骤?/p>

一Q下载及安装
站长癄下蝲站最新版下蝲地址Qhttp://down.zzbaike.com/download/KeePass–1257.htmlQ下载安装包解压后双d装文件根据安装向导就可以安装?br style="padding: 0px; margin: 0px;" />
选择I accept意思也是我同意,然后nextQ下一步)Q根据提Clnext可以安装成功?br style="padding: 0px; margin: 0px;" />软g是英文的Q安装好之后我们看到界面仍旧都是英文的,我们可以去http://keepass.info/translations.htmlQ中下蝲体中文插件复制放到安装目录下Q运行Y?#8220;KeePass”Q点?#8220;View”菜单?#8220;Change Language”命oQ选择“体中?#8221;重新启动E序卛_?/p>


二:使用软g
l过上面的步骤,我们q回到桌面双击keepass的快捷键Q就可以看到软g的语a已经变成中文的了

q样可以方便我们的使用了?br style="padding: 0px; margin: 0px;" />如果是第一ơ用,我们首先的是要创建数据库Q也是存放密码的数据库QKeePass会把你的所有密码存储在q个数据库中?br style="padding: 0px; margin: 0px;" />单击菜单上的“文g—新徏”Q选择数据库存攄路径

选择一个\径来保存我们的数据库Q然后点M存,

q里需要填入数据库理密码Qƈ要确认密码,我们同时要勾选上密匙文gQƈ选择密钥的保存位|(可以选择不用密钥Q。这样将来在开启数据库时就?#8220;d?#8221;?#8220;密钥文g”同时具备才行。输入完毕后点击“定”然后点击创徏

鼠标在黑色区域划q生成的密码位数在下方可以很清楚的看刎ͼ然后点击定

在这里描q或者不描述都可以,点击定后就q入ȝ口ƈ可以看到一条示例记录,点击CZ记录在下方可以看到网址和密码ƈ且也创徏旉?a style="padding: 0px; margin: 0px; color: #aa752a;">

ȝ口的左边是密码群l,各个组又可建立子群l。右Ҏ你的密码记录。密码记录收U于不同的密码群l中。你可以使用Keepass默认的密码群l,或删除它们,创徏自己的密码组?/p>

在主H口双单击右键Q选择“d记录…”Q就可以~辑你的记录了:记录标题Q用户名Q网址Q密码,备注{。可以空着不填。确认后完成了一条记录了Q在ȝ口右边的子窗口中看到刚才新增的密码条目?br style="padding: 0px; margin: 0px;" />

当你再次使用q个文gӞ选中该条记录Q在记录上右击鼠标就可以真正使用它了。你可以用户名拯后,可以在其它的Q何Y件中_脓了,q可以将用户名拖攑ֈ其它H口中。最后,一定要C保存密码Q点?#8220;文g->保存”Q或工具栏上的保存按钮?/p>

提示Q随着数据库里的记录数目的逐步增多Q通过“~辑”菜单中的“在数据库中查?#8221;?#8220;在此组内查?#8221;命o可以q速的扑ֈ要查的信息。另外,我们可以把数据库导出为TXT、HTML、XML、CSV{格式,导入CSV、TXT、KeePass数据库等格式的文件?/p>

三:数据库的配置

点击“文g->数据库设|?#8230;”Q在弹出的窗口的选择“安全”按钮创徏一个加密算法,q设|密钥的加密ơ数Q如果选择生成密钥的话Q。通常加密ơ数的数量辑ֈ10万,也就_了?br style="padding: 0px; margin: 0px;" />

四:Keepass数据的备?br style="padding: 0px; margin: 0px;" />首先要备份KeePass.exe所在目录中的KeePass.ini文g。其ơ,备䆾你所保存的密码数据库文gQ?.kdbQ。如果你生在了密钥,q要保存密钥文g。以上文件打包后Q可以放入多动存储装|中Q或攑օ|络I间?br style="padding: 0px; margin: 0px;" />提示Q如果用L密码记录l常变动Q那么相应的KeePass数据也要l常备䆾。保存好你的数据。尽你有数不清的密码,但只需看好一个KeePass数据备䆾可以了?br style="padding: 0px; margin: 0px;" />五:密码生成?br style="padding: 0px; margin: 0px;" />在添加记录时Q我们可以利用密码生成器来生成复杂的密码Q点?#8220;密码”右侧?#8220;生成”按钮Q调?#8220;密码生成?#8221;属性框Q然后,点击“定”按钮卛_自动生成随机密码。通过点击“***”按钮密码明文显C,清楚的看到由生成器所产生的字W串?br style="padding: 0px; margin: 0px;" />

六:Keepass常用讄

打开【工兗?>【选项…】,可以对Keepass作设|了?br style="padding: 0px; margin: 0px;" />
?#8220;安全”选项卡中勾上Q设定锁定主H口旉Q?00Q自p|适合的时_
自动清空剪脓板时_讄旉?U?br style="padding: 0px; margin: 0px;" />“高”选项卡中Ҏ需要勾上适合的选项?/p>

我们现在生活中各个方面都需要用到密码,|站Q邮,论坛Q银行卡{等Q用keepass可以方便的ؓ我们服务记录各种不同的密码,使我们的操作更加省时高效Q管理更方便安全?/p>

版权xQ?/strong> 葫芦博客(www.huluboke.com )专栏作家原创
原文地址 http://www.huluboke.com/keepass-jiaocheng/转蝲请保留本版权信息



]]>
12306 订票助手 ?火R自动订?Chrome 扩展http://www.aygfsteel.com/xiaomage234/archive/2012/09/18/388017.html马?/dc:creator>马?/author>Tue, 18 Sep 2012 10:42:00 GMThttp://www.aygfsteel.com/xiaomage234/archive/2012/09/18/388017.htmlhttp://www.aygfsteel.com/xiaomage234/comments/388017.htmlhttp://www.aygfsteel.com/xiaomage234/archive/2012/09/18/388017.html#Feedback0http://www.aygfsteel.com/xiaomage234/comments/commentRss/388017.htmlhttp://www.aygfsteel.com/xiaomage234/services/trackbacks/388017.html12306 订票助手 – 火R自动订?Chrome 扩展54
8 votes
 on 2012.01.10标签: 

12306 订票助手 是款 Chrome 扩展Q用来对 12306.cn |址q行自动dQ自动查询,自动重试订单。@Appinn

12306 订票助手   火R自动订?Chrome 扩展[图] | 众软g

火R四q发么,好久没发现程序员如此热情?#8230;

q款工具比较适合d的技术宅了,希望今天介绍q不太晚,Ҏ订票 12 天来看,目前Q??0日)已经可以订到1?1日的了Q距L节仅一天,基本上是攑ց的开始的最后日子了?/p>

12306 订票助手 使用前提Q须使用 Chrome 览器,以及安装 UserScriptQ然后打开 https://dynamic.12306.cn/otsweb/ 开始订?/p>

上图试登陆78ơ后成功Q而下囑ֈ开始刷?#8230;

12306 订票助手   火R自动订?Chrome 扩展[图] | 众软g

L成功会蓝色通知以及声音提示Q此时点击预订按钮,可以进入自动提交订单页面,h意正填写实名制火R坐车h信息Q自动提及后q接到付款阶段Q无认选项。作者提供了详尽的步骤说明可以参考?/p>

12306 订票助手   火R自动订?Chrome 扩展[图] | 众软g https://github.com/zzdhidden/12306 

]]>
文g夹右键cmdq入该目?/title><link>http://www.aygfsteel.com/xiaomage234/archive/2012/04/12/373977.html</link><dc:creator>马?/dc:creator><author>马?/author><pubDate>Thu, 12 Apr 2012 08:01:00 GMT</pubDate><guid>http://www.aygfsteel.com/xiaomage234/archive/2012/04/12/373977.html</guid><wfw:comment>http://www.aygfsteel.com/xiaomage234/comments/373977.html</wfw:comment><comments>http://www.aygfsteel.com/xiaomage234/archive/2012/04/12/373977.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xiaomage234/comments/commentRss/373977.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xiaomage234/services/trackbacks/373977.html</trackback:ping><description><![CDATA[<div>Windows Registry Editor Version 5.00<br />[HKEY_CLASSES_ROOT\Directory\shell\cmd\command]<br />@="cmd.exe /k \"cd %L\""</div><br /><br />保存?cmd.regq双d可生效?img src ="http://www.aygfsteel.com/xiaomage234/aggbug/373977.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xiaomage234/" target="_blank">马?/a> 2012-04-12 16:01 <a href="http://www.aygfsteel.com/xiaomage234/archive/2012/04/12/373977.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>升?Mac OS X Lion 之后你应该知道的九g事儿http://www.aygfsteel.com/xiaomage234/archive/2012/02/15/370011.html马?/dc:creator>马?/author>Wed, 15 Feb 2012 03:30:00 GMThttp://www.aygfsteel.com/xiaomage234/archive/2012/02/15/370011.htmlhttp://www.aygfsteel.com/xiaomage234/comments/370011.htmlhttp://www.aygfsteel.com/xiaomage234/archive/2012/02/15/370011.html#Feedback0http://www.aygfsteel.com/xiaomage234/comments/commentRss/370011.htmlhttp://www.aygfsteel.com/xiaomage234/services/trackbacks/370011.html22 JUL 2011 BY  IN 技?amp;教程

雄狮已经出笼Q想必绝大部?Mac 用户都已l升U到 Lion pȝ了,虽然用户以及各大媒体都对q款操作pȝ的评价很高,但不可能做到100Q完,臛_不可能做到对每一个h来说都很完美Q难免会有一些习惯性问题和自己不了解的功能。TechCrunch ?GREG KUMPARAK 同学今天l我?a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-style: inherit; font-family: inherit; vertical-align: baseline; text-decoration: none; color: #3399cc; ">整理?/a>Mac OS X Lion 中的九个你应该知道的东西Q这里分享给大家Q?/p>

刚升U完pȝ的几个小时很慢,q是正常?/h4>

好多人都在反应这个问题,说刚升完系l之后的几个时卡的不行Q而且发热也很严重Q神奇的是过几个时之后自己好了。吭Q你说这是ؓ什么呢Q原来,Lion W一ơ启动之后就会自己重新烦引你盘上的数据Q以方便你以后在 Spotlight 里快速搜索。由于徏立烦引这工作很耗资源,所以你会感觉又慢又热?/p>

大家不妨升?Lion 之后出M息一会儿Q呼吸呼吸新鲜空气?/p>

?#8220;预览”中给 PDF 文档d亲手写的{֐

q个功能真是帅的一塌糊涂,?PDF 上竟然可以加上自׃手写的签名,对于每天都要{־多字的领导来说非常有用。用方法很单:

随便打开一?PDF 文档Q用预览打开Q默认)Q点?#8220;昄注解工具?#8221;昄注解工具? style=按钮Q然后点?#8220;{֐”{֐按钮Q在下拉菜单中选择 创徏来自“内徏 iSight”的签名,之后你会发现摄像头已l开始拍你了。现在,你的签名写在一张白U怸Q对着摄像_你会从右边看到摄像头自动识别你的{֐Q完成后?#8220;接受”可以了?/p>

要在 PDF 里插入签名的时候直接点?#8220;{֐”按钮Q然后用鼠标选择你要插入的位|即可?/p>

鼠标/触摸板滚动方向是反的Q如果不适应p整一下吧

q一Ҏ们在?a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-style: inherit; font-family: inherit; vertical-align: baseline; text-decoration: none; color: #3399cc; ">解决 Lion pȝ中鼠?触摸板反向滚动的问题》一文中已经说过了,׃多说了,其实Ҏq个没反Q只是咱们习惯用“反向”滚动了,Lion 中的滚动方向才是真正?#8220;自然”滚动方向呢,?iOS 里用手触摸的滚动方向一栗?/p>

正在q行中的应用E序下面的白Ҏ么没了Q?/h4>

使用之前 Mac OS X pȝ的同学都知道 Dock 栏的应用E序中,如果是正在运行的应用E序Q那么它下面会有一个白点,其实升?Lion 之后也有。但有些同学发现没有q个白点了,马情况呢?因ؓ——你是全新安装?LionQ或者说是新买的一台直接预装了 Lion 的电脑,比如最新的 Macbook Air 以及 Mac MiniQ,而不是从10.6.8升的?/p>

没有q个白点很不习惯Q因为^时我们能够在 Dock 栏很方便看到有哪些程序在q行Q现在不行了。那p己动手把“白点”昄打开吧:pȝ偏好讄——Dock——昄已打开的应用程序指C灯?/p>

记得升软g

虽然 Lion pȝ是最新的Q但你还是应该检查一下是否有其他应用E序更新Q比如最q?iTunes、iLife、iWOrk {都有专门针?Mac OS X Lion 的更斎ͼ所以装完系l之后还是记的点一下左上角的W号——软g更新Q检查看看有没有需要更新的应用?/p>

?Mission Control 中关?Dashboard

Lion ?Mission Control 是一个很的功能Q但是每ơ打开 Mission Control 左上角都昄的是 DashboardQ用双指切换应用程序的时候,切换到最左边也会昄 DashboardQ也是?Dashboard 是占用一个单?Space 的,?Dashboard 上的那些工具其实ƈ不实用,不实用的东西我们当然要干掉它?/p>

Ҏ很简单:pȝ偏好讄——Mission Control——L“?Dashboard 昄为空?#8221;前面的复选框?/p>

?Filevault 加密你的文g

Mac 很早之前已l有?Filevault q一实时盘加密工具Q但很不好用Q稍微一有问题你的所有数据就没了。但?Lion 中这一功能得到了完完全全的重新开发,基本上除了名字还和以前一样之外,功能、稳定性、速度、安全性等斚w都比以前好的不是一点半点,如果你对数据的保密要求非帔R的话Q再l?Filevault 一ơ机会吧?/p>

pȝ偏好讄——安全与隐U?#8212;—FilevaultQ你懂的?/p>

几个新手?/h4>

  • 在页面之间切换(Safari中的前进后退Q:双指左右滑动Q?/li>
  • 在全屏应?桌面之间切换Q三指左x动;
  • 讉K Mission ControlQ大拇指、食指、中指、无名指自然弯曲攑֜触摸板上往上滑动;
  • 昄 LaunchpadQ大拇指、食指、中指、无名指自然弯曲攑֜触摸板上再ƈ拢;
  • 昄桌面Q大拇指、食指、中指、无名指自然弯曲攑֜触摸板上再张开Q?/li>

大家可以直接打开“pȝ偏好讄”——触摸?鼠标学习q些新手势,或者修Ҏ势的定义?/p>

关闭自动U正

?iOS 上借鉴q来的一个功能,虽然理念很好Q但仍然不好用,而且׃都不是三岁小孩了Q输错的情况q是很少出现Q中文错别字又纠正不了)Q所以还是关了吧Q系l偏好设|?#8212;—语言与文?#8212;—文本Q去?#8220;自动U正拼写”前面的复选框?/p>

怿你掌握以?点之后,Mac OS X Lion 在你手中׃非常听话了,如果你还有什么可以分享给我们的,可以在文章评论区里脓出来?/p>



]]>
NPAPI开发详解,Windows?/title><link>http://www.aygfsteel.com/xiaomage234/archive/2011/08/03/355655.html</link><dc:creator>马?/dc:creator><author>马?/author><pubDate>Wed, 03 Aug 2011 04:01:00 GMT</pubDate><guid>http://www.aygfsteel.com/xiaomage234/archive/2011/08/03/355655.html</guid><wfw:comment>http://www.aygfsteel.com/xiaomage234/comments/355655.html</wfw:comment><comments>http://www.aygfsteel.com/xiaomage234/archive/2011/08/03/355655.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xiaomage234/comments/commentRss/355655.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xiaomage234/services/trackbacks/355655.html</trackback:ping><description><![CDATA[     摘要: 1. 准备工作开发工h例用的是visual studio 2008 英文版,下图是关于信?nbsp;Windows SDK本例使用Windows7操作pȝ q里下蝲SDKNPAPISDK本例使用的是Firefox4.0.1提供的SDK。首先,从这里下载mozilla源码。然后,解压firefox-4.0.1.source.tar.bz2文g。将 \firefox-4.0.1.sou...  <a href='http://www.aygfsteel.com/xiaomage234/archive/2011/08/03/355655.html'>阅读全文</a><img src ="http://www.aygfsteel.com/xiaomage234/aggbug/355655.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xiaomage234/" target="_blank">马?/a> 2011-08-03 12:01 <a href="http://www.aygfsteel.com/xiaomage234/archive/2011/08/03/355655.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>cygwin安装使用l验: 在Windows下用命令行之一http://www.aygfsteel.com/xiaomage234/archive/2011/07/29/355350.html马?/dc:creator>马?/author>Fri, 29 Jul 2011 09:33:00 GMThttp://www.aygfsteel.com/xiaomage234/archive/2011/07/29/355350.htmlhttp://www.aygfsteel.com/xiaomage234/comments/355350.htmlhttp://www.aygfsteel.com/xiaomage234/archive/2011/07/29/355350.html#Feedback0http://www.aygfsteel.com/xiaomage234/comments/commentRss/355350.htmlhttp://www.aygfsteel.com/xiaomage234/services/trackbacks/355350.html[目录] cygwin安装使用ȝ.txt (created by TxtBrowser)
  content
    1. 什么是Cygwin?
    2. 什么不是Cygwin?
    3. Cygwin的下载与安装
    4. cygwin下的一些应?br style="line-height: 22px; " />    .   4.1 默认的应?-也是我选择cygwin的原?br style="line-height: 22px; " />    .   4.2 可以自己安装一些好玩的东东
    .   4.3 有一些应用需要额外的配置
    .       4.3.1 ssh服务在cygwin上架设指?br style="line-height: 22px; " />    5. cygwin的一些问题及解决
    .   5.1 如何改变home目录
    .   5.2 cygwin昄中文问题
    .   5.3 cygwin下中文中Cؕ码问?br style="line-height: 22px; " />  figures
    figure 1. patch for mplayer on cygwin

对于留恋Linux命o行的用户, 对于那些不想在你的Windowspȝ上再安装一个Linux, 或?br style="line-height: 22px; " />安装虚拟? 再在虚拟Z安装Linux的用h? Cygwin应该是一个很好的选择. cygwin
可以模拟Linux的工作环? 命o, 工作方式都跟 Linux一?

Windows的命令行的确是不好用, cygwin除了可以执行Linux命o? q可以直接调?br style="line-height: 22px; " />Windows的命令行, 不同的是界面更加友好. 如果再配合其它Y?如console2), 基本上可
以做到类似Linux?gnome-terminal的多tab?

所有的试验都是在cygwin1.5上做? cygwin1.7管发布很久? 但是个h感觉q有很多
bug, 所以我在公叔R用cygwin1.5, 回到安用cygwin1.7, q是个h的感? 呵呵.

1. 什么是Cygwin?

Cygwin是一个在windowsq_上运行的Linux模拟环境, 是Cygnus solutions公司开发的?br style="line-height: 22px; " />pY?该公司开发了很多好东? 著名的还有eCos, 不过现已被Redhat收购). 它对于学
习Unix/linux操作环境, 或者从unix到windows的应用程序移? 或者进行某些特D的开?br style="line-height: 22px; " />工作, 其是用gnu工具集在windows上进行嵌入式pȝ开? 非常有用. [1]

Cygwin是一个Windows上的Linux模拟环境, 它包括两个部分:

    * 一个作为Linux API仿真层的DLL(Cygwin.dll), 它提供稳定的Linux API功能. 
    * 提供看v来且使用h象Linux的工具集. 

2. 什么不是Cygwin?

Cygwin不是一U在Windows下运行Linux应用E序的方? 如果要做到这一? 你必重?br style="line-height: 22px; " />在Windows上编译你的源E序. 

3. Cygwin的下载与安装

首先你必dhttp://www.cygwin.com先下载一个安装向导文?setup.exe, 然后q行
setup.exe, 依次会出C面的对话?

    (1)选择安装方式(选择Download Without Installing)
    (2)选择本地存储路径
    (3)选择q接方式
    (4)选择下蝲站点(推荐两个: http://mirrors.kernel.org, ftp.ntu.edu.tw)
    (5)选择下蝲包的内容: 一共有四类. default只下载最安装包, Install则下载所?br style="line-height: 22px; " />    的包, ?.7版本里, Reinstall在下载的时候好像没有什么用Q不用? Uninstall
    是删除安装包? 没有试过. 至于H口剙那些“Keep”?#8220;Prev”?#8220;Curr”?#8220;
    Exp”{等选项 , 只是用来改变当前树结构的昄方式? 对下载没有什么媄? ?br style="line-height: 22px; " />    户可以用默认?#8220;Exp”. 
    (6)开始下?br style="line-height: 22px; " />
如果用户的运气够好, 也许能够一ơ性的下蝲成功. 若真能这? 恭喜恭喜Q但如果?br style="line-height: 22px; " />和我一样不q? 下到一半网l断?怎么办?N要我全部重新来一遍?q运的是,Cygwin
的安装向导程序支持断点箋传功? 你可以按照上面的步骤再次q行setup.exe, 把上面的
骤再执行一遍就行了, cygwin会记住上ơ下载的东东?适用于cygwin1.7, 对于
cygwin1.5, 貌似断点下蝲的第5步要选择Reinstall).

在用h定的本地存储路径? 安装向导E序会生成类DL一个目录: http%3a%2f
%2fmirrors.kernel.org%2fsources.redhat.com%2fcygwin, q就是你下蝲文g的真正所?br style="line-height: 22px; " />目录. q会生成两个日志文gQsetup.log和setup.log.full,  用户感兴的z? 可以?br style="line-height: 22px; " />开来看? 对了解Cygwin的下载机制有不少帮助. 

至于如何安装, 其实是再运行一ơsetup.exe, 不同的是, 在上q的W?步里选择
Install from local, 在第5步里, 四个选项有不同的含义, Install代表安装而不是下?br style="line-height: 22px; " />, Reinstall代表重新安装而不是重C? 用户可以在这里选择要安装的? 不过我还?br style="line-height: 22px; " />选择安装所有的E序? 免的以后ȝ.

4. cygwin下的一些应?/strong>

4.1 默认的应?-也是我选择cygwin的原?/strong>

之所以安装cygwin, 是因Z惯于linux下的一些应? 在Windows上没? 或者找不到?br style="line-height: 22px; " />适的代替? 所以在我的日常应用? 基本上cygwin被当成是一台只有命令行的Linux操作
pȝ使用. 而且因ؓq行在Windows? 所以有时候少了和Windows通讯的烦?

     * Gcc, Makefie, gdb: q是最初接触cygwin的原? 很多公司在Windows上编?br style="line-height: 22px; " />    Linux 的东? 没有q个的确不行, 后来l常自己写一些验证性质的小E序, ?br style="line-height: 22px; " />    用这?
    * Vim: vim提供了windows版本, 但是有时候还是习惯用命令行版的Vim(不是
    gvim), 管windows版本的gvim用的也很?
    * ls: 管Windows提供了类似的命odir, 但是感觉q是ls信息Z惯和强大.
    * telnet, ssh: 很多Z用secuCRTd讑֤, 个h感觉secuCRT有一功能挺?br style="line-height: 22px; " />    ? 那就是记录log功能, 其它的挺q, 比不了cygwin. 再插上一? 用cygwin
    telnet d bbsq是比较好? 但是secuCRT和putty昄中文都会有问? ?br style="line-height: 22px; " />    用过 CTerm以及 XTerm之类的bbsl端, 但是我发现cgywin能实现基本它们声U的
    大部分功?
    * ftp, sftp, lftp, tftp{? q个也有专门的Y件来实现, 好用的如FileZilla
    FTP server和client? 但是炚w标点的我手疼, q是习惯命o? 而且最q研
    I了一些脚? 对于l常到某个ftp上存取文件用一个命令就可以实现, 不用?br style="line-height: 22px; " />    d, 敲密? q入到指定\? 上传下蝲? q是蛮方便的.
    * cvs: 有Windows版本的cvs工具wincvs, 貌似最初我用过好几q? 但是现在一?br style="line-height: 22px; " />    命op搞定的事情不愿意再开一个Y件再点击好多ơ鼠标了.
    * diff和patch: l常写代码和写文章的人用的着. Windows上暂时没有发现替?br style="line-height: 22px; " />    ?
    * 阅读一些命令的man page, 如man strcpy.
    * 其它常用的Linux命o, 如rm, ping, tar, gzip, cat, echo{?
    * Linux的重定向命o, 用过的h知道, 有时候这个还是很好用? 呵呵

4.2 可以自己安装一些好玩的东东

上面的应用都是cygwin自带? 装上p? 事实上如果你的cygwin是完全安装的? ?br style="line-height: 22px; " />对编E小有了解的? q可以自q译一些好玩的东东, 下面是我实验q可以用的:

    * U文本网|览器(lynx, w3m或者elinks), 在命令行里浏览网?
    * sdcv: 在命令行里查字典, q个没有人移植到Windows?
    * asterisk: 一个众人皆知的voip server(q个需要修改的地方很多).
    * mplayer: 在命令行里听音乐, 貌似有h开发了一个叫cmmusic的东? 可以?br style="line-height: 22px; " />    步显C歌? ~译的时候cwygin存在一个叫llrint的问? 如果遇到q个问题
    (undefined reference to `_llrint'), 下面?patch可以解决q个问题:

|
|===================================================================
|--- ffmpeg/libavcodec/i386/mathops.h   (revision 6329)
|+++ ffmpeg/libavcodec/i386/mathops.h   (working copy)
|@@ -37,3 +37,13 @@
|  asm ("imull %2\n\t" : "=A"(rt) : "a" (ra), "g" (rb));\
|  rt; })
|
|+#ifndef llrint
|+inline long long int llrint (double x)
|+{
|+    long long int llrintres;
|+    asm
|+    ("fistpll %0"
|+    : "=m" (llrintres) : "t" (x) : "st");
|+    return llrintres;
|+}
|+#endif
    figure 1. patch for mplayer on cygwin

4.3 有一些应用需要额外的配置

q有一些应? 用到的时候需要一些些额外的配|? 一qȝ一?

4.3.1 ssh服务在cygwin上架设指?/strong>

sshd服务在cygwin上默认是不开启的, 可能是出于安全的需? 但是有些服务可能需?br style="line-height: 22px; " />cygwin作ؓ一个sshd服务? q时你需要手动打开sshd服务.[4]

1) 先确认一下cygrunsrv.exe 已经安装. 

    whereis cygrunsrv

2) 生成ssh_config文g

q时候ƈ不能起动sshd服务? 先运行ssh-host-config 会提CZ一些信? 照着做就?br style="line-height: 22px; " />? 多数是yes, 在选择是否加蝲为service的时候小心一? q里的service是指windows
的service, 即cygwin不启? sshd也会在开机的时候启动v?

3) 启动或停止sshd

    net start sshd (cygrunsrv -S sshd)
    net stop sshd

4) 实施q程

打开cygwin控制? 输入ssh-host-config, 一路yes, 提示CYGWIN值时, 输入netsec tty.
启动sshd服务? net start sshd ?cygrunsrv --start sshd; 停止sshd服务?net
stop sshd ?cygrunsrv --stop sshd


5. cygwin的一些问题及解决

5.1 如何改变home目录

如果要改变home目录则要~辑cygwin.bat, 具体如下Q在bash命o之前加入set HOME=<?br style="line-height: 22px; " />L?gt;, 比如:

set HOME=/home/g

此用L录设|在/home/g. 

5.2 cygwin昄中文问题

/etc/skel/.bashrc
让bash命o行可以输入汉? ~辑~/.inputrc, dQ?br style="line-height: 22px; " />
    set meta-flag on
    set convert-meta off
    set input-meta on
    set output-meta on

让ls命o昄汉字, 在~\.bashrc中加入:

    export LESSCHARSET=latin1

让ls命o昄汉字文g和目录名, 在~\.bashrc中加入:

    alias ls='ls -hF --show-control-chars --file-type'

一般的HOME目录下第一ơ用的时候没?inputrc?bashrc文g? 你可以自己新Z?br style="line-height: 22px; " />, 也可以从/etc/skel目录下拷׃个现成的, E加改动可以了.

5.3 cygwin下中文中Cؕ码问?/strong>

在cygwin下用make~译E序, 往往会出Cؕ? q主要是因ؓcygwin对中文的支持不是?br style="line-height: 22px; " />理想引v? 解决的办法是环境变量LANG设成UTF-8, 暂时不用中文, 在~/.bashrc文g
中加入下面的一句话:

    export LANG=UTF-8

[参考资料]:

[1]Cygwin User's Guide, cygwin官方|站,
http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html
[2] 大冬瓜的博客, Cygwin安装图记, http://lostu.blogbus.com/logs/10765519.html
[3] OoNiceDream的博? 如何配置cygwin,
http://oonicedream.itpub.net/post/36905/457409
[4] Cygwin上的ssh服务的putty自动d问题, http://markli.javaeye.com/blog/39661
[5] Cygwin上的ssh服务的putty自动d问题,
http://hi.baidu.com/%BB%D4%B8%E7/blog/item/51a7bf3ef17f1eff828b13aa.html
[6] cygwin & putty, http://blog.chinaunix.net/u/31756/showart_416440.html


]]>
PHPUnit和Seleniumhttp://www.aygfsteel.com/xiaomage234/archive/2011/05/25/350990.html马?/dc:creator>马?/author>Wed, 25 May 2011 04:14:00 GMThttp://www.aygfsteel.com/xiaomage234/archive/2011/05/25/350990.htmlhttp://www.aygfsteel.com/xiaomage234/comments/350990.htmlhttp://www.aygfsteel.com/xiaomage234/archive/2011/05/25/350990.html#Feedback0http://www.aygfsteel.com/xiaomage234/comments/commentRss/350990.htmlhttp://www.aygfsteel.com/xiaomage234/services/trackbacks/350990.html

Selenium RC

Selenium RC是一ƾ测试工P允许你ؓweb应用~写自动化的用户接口试Q支持Q何程序设计语a、Q何HTTP站点以及ML览器。它使用Selenium CoreQ这是个利用JavaScript执行自动览器Q务的库。Selenium试直接q行于浏览器中,像真实做的那样。这些测试既可用?em>验收试Q通过在集成系l上执行更高U的试而不是只独立地测试系l的各个单元Q,又可用于览器兼Ҏ测?/em>Q通过试不同操作pȝ和浏览器上的web应用Q?/p>

我看看下Selenium RC是如何安装的Q?/p>

  1. 下蝲一?a target="_top" style="text-decoration: underline; color: #0044b6; ">Selenium RC分发包存档?/li>
  2. 分发包存档ƈ拯server/selenium-server.jar?code>/usr/local/binQ例如)?/li>
  3. 通过q行java -jar /usr/local/bin/selenium-server.jar启动Selenium RC服务器?/li>

现在我们可以利用它的客户/服务器协议向Selenium RC服务器发送命令了?/p>

PHPUnit_Extensions_SeleniumTestCase

PHPUnit_Extensions_SeleniumTestCase试用例扩展同Selenium RC通话的客?服务器协议实Cؓ专门用于web试的断aҎ?/p>

范例 19.1昄如何试http://www.example.com/站点?code><title>元素的内宏V?/p>

范例 19.1: PHPUnit_Extensions_SeleniumTestCase使用举例

<?php
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
 
class WebTest extends PHPUnit_Extensions_SeleniumTestCase
{
    protected function setUp()
    {
        $this->setBrowser('*firefox /usr/lib/firefox/firefox-bin');
        $this->setBrowserUrl('http://www.example.com/');
    }
 
    public function testTitle()
    {
        $this->open('http://www.example.com/');
        $this->assertTitleEquals('Example Web Page');
    }
}
?>

不同?code>PHPUnit_Framework_TestCasec,扩展?code>PHPUnit_Extensions_SeleniumTestCase的测试用例类必须提供setUp()Ҏ。该Ҏ用于配置Selenium RC会话。可用于此的Ҏ列表?a href="file:///F:/data2/PHPUnit_Pocket_Guide_-_v32/index_cn.html#selenium.seleniumtestcase.tables.seleniumrc-api.setup" title="Table 19.1. Selenium RC API: Setup" style="text-decoration: underline; color: #0044b6; ">?19.1?/p>

?19.1. Selenium RC APIQ装?/strong>

Ҏ含义
void setBrowser(string $browser)Selenium RC服务器用的览器?/td>
void setBrowserUrl(string $browserUrl)讄用于试的基址URL?/td>
void setHost(string $host)讄q接到Selenium RC服务器的L名?/td>
void setPort(int $port)讄q接到Selenium RC服务器的端口受?/td>
void setTimeout(int $timeout)讄q接到Selenium RC服务器的时旉?/td>
void setSleep(int $seconds)讄Selenium RC客户端向Selenium RC服务器发送动作指令之间睡眠的U数?/td>

你也可以使用一l浏览器q行每一个测试:在你的测试用例类中声明一个名?code>$browsers?code>public static数组代替使用setBrowser()讄一个浏览器。该数组中的每一w描述一个浏览器配置。这些浏览器中的每一个都能被不同的Selenium RC服务器接待:

范例 19.2: 讄多浏览器配置

<?php
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
 
class WebTest extends PHPUnit_Extensions_SeleniumTestCase
{
    public static $browsers = array(
      array(
        'name'    => 'Firefox on Linux',
        'browser' => '*firefox /usr/lib/firefox/firefox-bin',
        'host'    => 'my.linux.box',
        'port'    => 4444,
        'timeout' => 30000,
      ),
      array(
        'name'    => 'Safari on MacOS X',
        'browser' => '*safari',
        'host'    => 'my.macosx.box',
        'port'    => 4444,
        'timeout' => 30000,
      ),
      array(
        'name'    => 'Safari on Windows XP',
        'browser' => '*custom C:\Program Files\Safari\Safari.exe -url',
        'host'    => 'my.windowsxp.box',
        'port'    => 4444,
        'timeout' => 30000,
      ),
      array(
        'name'    => 'Internet Explorer on Windows XP',
        'browser' => '*iexplore',
        'host'    => 'my.windowsxp.box',
        'port'    => 4444,
        'timeout' => 30000,
      )
    );
 
    protected function setUp()
    {
        $this->setBrowserUrl('http://www.example.com/');
    }
 
    public function testTitle()
    {
        $this->open('http://www.example.com/');
        $this->assertTitleEquals('Example Web Page');
    }
}
?>

PHPUnit_Extensions_SeleniumTestCase能够攉试l由Seleniumq行时的代码覆盖率信息:

  1. PHPUnit/Extensions/SeleniumTestCase/phpunit_coverage.phpC的web服务器的文g根目录中?/li>
  2. 在你的web服务器的php.ini配置文g中,配置PHPUnit/Extensions/SeleniumTestCase/prepend.php?code>PHPUnit/Extensions/SeleniumTestCase/append.php分别作ؓauto_prepend_file?code>auto_append_file?/li>
  3. 在你的扩展了PHPUnit_Extensions_SeleniumTestCase的测试用例类中,使用
    protected $coverageScriptUrl = 'http://host/phpunit_coverage.php';
    配置用于phpunit_coverage.php脚本的URL?/li>

?19.2列出PHPUnit_Extensions_SeleniumTestCase提供的各U断aҎ?/p>

?19.2. 断言

断言含义
void assertAlertPresent()如果不存在警告(对话框)则报错?/td>
void assertNoAlertPresent()如果存在警告Q对话框Q则报错?/td>
void assertChecked(string $locator)如果$locator标识的元素未选中则报错?/td>
void assertNotChecked(string $locator)如果$locator标识的元素被选中则报错?/td>
void assertConfirmationPresent()如果不存在确认(对话框)则报错?/td>
void assertNoConfirmationPresent()如果存在认Q对话框Q则报错?/td>
void assertEditable(string $locator)如果$locator标识的元素不可编辑则报错?/td>
void assertNotEditable(string $locator)如果$locator标识的元素可~辑则报错?/td>
void assertElementValueEquals(string $locator, string $text)如果$locator标识的元素的g{于l定?code>$text则报错?/td>
void assertElementValueNotEquals(string $locator, string $text)如果$locator标识的元素的值等于给定的$text则报错?/td>
void assertElementContainsText(string $locator, string $text)如果$locator标识的元素不含给定的$text则报错?/td>
void assertElementNotContainsText(string $locator, string $text)如果$locator标识的元素包含给定的$text则报错?/td>
void assertElementPresent(string $locator)如果$locator标识的元素不存在则报错?/td>
void assertElementNotPresent(string $locator)如果$locator标识的元素存在则报错?/td>
void assertLocationEquals(string $location)如果当前位置QlocationQ不{于l定?code>$location则报错?/td>
void assertLocationNotEquals(string $location)如果当前位置QlocationQ等于给定的$location则报错?/td>
void assertPromptPresent()如果不存在提C(对话框)则报错?/td>
void assertNoPromptPresent()如果存在提示Q对话框Q则报错?/td>
void assertSelectHasOption(string $selectLocator, string $option)如果l定的选项不可用则报错?/td>
void assertSelectNotHasOption(string $selectLocator, string $option)如果l定的选项可用则报错?/td>
void assertSelected($selectLocator, $option)如果l定的标{未选中则报错?/td>
void assertNotSelected($selectLocator, $option)如果l定的标{被选中则报错?/td>
void assertIsSelected(string $selectLocator, string $value)如果l定的值未选中则报错?/td>
void assertIsNotSelected(string $selectLocator, string $value)如果l定的D选中则报错?/td>
void assertSomethingSelected(string $selectLocator)如果$selectLocator标识的选项未选中则报错?/td>
void assertNothingSelected(string $selectLocator)如果$selectLocator标识的选项被选中则报错?/td>
void assertTextPresent(string $pattern)如果l定?code>$pattern不存在则报错?/td>
void assertTextNotPresent(string $pattern)如果l定?code>$pattern存在则报错?/td>
void assertTitleEquals(string $title)如果当前标题不等于给定的$title则报错?/td>
void assertTitleNotEquals(string $title)如果当前标题{于l定?code>$title则报错?/td>
void assertVisible(string $locator)如果$locator标识的元素不可见则报错?/td>
void assertNotVisible(string $locator)如果$locator标识的元素可见则报错?/td>

?19.3PHPUnit_Extensions_SeleniumTestCase的两个模板方法:

?19.3. 模板Ҏ

Ҏ含义
void defaultAssertions()重写以执行一个测试用例中的所有测试共享的断言。该Ҏ在发送给Selenium RC服务器的每个命o之后被调用?/td>
void sharedAssertions()重写以执行一个测试用例中的所有测试共享的断言。该Ҏ在一个测试执行结束之前被调用?/td>

h?a target="_top" style="text-decoration: underline; color: #0044b6; ">Selenium Core的文?/a>获得关于可用的命令以及如何用的参考?/p>

利用runSelenese($filename)ҎQ你也能从它的Selenese/HTML规范q行一个Selenium试。此外,利用静态属?code>$seleneseDirectoryQ你能从一个包含Selenese/HTML文g的目录自动地创徏试对象。指定的目录被递归地搜索预期包含Selenese/HTML?code>.htm文g?nbsp;范例 19.3昄一个例子?/p>

范例 19.3: 使用Selenese/HTML文g的目录作为测?/strong>

<?php
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
 
class SeleneseTests extends PHPUnit_Extensions_SeleniumTestCase
{
    public static $seleneseDirectory = '/path/to/files';
}
?>


]]>
解决修复QIE 7.0讉KHTTPS|页昄-此网站出L安全证书已过期或q未生效http://www.aygfsteel.com/xiaomage234/archive/2011/05/24/350941.html马?/dc:creator>马?/author>Tue, 24 May 2011 09:04:00 GMThttp://www.aygfsteel.com/xiaomage234/archive/2011/05/24/350941.htmlhttp://www.aygfsteel.com/xiaomage234/comments/350941.htmlhttp://www.aygfsteel.com/xiaomage234/archive/2011/05/24/350941.html#Feedback0http://www.aygfsteel.com/xiaomage234/comments/commentRss/350941.htmlhttp://www.aygfsteel.com/xiaomage234/services/trackbacks/350941.htmlq个问题一般是出现?font color="#ff0000">Internetr Explorer 7.0上面Q?font color="#000000">q个是IE7阅览器提C,IE7?/font>览器是伴随着Vista操作pȝ而诞生的Q不q微软也发布了针对XPpȝ的IE7览器版本。不q不是Vistapȝq是XPpȝ?font color="#000000">的IE7Q由于它的安全防范意识有很大提高Q对于非法站点和安全加密站点的过滤都比较苛刻Q所以在IE7下访问httpsq种通过SSL协议加密的网站都会出现故障。尤其ؓ人熟知的在打开淘宝?font color="#0000ff">支付?/font>|页的时候经怼出现QHttps密码面也会有这个提C?/font>

       最Ҏ被一些h搞错地方Q就是时间设|问题,所以碰到这U情况,请首先检查你的电?font color="#3366ff">旉讄是否正确Q如果不正确导致助理从你的电脑上取到的时候,已经不在服务器发送给助理的有效时间范围内Q请你核对你的时间设|是否正。将“自动与internet旉服务器同?/font>”取消后问题消失。如果还是不行,L下面?/font>

========================================================================

 

一、XPpȝ下IE7.0 讉Khttps站点故障排除Q?/strong>

         默认情况QXPpȝ下通过XP版本的IE 7 览器,讉Khttps加密的站炚w会出现这个提C,q个是IE7阅览器的提示Q必dơ点“l箋览此网站(不推荐)”才能查看面信息?/font>每次讉KHttps?font color="#000000">炚w需要重复点击,在操作上带来很大的麻烦。下面我们就通过安装证书步骤来解x问题?

        W一步:当我们用IE7览Https站点后会在地址栏右边出C个红色的“证书错误”的提C,我们点该U色按钮Q然后选择“查看证书”?

W二步:在打开?#8220;查看证书”H口中的“常规”标签中点右下角的“安装证书”按钮?

W三步:出现“证书导入向导”后点“下一?/font>”按钮l箋?/font>

W四步:选择证书存储的系l区域,通过“”按钮讄证书保存ؓ“受信ȝ根证书颁发机?/font>”?

W五步:之后在安全警告窗口中选择“?/font>”按钮来安装该证书?/font>

W六步:讄完毕后我们再ơ访问该https站点׃会出CQ何问题,也不会再出现q个错误提示了?/font>

========================================================================

 

 

  二、Vistapȝ下IE7.0 讉Khttps站点故障排除Q?/strong>

  在Vistapȝ下用IE7览器访问https站点也会出现q个错误提示Q但是他的解x骤却和XP下IE7有很大区别。这是因为在Vistapȝ中IE7讉Khttps证书查看里没有安装的提示Q错误信息提C?#8220;׃CA根证书不在受信Q的根证书颁发机构存储ZQ所以他不受信Q?/font>

  那么该如何解军_Q我是至今还没有发现可以通过调整IE7览器的讄来解x问题Q不q可以通过证书导入来解冟?/font>

  W一步:首先打开IE7览器,然后通过“工具->internet选项”打开属性设|窗口,q择“内容”标签Q直接点“证书”标签?/font>

  W二步:选择要安装的证书cd时点“受信ȝ根证书颁发机?/font>”Q接下来点左下角?#8220;导入”按钮?

  W三步:q时需要我们在“要导入的文g”讄H口中找到该|站的证书文件。至于这个证书文件如何获得,W者的Ҏ是通过在别的浏览器Q例如IE 6或XPpȝIE 7Q中该|站对应的证书以文g的Ş式导出即可,接下来回到Vistapȝ中导入此文g卛_?/font>

  W四步:在证书存储设|处和上面介l的Ҏ一P选择所有的证书攑օ下列存储——受信ȝ根证书颁发机构?/font>

  W五步:在安装该证书的窗口中?#8220;?/font>”按钮卛_?/font>

  W六步:所有工作完成后会出现导入成功的提示Q以后我们再讉Khttps加密的站点就不会出现上面的错误提CZ?/font>



]]>
如何让你的Apache支持httpshttp://www.aygfsteel.com/xiaomage234/archive/2011/05/20/350663.html马?/dc:creator>马?/author>Fri, 20 May 2011 02:08:00 GMThttp://www.aygfsteel.com/xiaomage234/archive/2011/05/20/350663.htmlhttp://www.aygfsteel.com/xiaomage234/comments/350663.htmlhttp://www.aygfsteel.com/xiaomage234/archive/2011/05/20/350663.html#Feedback0http://www.aygfsteel.com/xiaomage234/comments/commentRss/350663.htmlhttp://www.aygfsteel.com/xiaomage234/services/trackbacks/350663.html

主要讲述在windows下apache配置SSL以实现http转换?a style="color: rgb(51,51,51); word-break: break-all; line-height: normal! important; text-decoration: underline" onclick="javascript:tagshow(event, 'https');" href="javascript:;" target="_self">https

SSL: SSl是ؓHttp传输提供安全的协议,通过证书认证来确保客L和网站服务器之间的数据是安全。也是说在SSL下http传输是安全的Q我们成为https.

q程Q?/p>

步骤一Q安装apache,使其支持SSL,q安装php
  
    1.安装配有SSL模块的apache,apache_2.2.8-win32-x86-openssl-0.9.8g
    2.配置apache以支持SSL:打开apache的配|文件conf/httpd.conf
        1)LoadModule ssl_module modules/mod_ssl.so
          Include conf/extra/httpd-ssl.conf
          L两行前面?
        2)注意修改httpd-ssl.conf 文g里的两个字段Q?br style="word-break: break-all; line-height: normal! important" />           SSLCertificateFile "C:/Apache2.2/conf/server.crt"
           SSLCertificateKeyFile "C:/Apache2.2/conf/server.key"
    3.安装php,整合apache和Php(?  //此步可以省略Q如果你不需要PHP的话?br style="word-break: break-all; line-height: normal! important" />           Z面你所生成的证书和密钥地址?/p>

步骤二:为网站服务器生成证书及私钥文?br style="word-break: break-all; line-height: normal! important" />       
      1. 生成服务器的U钥
         q入命o?
         D:\local\apache2\bin\openssl genrsa -out server.key 1024
         在当前目录下生成了一个server.key生成{v甌
      2. 生成{v甌
         D:\local\apache2\bin>openssl req -new –out server.csr -key server.key -config ..\conf\openssl.cnf
         此时生成{v文gserver.csr.

步骤三:通过CA为网站服务器{v证书
      
       1.生成CAU钥
         D:\local\apache2\bin\openssl genrsa  -out ca.key 1024
         多出ca.key文g
       2.利用CA的私钥生CA的自{v证书
         D:\local\apache2\bin\openssl req  -new -x509 -days 365 -key ca.key -out ca.crt  -config ..\conf\openssl.cnf
         此时需要输入一些信息,注意Common Name为服务器域名Q如果在本机Qؓ本机IP?br style="word-break: break-all; line-height: normal! important" />       3.CA为网站服务器{v证书
         D:\local\apache2\bin\openssl ca -in server.csr -out server.crt -cert ca.crt -keyfile ca.key -config ..\conf\openssl.cnf
但,此时会报错:
         于是在在当前目录创徏demoCAQ里面创Z下文Ӟindex.txt,serial内容?1Q?a style="color: rgb(51,51,51); word-break: break-all; line-height: normal! important; text-decoration: underline" onclick="javascript:tagshow(event, '%C6%E4%CB%FB');" href="javascript:;" target="_self">其他为空,以及文g夹newcert.再执行一遍,卛_生成server.crt文g

步骤四:然后?nbsp; server.crt,server.key复制到apache的conf文g夹下Q重启apache

步骤五:讉Khttp://localhostx持https
不过׃Q我们的CA不是q三方机构颁发的,而是我们自己颁发的,所以,IE讉K的时候,会显C,q个证书不是由Trused CA Authenticator颁发Q告诉我们可能有安全隐患



]]>
讄windows 注册表默认打开览?/title><link>http://www.aygfsteel.com/xiaomage234/archive/2011/05/14/350249.html</link><dc:creator>马?/dc:creator><author>马?/author><pubDate>Sat, 14 May 2011 14:01:00 GMT</pubDate><guid>http://www.aygfsteel.com/xiaomage234/archive/2011/05/14/350249.html</guid><wfw:comment>http://www.aygfsteel.com/xiaomage234/comments/350249.html</wfw:comment><comments>http://www.aygfsteel.com/xiaomage234/archive/2011/05/14/350249.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xiaomage234/comments/commentRss/350249.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xiaomage234/services/trackbacks/350249.html</trackback:ping><description><![CDATA[[HKEY_CLASSES_ROOT\Http\shell\open\command]<br /> @="\"D:\\Program Files\\GreenBrowser\\GreenBrowser.exe\" \"%1\"" <img src ="http://www.aygfsteel.com/xiaomage234/aggbug/350249.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xiaomage234/" target="_blank">马?/a> 2011-05-14 22:01 <a href="http://www.aygfsteel.com/xiaomage234/archive/2011/05/14/350249.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>右键菜单中添加“用C本打开”和“打开dos?/title><link>http://www.aygfsteel.com/xiaomage234/archive/2009/10/27/299875.html</link><dc:creator>马?/dc:creator><author>马?/author><pubDate>Tue, 27 Oct 2009 01:42:00 GMT</pubDate><guid>http://www.aygfsteel.com/xiaomage234/archive/2009/10/27/299875.html</guid><wfw:comment>http://www.aygfsteel.com/xiaomage234/comments/299875.html</wfw:comment><comments>http://www.aygfsteel.com/xiaomage234/archive/2009/10/27/299875.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xiaomage234/comments/commentRss/299875.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xiaomage234/services/trackbacks/299875.html</trackback:ping><description><![CDATA[<p>玩过一D|间电脑后Q体会到l常会用“C?#8221;打开多种cd未知文gQ以便查看编辑其中内宏V所以直接在右键菜单中添?#8220;用记事本打开”q一<br /> 功能是比较省事方便的。通过修改注册表可以实玎ͼ</p> <p>1、打开注册表,扑ֈ<br /> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell 主键(?Q如果没有新Z个)Q?br /> 2、单击shellq个主键Q在下再新徏一个名?notepad 的主键,在右面的H口中,把默认项的值改成:用记事本打开 或者其他你喜欢的字栗?br /> 3、再在notepad主键下新Z?command 主键。在右面的窗口中Q把默认的值改成:<br /> notepad %1 Q注意notepad?W号之间要空一|关闭注册表?br /> 现在在Q意一个文件上单击鼠标右键有“用记事本打开”q一功能了。经体验是一个很好的Ҏ。当然用其它软g也可dq一功能。(攉学习Q?/p> <p>另可以:打开注册表编辑器Q找C面的键|HKEY_CLASSES_ROOT\*Q接着新徏一个名?shell的子,接着再它的下Ҏ建名?#8220;Notepad”Q然后在右侧H口中将光认值改?#8220;使用C本打开”Q最后在“Notepad”下新徏名ؓ“command”的子,在右侧窗口中其值改为:notepad.exe %1可以了?/p> <p>保存一下内容ؓ*.regq行卛_!</p> <p>Windows Registry Editor Version 5.00<br /> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell]<br /> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\playboyjin]<br /> @="用记事本打开"<br /> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\playboyjin\command]<br /> @="notepad.exe \"%1\"" </p> <p>如何d鼠标右键DOS命o<br /> A:(1)打开注册表编辑器?(2)打开HKEY_LOCAL_MACHINE\Software\classes\directory\shell主键q中它。在右侧H口中新Z个项Q命名ؓCommandPromptQ然后把它的数值数据改为command?(3)在CommandPrompt下新Z个项Q命名ؓcommandQ改其数值数据ؓcmd /k cd %1Q退出OK了?(4)鼠标右键单击M文g夹,在弹出的菜单中,你就可以选择command命o了?/p> <p>B:保存下边的代码到一个记事本文gQƈ把扩展名改ؓ“.bat”Q执行一ơ这个文Ӟ以后没用了Q,找一个文件夹Q打开鼠标右键看看吧!</p> <p>reg add "HKCR\*\shell\ms-dos" /ve /d ms-dos /f<br /> reg add "HKCR\*\shell\ms-dos\command" /ve /d "cmd.exe /k cd %%1" /f<br /> reg add "HKCR\Folder\shell\ms-dos" /ve /d ms-dos /f<br /> reg add "HKCR\Folder\shell\ms-dos\command" /ve /d "cmd.exe /k cd %%1" /f </p> <p><br /> 本文来自CSDN博客Q{载请标明出处Qhttp://blog.csdn.net/bhsky/archive/2009/02/02/3858883.aspx</p> <img src ="http://www.aygfsteel.com/xiaomage234/aggbug/299875.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xiaomage234/" target="_blank">马?/a> 2009-10-27 09:42 <a href="http://www.aygfsteel.com/xiaomage234/archive/2009/10/27/299875.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>解决IE7自动打开http://runonce.msn.com/runonce3.aspxhttp://www.aygfsteel.com/xiaomage234/archive/2009/07/07/285783.html马?/dc:creator>马?/author>Tue, 07 Jul 2009 04:13:00 GMThttp://www.aygfsteel.com/xiaomage234/archive/2009/07/07/285783.htmlhttp://www.aygfsteel.com/xiaomage234/comments/285783.htmlhttp://www.aygfsteel.com/xiaomage234/archive/2009/07/07/285783.html#Feedback3http://www.aygfsteel.com/xiaomage234/comments/commentRss/285783.htmlhttp://www.aygfsteel.com/xiaomage234/services/trackbacks/285783.html
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]

RunOnceComplete=dword:00000001

RunOnceHasShown=dword:00000001
以上查找没有q个注册表信?你新建就可以?d上面q两个就可以修复?br />

]]>
Windows下BAT脚本实现自动修改hostshttp://www.aygfsteel.com/xiaomage234/archive/2008/12/15/246471.html马?/dc:creator>马?/author>Mon, 15 Dec 2008 10:22:00 GMThttp://www.aygfsteel.com/xiaomage234/archive/2008/12/15/246471.htmlhttp://www.aygfsteel.com/xiaomage234/comments/246471.htmlhttp://www.aygfsteel.com/xiaomage234/archive/2008/12/15/246471.html#Feedback3http://www.aygfsteel.com/xiaomage234/comments/commentRss/246471.htmlhttp://www.aygfsteel.com/xiaomage234/services/trackbacks/246471.html
代码:
@echo off
echo proj 本地试环境
echo.
c:
cd \
if not exist proj-test\con md proj-test
if exist proj-test\hosts.bak goto backup_exists
echo 正在创徏备䆾……
cd \windows\system32\drivers\etc
copy /y hosts \proj-test\hosts.bak > null
echo 完成Q?
echo.
goto backup_start
:backup_exists
echo 备䆾文g已经存在Q无需备䆾?
echo.
:backup_start
echo 正在写入试数据……
echo 127.0.0.1       localhost > hosts
echo 192.168.3.170   proj.com >> hosts
echo 192.168.3.170   www.proj.com >> hosts
echo 192.168.3.170   pics.proj.com >> hosts
echo 192.168.3.170   files.proj.com >> hosts
echo 完成Q?
echo.
echo 建立 proj 本地试环境完成。按L键退?#8230;…
pause > null
退出测试环境:
代码:
@echo off
echo proj 本地试环境
echo.
c:
cd \
if not exist proj-test\hosts.bak goto backup_not_exists
echo 正在q原备䆾……
copy /y \proj-test\hosts.bak \windows\system32\drivers\etc > null
cd \windows\system32\drivers\etc
if exist hosts del /q hosts
ren hosts.bak hosts
echo 完成Q?
echo.
echo 正在U除备䆾……
cd \
rmdir /s/q \proj-test\
echo 完成Q?
echo.
goto backup_done
:backup_not_exists
echo 备䆾文g不存在,无法恢复?
echo.
:backup_done
echo 退?proj 本地试环境完成。按L键退?#8230;…
pause > null


]]>
net命o[转自癑ֺ]http://www.aygfsteel.com/xiaomage234/archive/2008/10/15/234367.html马?/dc:creator>马?/author>Wed, 15 Oct 2008 01:48:00 GMThttp://www.aygfsteel.com/xiaomage234/archive/2008/10/15/234367.htmlhttp://www.aygfsteel.com/xiaomage234/comments/234367.htmlhttp://www.aygfsteel.com/xiaomage234/archive/2008/10/15/234367.html#Feedback0http://www.aygfsteel.com/xiaomage234/comments/commentRss/234367.htmlhttp://www.aygfsteel.com/xiaomage234/services/trackbacks/234367.html   需要注意的地方Q?
  1?虽然Windows 98QWindows NT/2000都内|了NET命o,但Windows98的NET命o和Windows NT/2000的NET命o有所不同。而且Windows 98的NET命o中有一些参C能在DOS-WIN中用,只能在纯DOS环境Q即Q开机时按F8选择命o行方式,或者通过开始菜?gt;关闭pȝ>重新启动计算机ƈ切换到MS-DOS方式Q中使用?.
  2?Windows98不提供NET命o在图形方式下的帮助,只能在命令行方式下输入NET /? | more 或NET HELP | more得到它的功能(COMMAND)列表Q?然后通过NET COMMAND /HELP | more或NET HELP COMMAND | more 或NET COMMAND/?命o得到相应功能的帮助信息?
  3?有一些命令是马上产生作用q永久保存的,使用的时候要慎重。ƈ且所有net命o接受选项/yes?no(可羃写ؓ/y?n)?y 选项向命令生的M交互式提C动回{??Q?/n 回答"?。例如,net stop server 通常提示您确认要停止Z"服务?服务的所有服务;?net stop server /y 对该提示自动回答"?Q然?服务?服务关闭?
  下文结合实例对NET命o的不同参数的基本应用做一些初步的介绍。希望能对大家学习net命o的用有所帮助?br />   一?net accounts
  功能Q将用户帐户数据库升Uƈ修改所有帐L密码和登录请求?
  格式Qnet accounts [/forcelogoff:{minutes | no}] [/minpwlen:length]
  [/maxpwage:{days|unlimited}][/minpwage:days] [/uniquepw:number] [/sync] [/domain]
  参数Q?
  Q?Q无Q即键入不带参数的net accountsQ命令显C密码、登录限制和域信息的当前配置?
  Q?Q?forcelogoff:{minutes | no}
  讄当用户帐h有效d旉到期时在l束用户与服务器的会话前要等待的分钟数。no 选项防止强制注销。默认设|是 no?br />   指定?/forcelogoff:minutes 选项后,pȝ在强制用L开|络?minutes 分钟前发送警告。如果Q何文件被打开Q系l将警告用户。如?minutes 于 2Q系l将警告用户立即从网l注销?
  Q?Q?minpwlen:length
  讄用户帐户密码的最字W数。范围是 0-127 个字W,默认?6 个字W?br />   实例:讄不少?10 个字W的用户密码
  net accounts /minpwlen:10
  Q?Q?maxpwage:{days | unlimited}
  讄用户帐户密码有效天数的最大倹{ 
  /maxpwage:unlimited 讄帐户密码永远有效?br />   /maxpwage 选项必须大于 /minpwageQ(也就是如果以前设|了/minpwlen:30Q那么days取值必d?0Q范围是 1-49,710 天(无限Q,默认?90 天?
  Q?Q?minpwage:days
  讄在用户可以更Ҏ密码前的最天数。数?0 讄无限短时间。范围是 0-49,710 天,默认值是 0 天?
  Q?Q?uniquepw:number
  要求用户不对 number ơ密码更攚w复相同的密码。范围是 0-24 ơ密码更改,默认值是 5 ơ密码更攏V?br />   实例:防止用户每少?天更改一ơ密码,强制用户?5天更改一ơ密码,q在d旉到期后用2分钟警告强制用户注销?br />   net accounts /forcelogoff:2 /minpwage:3 /maxpwage:15
  Q?Q?sync
  更新所有成员服务服务器的用户帐h据库。当在主域控制器上用时Q域中的所有备份域控制器同步。当在备份域控制器上使用Ӟ使备份域控制器只与主域控制器同步。该命o只适用?Windows NT/2000 Server 域成员计机?
  Q?Q?domain
  对当前域的主域控制器执行操作。否则,操作在本地计机上执行?br />   该参数只适用于属 Windows NT/2000 Server 域成员的 Windows 2000 Workstation / Professional 计算机。默认情况下QWindows NT/2000 Server 计算机在d控制器上执行操作?
  二?net computer
  功能Q从域数据库中添加或删除计算机,所有计机的添加和删除都会转发C域控制器?
  格式Qnet computer \\computername {/add | /del}
  参数Q?
  Q?Q\\computername
  指定要从域中d或删除的计算机名?
  Q?Q?add
  特定的计算机添加到域中?br />   实例Q将计算机bbd到登录的域中?br />   net computer \\bb /add
  Q?Q?del
  从域中删除指定的计算机?br />   实例Q将计算机bb从登录的域中删除?br />   net computer \\bb /del
  三?net config
  功能Q显C当前运行的可配|服务,或显Cƈ更改某项服务的设|。更改立即生效ƈ且是怹?
  格式Qnet config [service [options]
  参数Q?
  Q?Q无
  键入不带参数?net config 命o昄可配|服务的列表?
  Q?Qservice
  通过net config命oq行配置的服?server或workstation)
  Q?Qoptions
  服务的特定选项?
  四?net config server Q?只能在Windows NT/2000 中?Q?
  功能Q更改可配置"服务?服务参数。更改立即生效,q且怹保持。但是ƈ非所有的"服务?服务的参数都能?net config Server 命oq行更改Qnet config server 昄可包含其他信息,包括以下关于服务器的信息Q?br />   1Q服务器的计机名、描q注释和软g版本?br />   2Q网l描q?br />   3Q服务器的隐藏设|?br />   4Q可以用服务器的共享资源的最多用h?br />   5Q可以打开的服务器文g的最大数量?br />   6Q空闲会话时间设|?
  格式Qnet config server [/autodisconnect:time] [/srvcomment:"text "] [/hidden:{yes | no}]
  参数Q?
  Q?Q无
  键入 net config server 命o昄"服务?服务的当前配|?
  Q?Q?autodisconnect:time
  讄在断开q接前用户会话可以不zd的最大分钟数。可以指?1不断开q接。范围从-1?5535分钟Q默认值是15分钟?br />   实例Q在10分钟的非zd状态后断开用户q接?br />   net config server /autodisconnect:10
  Q?Q?srvcomment:"text"
  用net view命oQؓ在屏q上昄出来的服务器d注释。注释可以包含多?8个字W(24个汉字)。给文本加上引号?
  Q?Q?hidden:{yes | no}
  指定服务器的计算机名是否在服务器昄列表上显C。注意隐藏的服务器将不会改变服务器上的权限。默认设|是 no?br />   实例Q从可用服务器列表中隐藏服务器的计算机名?br />   net config server /hidden:yes
  五?net config workstation
  功能Q显C更改可配置工作站服务参数。更改立即生效,q且怹保持?br />   q所有的工作站服务参数都能?net config workstation 命oq行更改。其他参数可以在配置注册表时修改?
  格式Qnet config workstation [/charcount:bytes] [/chartime:msec] [/charwait:sec]
  参数Q?
  Q?Q无
  键入 net config workstation 命o昄本地计算机的当前配置?
  Q?Q?charcount:bytes
  指定在将数据发送到通讯讑֤之前Windows 攉的数据量。如果还讄?/chartime:msecQWindows 执行第一个满的
  选项。范围从0?65535字节Q默认值是16字节?
  Q?Q?chartime:msec
  讄 Windows在将数据发送到通讯讑֤前收集数据的毫秒数。如果还讄?/charcount:bytesQWindows 2000 执行第
  一个满的选项。范围从0?5535000毫秒Q默认是250毫秒?
  Q?Q?charwait:sec
  Windows{待通讯讑֤的秒数设|ؓ可用。范围从0?5535U,默认值是3600U?br />   实例Q要讄在将数据发送到最?000毫秒的通讯讑֤之前Windows{待?br />   net config workstation /chartime:1000
  六、Net Continue
  功能Q重新激zLL服务
  格式Qnet continue service
  参数
    service
    能够l箋q行的服务,包括Q?file server for macintoshQ该服务仅限?Windows NT Se
    rverQ? ftp publishing service, lpdsvc, net logon, network ddeQnetwork dde dsdm
    Qnt lm security support providerQremotebootQ该服务仅限?Windows NT ServerQ,
    remote access server, scheduleQserverQsimple tcp/ip services ?workstation
  七、Net File
  功能Q显C某服务器上所有打开的共享文件名及锁定文件数。该命o也可以关闭个别文件ƈ取消?
    仉定?
  格式Qnet file [id [/close]]
  参数
    Q?Q无
    键入不带参数?net file 可获得服务器上打开文g的列表?
    id
    文g标识受?
    Q?Q?close
    关闭打开的文件ƈ释放锁定记录。请从共享文件的服务器中键入该命令?
  八、Net Group
  功能Q在 Windows NT Server 域中d、显C或更改全局l。该命o仅在 Windows NT Server ?br />      中可用?
  格式Qnet group [groupname [/comment:"text "]] [/domain]
     net group groupname {/add [/comment:"text "] | /delete} [/domain]
     net group groupname username [ ...] {/add | /delete} [/domain]
  参数
    Q?Q无
    键入不带参数?net group 可以昄服务器名U及服务器的l名U?
    groupname
    要添加、扩展或删除的组。仅提供某个l名便可查看l中的用户列表?
    Q?Q?comment:"text "
    为新建组或现有组d注释。注释最多可以是 48 个字W,q用引号注释文字引住?
    Q?Q?domain
    在当前域的主域控制器中执行该操作Q否则在本地计算Z执行操作?
    该参C用于作ؓ Windows NT Server 域成员的 Windows NT Workstation 计算机。Windo
    ws NT Server 计算机默认ؓ在主域控制器中操作?
    username[ ...]
    列表昄要添加到l或从组中删除的一个或多个用户。用空格分隔多个用户名U项?
    Q?Q?add
    dl或在组中添加用户名。必M用该命o为添加到l中的用户徏立帐受?
    Q?Q?delete
    删除l或从组中删除用户名?
  九、Net Help
  功能Q提供网l命令列表及帮助主题Q或提供指定命o或主题的帮助。可用网l命令列?N 下面?br />      “命o参?#8221;?#8220;命o”H口内?br />   格式Qnet help [command]
     net command {/help | /?}
  参数
    Q?Q无
    键入不带参数?net help 昄能够获得帮助的命令列表和帮助主题?
    command
    需要其帮助的命令,不要?net 作ؓ command 的一部分?
    Q?Q?help
    提供昄帮助文本方式选择?
    Q?Q??
    昄命o的正语法?
  十、Net Helpmsg
  功能Q提?Windows NT 错误信息的帮助?br />   格式Qnet helpmsg message#
  参数
    message#
    需要其帮助?Windows NT 消息的四位代码?
  十一、Net Localgroup
  功能Q添加、显C或更改本地l?
  格式Qnet localgroup [groupname [/comment:"text "]] [/domain]
     net localgroup groupname {/add [/comment:"text "] | /delete} [/domain]
     net localgroup groupname name [ ...] {/add | /delete} [/domain]
  参数
    Q?Q无
    键入不带参数?net localgroup 显C服务器名称和计机的本地组名称?
    groupname
    要添加、扩充或删除的本地组名称。只提供 groupname 卛_查看用户列表或本地组中的全局
    l?
    Q?Q?comment: "text "
    为新建或现有l添加注释。注释文字的最大长度是 48 个字W,q用引号引住?
  Q?Q?domain
  在当前域的主域控制器中执行操作,否则仅在本地计算Z执行操作?
  该参C应用?Windows NT Server 域中?Windows NT Workstation 计算机。Windows NT Server 计算机默认ؓ在主?br />   控制器中操作?
  name [ ...]
  列出要添加到本地l或从本地组中删除的一个或多个用户名或l名Q多个用户名或组名之间以I格分隔。可以是本地
  用户、其他域用户或全局l,但不能是其他本地l。如果是其他域的用户Q要在用户名前加域名Q例如SALESRALPHRQ?
  Q?Q?add
  全局l名或用户名d到本地组中。在使用该命令将用户或全局l添加到本地l之前,必须为其建立帐号?
  Q?Q?delete
  从本地组中删除组名或用户名?
  十二、Net Name
  功能Q添加或删除消息名(有时也称别名Q,或显C机接收消息的名U列表。要使用 net name 命oQ计机中必运行信使服务?
  格式Qnet name [name [/add | /delete]]
  参数Q?
  ?
  键入不带参数?net name 列出当前用的名称?br />   name
  指定接收消息的名U。名U最多ؓ 15 个字W?
  /add
  名U添加到计算Z?/add 是可选项Q键?net name name 与键?net name name /add 相同?br />   /delete
  从计机中删除名U?
  Net Pause
  暂停正在q行的服务?br />   十三、net pause service
  参数
  service
  指下列服务: file server for macintoshQ仅限于 Windows NT ServerQ、ftp publishing service、lpdsvc、net logon、network dde、network dde dsdm、nt lm security support provider、remotebootQ仅限于 Windows NT ServerQ、remote access server、schedule、server、simple tcp/ip services ?workstation ?
  十四、Net Print
  功能Q显C或控制打印作业及打印队列?
  格式Qnet print \computername sharename
  net print [\computername ] job# [/hold | /release | /delete]
  参数Q?
  computername
  ׃n打印机队列的计算机名?
  sharename
  打印队列名称。当包含 computername ?sharename Ӟ使用反斜?() 它们分开?
  job#
  在打印机队列中分配给打印作业的标识号。有一个或多个打印机队列的计算Zؓ每个打印作业分配唯一标识受如果某个作业号用于׃n打印机队列中Q则不能指定l其他作业,也不能分配给其他打印机队列中的作业?
  /hold
  使用 job# Ӟ在打印机队列中打印作业{待。打C业停留在打印机队列中Qƈ且其他打C业只能等到释放该作业之后才能q入?br />   /release
  释放保留的打C业?
  /delete
  从打印机队列中删除打C业?
  十五、Net Send
  功能Q向|络的其他用戗计机或通信名发送消息。要接收消息必须q行信服务?
  格式Qnet send {name | * | /domain[:name] | /users} message
  参数 Q?br />   name
  要接收发送消息的用户名、计机名或通信名。如果计机名包含空字符Q则要将其用引号(" ") 引住?
  *
  消息发送到l中所有名U?
  /domain[:name]
  消息发送到计算机域中的所有名U。如果指?nameQ则消息发送到指定域或l中的所有名U?
  /users
  消息发送到与服务器q接的所有用戗?
  message
  作ؓ消息发送的文本?
  十六、Net Session
  功能Q列出或断开本地计算机和与之q接的客L的会话?
  格式Qnet session [\computername] [/delete]
  参数Q?
  ?
  键入不带参数?net session 可以昄所有与本地计算机的会话的信息?
  \computername
  标识要列出或断开会话的计机?
  /delete
  l束?\computername 计算Z话ƈ关闭本次会话期间计算机的所有打开文g。如果省略\computername 参数Q将取消与本地计机的所有会话?
  十七、Net Share
  功能Q创建、删除或昄׃n资源?
  格式Qnet share sharename
  net share sharename=drive:path [/users:number | /unlimited] [/remark:"text"]
  net share sharename [/users:number | unlimited] [/remark:"text"]
  net share {sharename | drive:path} /delete
  参数Q?
  ?
  键入不带参数?net share 显C本地计机上所有共享资源的信息?
  sharename
  是共享资源的|络名称。键入带 sharename ?net share 命oQ只昄该共享信息?
  drive:path
  指定׃n目录的绝对\径?
  /users:number
  讄可同时访问共享资源的最大用h?
  /unlimited
  不限制同时访问共享资源的用户数?
  /remark:"text "
  d关于资源的注释,注释文字用引号引住?
  /delete
  停止׃n资源?
  十八、Net Start
  功能Q启动服务,或显C已启动服务的列表。如果服务名是两个或两个以上的词Q如 Net Logon 或Computer BrowserQ则必须用引?(") 引住?
  格式Qnet start [service]
  参数Q?
  ?
  键入不带参数?net start 则显C行服务的列表?
  service
  包括下列服务Q?alerter、client service for netware、clipbook server、computer browser、dhcp client 、directory replicator 、eventlog 、ftp publishing service 、lpdsvc、messenger 、net logon 、network dde 、network dde dsdm 、network monitoring agent 、nt lm security support provider 、ole 、remote access connection manager 、remote access isnsap service 、remote access server 、remote procedure call (rpc) locator 、remote procedure call (rpc) service 、schedule 、server 、simple tcp/ip services 、snmp、spooler 、tcp/ip netbios helper 、ups ?workstation?
  下列服务仅在 Windows NT Server 下可用:file server for macintosh、gateway service for netware、microsoft dhcp server、print server for macintosh、remoteboot、windows internet name service ?
  十九、Net Statistics
  功能Q显C本地工作站或服务器服务的统计记录?
  格式Qnet statistics [workstation | server]
  参数 Q?br />   ?
  键入不带参数?net statistics 列出其l计信息可用的运行服务?
  workstation
  昄本地工作站服务的l计信息?
  server
  昄本地服务器服务的l计信息?
  二十、Net Stop
  功能Q停?Windows NT |络服务?
  格式Qnet stop service
  参数 Q?br />   service
  包括下列服务Q?alerterQ警报)、client service for netwareQNetware 客户端服务)、clipbook serverQ剪贴簿服务器)、computer browserQ计机览器)、directory replicatorQ目录复制器Q、ftp publishing service (ftp )Qftp 发行服务Q、lpdsvc、messengerQ信使)、net logonQ网l登录)、network ddeQ网l?ddeQ、network dde dsdmQ网l?dde dsdmQ、network monitor agentQ网l监控代理)、nt lm security support providerQNT LM 安全性支持提供)、oleQ对象链接与嵌入Q、remote access connection managerQ远E访问连接管理器Q、remote access isnsap serviceQ远E访?isnsap 服务Q、remote access serverQ远E访问服务器Q、remote procedure call (rpc) locatorQ远E过E调用定位器Q、remote procedure call (rpc) serviceQ远E过E调用服务)、scheduleQ调度)、serverQ服务器Q、simple tcp/ip servicesQ简?TCP/IP 服务Q、snmp、spoolerQ后台打印程序)、tcp/ip netbios helperQTCP/IP NETBIOS 辅助工具Q、ups ?workstationQ工作站Q?
  下列服务仅在 Windows NT Server 中可用: file server for macintosh、gateway service for netware、microsoft dhcp server、print server for macintosh、remoteboot、windows internet name service?
  二十一、Net Time
  功能Q计算机的旉与另一台计机或域的时间同步。不?/set 参数使用Ӟ显C另一台计机或域的时间?
  格式Qnet time [\computername | /domain[:name]] [/set]
  参数Q?
  \computername
  要检查或同步的服务器名?
  /domain[:name]
  指定要与其时间同步的域?
  /set
  使本计算机时钟与指定计算机或域的旉同步?
  二十二:Net Use
  功能Q连接计机或断开计算Z׃n资源的连接,或显C机的连接信息。该命o也控制永久网l连接?
  格式Qnet use [devicename | *] [\computernamesharename[volume]] [password | *]] [/user
  :[domainname]username] [[/delete] | [/persistent:{yes | no}]]
  net use devicename [/home[password | *]] [/delete:{yes | no}]
  net use [/persistent:{yes | no}]
  参数 Q?br />   ?
  键入不带参数?net use 列出网l连接?
  devicename
  指定要连接到的资源名U或要断开的设备名U。有两类讑֤名:盘驱动器(D: ?Z:Q和打印机(LPT1: ?LPT3Q。若键入星号而不是指定设备名分配下一个可用设备名?
  \computernamesharename
  服务器及׃n资源的名U。如果计机名包含空白字W,要用引号 (" ") 双反斜U及计算机名引住。计机名长度可以是 1-15 个字W?
  volume
  指定服务器上?NetWare 南要q接?NetWare 服务器,必须安装q运?NetWare 客户机服?(Windows NT Workstation) ?NetWare |关服务 (Windows NT Server)?
  password
  讉K׃n资源的密码?
  *
  提示键入密码。在密码提示行中键入密码Ӟ不昄该密码?
  /user
  指定q行q接的另外一个用戗?
  domainname
  指定另一个域。例?net use d: \servershare /user:adminmariel q接用户 marielQ如同从 admin 域连接一栗如果省略域Q将使用当前d域?
  username
  指定d的用户名?
  /home
  用戯接到其宿ȝ录?
  /delete
  取消指定|络q接。如果用户以星号指定q接Q则取消所有网l连接?
  /persistent
  控制怹|络q接的用。默认ؓ上次使用的设|。无讑֤的连接不是永久的?
  yes
  保存建立的所有连接,q在下次d时还原?
  no
  不保存徏立的q接和发连接,q在下次d时还原现有连接。?/delete 开关项取消怹q接?
  二十三、Net User
  功能Q添加或更改用户帐号或显C用户帐号信息?
  格式Qnet user [username [password | *] [options]] [/domain]
  net user username {password | *} /add [options] [/domain]
  net user username [/delete] [/domain]
  参数 Q?br />   ?
  键入不带参数?net user 查看计机上的用户帐号列表?
  username
  d、删除、更Ҏ查看用户帐号名。用户帐号名最多可以有 20 个字W?
  password
  为用户帐号分配或更改密码。密码必L_ net accounts 命o /minpwlen 选项中设|的最参数。最多是 14 个字W?
  *
  提示输入密码。在密码提示行中键入密码Ӟ不昄该密码?
  /domain
  在计机d的主域控制器中执行操作?
  该参C?Windows NT Server 域成员的 Windows NT Workstation 计算Z可用。默认情况下QWindows NT Server 计算机在d控制器中执行操作?
  注意Q在计算Z域的d控制器发生该动作。它可能不是d域?br />   /add
  用户帐h加到用户帐号数据库?
  /delete
  从用户帐h据库中删除用户帐受?
  选项如下所C:
  /active:{no | yes}
  启用或禁止用户帐受如果不Ȁzȝ户帐P用户׃能访问计机上的资源。默认值是 yes Q激z)?br />   例:net user guest /active:yes 启用guest用户帐号
  net user guest /active:no 止guest用户帐号
  /comment:"text"
  提供用户帐号的注释。该注释最多可以有 48 个字W,文字用引号引住?
  /countrycode:nnn
  使用操作pȝ的国家代码以便ؓ用户帮助和错误信息文件提供指定语a文g? DC默认国家代码?br />   /expires:{date | never}
  如果讄 dateQ将D用户帐号q期Qnever 不对用户帐号讄旉限制。过期日期根?countrycode 值可以是下列格式Q?mm/dd/yy、dd/mm/yy ?mmm, dd, yy。注意帐号在指定日期开始时q期。月份可以是数字、全名或三个字母的简拹{年可以是两位或四位敎ͼ使用逗号或斜U(不要用空| 区分日期的各部分。如果省?yy Q则使用该日期下一ơ到来的q䆾Q根据计机的时钟)。例如如果在 1994 q?1 ?10 日到 1995 q?1 ?8 日之间输入下列日期项Q那它们相同Q?br />   jan,91/9/95
  january,9,19951/9
  /fullname:"name"
  指定用户全名而不是用户名。用引号名字引住?
  /homedir:path
  讄用户宿主目录的\径。该路径必须存在?
  /homedirreq:{yes | no}
  讄是否需要宿ȝ录?
  /passwordchg:{yes | no}
  指定用户是否能改变自q密码。默认值是 yes?
  /passwordreq:{yes | no}
  指定用户帐号是否需要密码,默认值是 yes?
  /profilepath:[path]
  讄用户d配置文g的\径。该路径名指向注册表配置文g?
  /scriptpath:path
  为用L录脚本设|\径。Path 不能是绝对\径;path 是相对于 %systemroot%SYSTEM32REPLIMPORTSCRIPTS 的相对\径:?
  /times:{times | all}
  指定允许用户使用计算机的旉。times DCZؓ day[-day][, day[-day]] , time[-time][, time[-time]], 增量限制Z时。Days 可以是全名或写(M、T、W、Th、F、Sa、SuQ。Hours 可以?12 时制或 24 时制。对?12 时|使用 AM、PM ?A.M、P.M。all 表示用户d以登录。空DC用hq不能登录。用逗号分隔日期和时_分隔旉和日期的单位用分P例如 M,4AM-5PM; T,1PM-3PMQ。指?/times 时不要用空根{?
  /usercomment:"text "
  让管理员d或更改帐L“用户注释”。用引号引住文字?
  /workstations:{computername[,...] | *}
  列出最多八个用户可以登录到|络的工作站。用逗号分隔列表中的多个V如?/workstations 没有列表Q或如果列表是星?#8220;*”Q则用户可以从Q何一台计机d?
  二十四:Net View
  功能Q显C域列表、计机列表或指定计机的共享资源列表?
  格式Qnet view [\computername | /domain[:domainname]]
  net view /network:nw [\computername]
  参数Q?
  ?
  键入不带参数?net view 显C当前域的计机列表?
  \computername
  指定要查看其׃n资源的计机?
  /domain[:domainname]
  指定要查看其可用计算机的域。如果省?domainname Q则昄|络的所有域?
  /network:nw
  昄 NetWare |络中所有可用的服务器。如果指定计机名,则显C?NetWare |络中该计算机的可用资源。也可以用此开x定添加到pȝ中的其他|络?

]]>
SC命o[转自癑ֺ]http://www.aygfsteel.com/xiaomage234/archive/2008/10/15/234365.html马?/dc:creator>马?/author>Wed, 15 Oct 2008 01:46:00 GMThttp://www.aygfsteel.com/xiaomage234/archive/2008/10/15/234365.htmlhttp://www.aygfsteel.com/xiaomage234/comments/234365.htmlhttp://www.aygfsteel.com/xiaomage234/archive/2008/10/15/234365.html#Feedback0http://www.aygfsteel.com/xiaomage234/comments/commentRss/234365.htmlhttp://www.aygfsteel.com/xiaomage234/services/trackbacks/234365.html   SC命o是XPpȝ中功能强大的DOS命o,SC命o能与“服务控制?#8221;和已安装讑֤q行通讯。SC命o的功能有
  1、SC可以 索和讄有关服务的控制信息。可以?SC.exe 来测试和调试服务E序?br />   2、可以设|存储在注册表中的服务属性,以控制如何在启动时启动服务应用程序,以及如何其作ؓ后台E序q行。即更改服务的启动状态?br />   3、SC 命oq可以用来删除系l中的无用的服务。(除非对自q脑中的Yg所需的服务比较清楚,否则不徏议删除Q何系l服务,其是基服务Q?br />   4、SC命o 的参数可以配|指定的服务Q检索当前服务的状态,也可以停止和启动服务Q功能上cMNET STOP/START命oQ但SC速度更快且能停止更多的服务)?br />   5、可以创建批处理文g来调用不同的 SC 命oQ以自动启动或关闭服务序列?br />   SC.exe 提供的功能类g“控制面板”?#8220;理工具”中?#8220;服务”?br /> ~辑本段SC命o列表及格?br />   SC命o不能单独使用,必须和其它的命ol合h一起用。一共有24个,如下所C?br />   sc boot sc config sc continue sc control sc create sc delete sc descrīption sc enumdepend
  sc failure sc getdisplayname sc getkeyname sc interrogate sc lock sc pause sc qc
  sc qdescrīption sc qfailure sc query sc queryex sc querylock sc sdset sc sdshow
  sc start sc stop
  在命令行中直接输入SC会显CSC命o的帮助信息,直接输入以上24个命令除sc query ?sc queryex之外都将昄该SC命o的帮助信息。(输入sc query和sc queryex会显C当前系l中正在q行的所有服务的详细信息Q但sc queryex比sc query昄的信息多出来两项:PID和FLAGSQ?br />   SC命o的格式:SC [Servername] command Servicename [Optionname= Optionvalues]
  ServernameQ指定服务所在的q程服务器的名称。名U必采用通用命名U定 (UNC) 格式Q?#8220;\\myserver”Q。要在本地运行SC.exeQ请忽略此参数?br />   command Q即以上提到的那24个命令(SC后面的那个,如query,start,stop,create,config{)
  ServicenameQ服务名Q也是要配|的那个服务的名字,例如你要启动一个服务你p入sc start +你要启动的服务名。(注意q里的服务名不是服务的显C名Uͼ而是服务名称Q这个服务名U可以在pȝ理工具下的服务中可以看刎ͼ例如在服务中双击DHCP Client可以看到其服务名U是DhcpQ而那个DHCP Client是显C名Uͼ可以用sc命o来更改一个服务的昄名称Q?br />   Optionname= OptionvaluesQ是选项名和选项的倹{?br />   例如你要在开机是pȝ自动加蝲themes服务Q你可以使用sc config themes start= autoQ后面的start是选项Qauto是选项的倹{(注意=号后面有个空|所有的使用选项的在=号后面都要加个空格再加上选项|
~辑本段SC命o的用?br />   下面l出每个命o详细的用?br />   1、sc boot
  表明最q的启动是否应该保存Zơ已知的正确配置?br />   语法
  Sc [ServerName] boot [{bad | OK}]
  参数
  ServerNameQ上面已l介l,在此不在累述Q下同)
  [{bad | OK}]
  指定最q的启动是否错误或它是否应该保存Zơ已知的正确启动配置?br />   下面的示例显CZ如何使用 sc boot 命oQ?br />   sc boot ok
  sc boot bad
  2、sc config
  修改注册表和“服务控制理?#8221;数据库中服务目的倹{?br />   语法
  Sc [ServerName] config [ServiceName] [type= {own | share | kernel | filesys | rec | adapt | interacttype= {own | share}}] [start= {boot | system | auto | demand | disabled}] [error= {normal | severe | critical | ignore}] [binpath= BinaryPathName] [group= LoadOrderGroup] [tag= {yes | no}] [depend= dependencies] [obj= {AccountName | ObjectName}] [displayname= DisplayName] [password= Password]
  ServiceName
  指定要操作的服务名。(上面也已l介l,下文不在累述Q?br />   type= {own | share | kernel | filesys | rec | adapt | interacttype= {own | share}}
  指定服务cd?br />   own
  服务以其自n的进E运行。不与其他服务共享可执行文g。这是默认倹{?br />   share
  服务作ؓ׃nq程q行。与其他服务׃n可执行文件?br />   kernel
  驱动E序?br />   filesys
  文gpȝ驱动E序?br />   rec
  文gpȝ识别驱动E序Q标识计机上用的文gpȝQ?br />   adapt
  适配器驱动程序(标识键盘、鼠标、磁盘驱动器q样的硬仉Q?br />   interact
  服务可以与桌面交互,接收用户的输入。交互服务必d LocalSystem 帐户下运行。该cd必须?type= own ?type= sharedQ例如,type= interact type= ownQ结合用。自w?type= interact 会产生参数无效的错误?br />   start= {boot | system | auto | demand | disabled}
  指定服务的启动类型?
  boot
  由启动加载程序加载的讑֤驱动E序?br />   system
  在核心初始化q程中启动的讑֤驱动E序?br />   auto
  每次计算机重新启动时都会自动启动、ƈ且即使无人登录到计算Z能正常运行的服务?br />   demand
  必须手动启动的服务。如果没有指?start=Q则此项即ؓ默认倹{?br />   disabled
  不能启动的服务。要启动用的服务,应将启动cd更改为其他倹{?br />   error= {normal | severe | critical | ignore}
  如果在启动过E中Q服务启动失败,则指定错误的严重性?br />   normal
  记录错误,q且昄消息对话框,通知用户服务启动p|。启动将l箋。这是默认设|?br />   severe
  记录错误Q如果存在)。计机试以最新的有效配置重新启动。这可能D计算够重新启动,但服务却仍然无法q行?br />   critical
  记录错误Q如果存在)。计机试以最新的有效配置重新启动。如果上ơ已知正的配置p|Q启动也失败,启动q程以停止错误而中止?br />   ignore
  错误已记录,启动l箋。记录错误超出在事gri志的范围Q不再给用户作出提示?
  binpath= BinaryPathName
  指定指向服务二进制文件的路径?
  group= LoadOrderGroup
  指定该服务所属组的名U。组列表存储在注册表?HKLM\System\CurrentControlSet\Control\ServiceGroupOrder 子项中。默认设|ؓI倹{?br />   tag= {yes | no}
  指定是否?CreateService 调用中获?TagID。标C用于引导启动或系l启动驱动程序?br />   depend= dependencies
  指定必须在此Ҏ务之前启动的服务或组的名U。名UC正斜?(/) 分隔?br />   obj= {AccountName | ObjectName}
  指定q行服务用的帐户名,或指定运行驱动程序将使用?Windows 驱动E序对象名。默认设|ؓ LocalSystem?br />   displayname= DisplayName
  指定一个可以在用户界面E序中用于ؓ用户标识服务的友好的、有意义的名U。例如,一Ҏ务的子项名是对用h无意义的 wuauservQ而显C的名称?#8220;自动更新”?br />   password= Password
  指定一个密码。如果用了?LocalSystem 的帐P则此Ҏ必需的?br />   备注
  如果参数及其g间没有空|Q例如,?type= ownQ而不?type=ownQ,则操作会p|?br />   CZ
  下面的示例显CZ如何使用 sc config 命oQ?br />   sc config NewService binpath= "ntsd -d c:\windows\system32\NewServ.exe"
  Q、sc continue
  Z恢复暂停的服务,要给服务发送一?CONTINUE 控制h?br />   语法
  Sc [ServerName] continue [ServiceName]
  参数
  ServerNameQ略
  ServiceNameQ略
  备注
  使用 continue 操作来恢复暂停的服务?
  下面的示例显CZ如何使用 sc continue 命oQ?br />   sc continue tapisrv
  Q、sc control
  向服务发?CONTROL ?br />   语法
  sc [ServerName] control [ServiceName] [{paramchange | netbindadd | netbindremove | netbindenable | netbinddisable | UserDefinedControlB}]
  参数
  {paramchange | netbindadd | netbindremove | netbindenable | netbinddisable | UserDefinedControlB}
  指定要发送到服务的控制?br />   Q、sc create
  在注册表?#8220;服务控制理?#8221;中ؓ服务创徏子项和项目?br />   语法
  Sc [ServerName] create [ServiceName] [type= {own | share | kernel | filesys | rec | adapt | interacttype= {own | share}}] [start= {boot | system | auto | demand | disabled}] [error= {normal | severe | critical | ignore}] [binpath= BinaryPathName] [group= LoadOrderGroup] [tag= {yes | no}] [depend= dependencies] [obj= {AccountName | ObjectName}] [displayname= DisplayName] [password= Password]
  参数Q各个参数的作用参见sc config 命o
  下面的示例显CZ如何使用 sc create 命oQ?br />   sc \\myserver create NewService binpath= c:\windows\system32\NewServ.exe
  sc create NewService binpath= c:\windows\system32\NewServ.exe type= share start= auto depend= "+TDI Netbios"
  Q、sc delete
  从注册表中删除服务子V如果服务正在运行或者另一个进E有一个该服务的打开句柄Q那么此服务标Cؓ删除?br />   语法
  Sc [ServerName] delete [ServiceName]
  参数Q略
  备注
  使用“d或删除程?#8221;删除 DHCP、DNS 或Q何其他内|的操作pȝ服务?#8220;d或删除程?#8221;不仅会删除该服务的注册表子项Q而且q会卸蝲该服务ƈ删除其所有的快捷方式?
  下面的示例显CZ如何使用 sc delete 命oQ?br />   sc delete newserv
  Q、sc descrīption
  讄服务的描q字W串?br />   语法
  Sc [ServerName] descrīption [ServiceName] [Descrīption]
  参数Q略
  描述
  为指定服务指定描q。这个描q的内容可以在控刉板-理工具Q服务里通过查看该服务的属性看到。如果没有指定字W串Q则不会修改该服务的描述。不限制服务描述中可包含的字W数?br />   CZ
  下面的示例显CZ如何使用 sc descrīption 命oQ?br />   sc descrīption newserv "Runs quality of service control."
  Q、sc enumdepend
  枚D依赖此服务的pȝlgQ这也可以从控制面板Q管理工P服务里通过查看该服务的属性中的依存关p选项卡看刎ͼ“下面的系l组件依赖此服务”下面的部分)
  语法
  Sc [ServerName] enumdepend [ServiceName] [BufferSize]
  参数
  BufferSize
  以字节ؓ单位指定枚D~冲区的大小。默认gؓ 1024 字节?br />   备注
  如果~冲Z够大Qenumdepend 操作只会部分输出依存关系Qƈ指定输出所有依存关pL需的额外缓冲区大小。如果输截断Q请重新q行该操作ƈ指定更大的缓冲区大小?br />   下面的示例显CZ如何使用 sc enumdepend 命oQ?br />   sc enumdepend rpcss 5690
  sc enumdepend tapisrv
  Q、sc failure
  指定服务p|时要采取的措施?br />   语法
  Sc [ServerName] failure [ServiceName] [reset= ErrorFreePeriod] [reboot= BroadcastMessage] [command= CommandLine] [actions= FailureActionsAndDelayTime]
  参数
  reset= ErrorFreePeriod
  指定没有p|的周期长度(单位为秒Q,此后p|计数应该重置?0。这个参数必M actions= 参数l合使用?br />   reboot= BroadcastMessage
  指定服务p|时要q播的消息?br />   command= CommandLine
  指定服务p|时要q行的命令行。有兛_p|时如何运行批处理?VBS 文g的详l信息,请参?#8220;注释”?br />   actions= FailureActionsAndDelayTime
  指定p|操作及其延迟旉Q单位ؓ毫秒Q,以正斜杠 (/) 隔开。以下操作均有效Qrun、restart ?reboot。此参数必须?reset= 参数l合使用。失败后不采取Q何操作时Q请使用 actions= ""?br />   备注
  q所有服务都允许更改其失败选项。其中一些作为服务集的一部分q行?br />   要在p|时运行批处理文gQ请指定 cmd.exeDrive:\FileName.bat ?command= 参数Q其?Drive:\FileName.bat 是批处理文g的完全合格的名称?br />   要在p|时运?VBS 文gQ请指定 cscrīpt drive:\myscrīpt.vbs ?command= 参数Q其?Drive:\myscrīpt.vbs 是脚本文件完全合格的名称?br />   可以三U不同的操作指定?actions= 参数Q它们将会在服务的第一ơ、第二次、第三次p|时用?br />   如果参数及其g间没有空|Q例如,?type= ownQ而不?type=ownQ,则操作会p|?br />   下面的示例显CZ如何使用 sc failure 命oQ?br />   sc failure msftpsvc reset= 30 actions= restart/5000
  sc failure dfs reset= 60 command= c:\windows\services\restart_dfs.exe actions= run/5000
  sc failure dfs reset= 60 actions= reboot/30000
  sc failure dfs reset= 60 reboot= "The Distributed File System service has failed.Because of this, the computer will reboot in 30 seconds." actions= reboot/30000
  sc failure myservice reset= 3600 reboot= "MyService crashed -- rebooting machine" command= "%windir%\MyServiceRecovery.exe" actions= restart/5000/run/10000/reboot/60000
  Q0、sc getdisplayname
  获得与特定服务关联的昄名称?br />   语法
  Sc [ServerName] getdisplayname [ServiceName] [BufferSize]
  参数
  BufferSize
  指定~冲区大(以字节ؓ单位Q。默认gؓ 1024 字节?br />   下面的示例显CZ如何使用 sc getdisplayname 命oQ?br />   sc getdisplayname clipsrv
  sc getdisplayname tapisrv
  sc getdisplayname sharedaccess
  Q1、sc getkeyname
  使用特定服务的显C名UC入的内容会获得与其相兌的项名?br />   语法
  sc [ServerName] getkeyname [ServiceDisplayName] [BufferSize]
  参数
  ServiceDisplayName
  指定服务的显C名U?br />   BufferSize
  指定~冲区大(以字节ؓ单位Q。默认gؓ 1024 字节?br />   备注
  如果 ServiceDisplayName 包含I格Q请使用引号文本引hQ例如,"Service Display Name"Q?br />   下面的示例显CZ如何使用 sc getkeyname 命oQ?br />   sc getkeyname "remote procedure call (rpc)"
  sc getkeyname "internet connection sharing"
  sc getkeyname clipbook
  Q2、sc interrogate
  向服务发送一?INTERROGATE 控制h?br />   语法
  Sc [ServerName] interrogate [ServiceName]
  参数Q略
  备注
  向服务发?INTERROGATE 会导致该服务使用“服务控制理?#8221;更新其状态?br />   下面的示例显CZ如何使用 sc interrogate 命oQ?br />   sc interrogate sharedaccess
  sc interrogate rpcss
  Q3、sc lock
  锁定“服务控制理?#8221;的数据库?br />   语法
  sc [ServerName] lock
  参数Q略
  备注
  锁定“服务控制理?#8221;的数据库会阻止启动Q何服务。如果要保服务在停止之后不会启动,请用这个命令。这可以使您不受q扰地进行一些操作(例如Q删除服务)?br />   使用 lock 操作锁定“服务控制理?#8221;的数据库Q然后通过键入 u 来数据库解锁。也可停止锁定数据库的进E?br />   下面的示例显CZ如何使用 sc lock 命oQ?br />   sc lock
  Q4、sc pause
  向服务发?PAUSE 控制h?br />   语法
  Sc [ServerName] pause [ServiceName]
  参数Q略
  备注
  在终止服务之前?pause 操作来暂停它?br />   q所有服务都能够被暂停?br />   在暂停时q所有服务都执行同样的操作。一些服务lؓ现有客户端服务,但拒l接受新的客L。其他的会终止对现有客户端的服务Q同时也会拒l接受新的客L?br />   下面的示例显CZ如何使用 sc pause 命oQ?br />   sc pause tapisrv
  Q5、sc qc
  查询服务的配|信息?br />   语法
  Sc [ServerName] qc [ServiceName] [BufferSize]
  参数
  BufferSize
  指定~冲区大(以字节ؓ单位Q。默认gؓ 1024 字节?br />   备注
  qc 操作可以昄有关服务的下列信息:
  SERVICE_NAMEQ服务的注册表子名Uͼ、TYPE、ERROR_CONTROL、BINARY_PATH_NAME、LOAD_ORDER_GROUP、TAG、DISPLAY_NAME、DEPENDENCIES ?SERVICE_START_NAME?br />   理员可以?SC 来确定Q一服务的二q制名称Qƈ查明它是否与其他服务׃n一个进E,在命令行下键入下列命令:
  sc qc ServiceName
  SC 有助于将 Microsoft 理控制?(MMC) 的服务节点中的服务与“pȝ监视?#8221;中的q程q行匚w。如果二q制名称?Services.exeQ那么服务共?#8220;服务控制?#8221;q程?br />   Services.exe 启动所有的服务。ؓ节约pȝ资源Q几个ؓ Windows 开发的 Win32 服务被编写ؓ׃n Services.exe q程。这些服务不作ؓ独立的进E列?#8220;pȝ监视?#8221;?#8220;d理?#8221;之中。Svchost.exe 也是如此Q它是许多操作服务共享的服务Lq程?br />   因ؓW三?Win32 服务也可以配|ؓ׃nq程Q所以不可能为每一?Win32 服务创徏一个进E。SC 可以用来获得q些服务的配|信息。但是,如果一Ҏ务不与其他服务共享其q程Q那么在服务q行Ӟ“pȝ监视?#8221;中会出现其进E?br />   因ؓ SC 与包含在 Windows 中的 Services.exe 相比Q提供了有关服务的更l和准确的信息,所以对于服务开发h员来_SC 更有用处。Services.exe 可以定服务是正在运行、已停止q是已暂停。尽这些工具对于正在^E行的已调试应用程序已l够,但它们提供的有关正开发的服务的信息却会解。例如,正在启动的服务不其实际q行与否都显CZؓ已启动?br />   SC 可执行对所?Windows 服务控制应用~程接口 (API) 函数的调用。通过在命令行下指定这些函数来讄其参数?br />   使用 SCQ可以查询服务状态,索存储在状态结构字D中的倹{Services.exe 不能提供服务的完整状态,?SC 可以昄_的服务状态,以及最新的查点L和等待提C。可以将查点用作调试工具Q原因在于它表明了在E序停止响应之前初始化进行的E度。SC 也可以用来指定远E计机名,以便于在q程计算Z调用服务 API 函数或查看服务状态结构?br />   下面的示例显CZ如何使用 sc qc 命oQ?br />   sc qc \\myserver newsrvice
  sc qc rpcss 248
  Q6、sc qdescrīption
  昄服务的描q字W串?br />   语法
  Sc [ServerName] qdescrīption [ServiceName] [BufferSize]
  参数
  BufferSize
  指定~冲区大(以字节ؓ单位Q。默认gؓ 1024 字节?br />   下面的示例显CZ如何使用 sc qdescrīption 命oQ?br />   sc qdescrīption rpcss
  sc qdescrīption rpcss 138
  Q7、sc qfailure
  昄指定服务p|时要执行的操作?br />   语法
  Sc [ServerName] qfailure [ServiceName] [BufferSize]
  参数
  BufferSize
  指定~冲区大(以字节ؓ单位Q。默认gؓ 1024 字节?br />   备注
  qfailure 操作可以昄有关服务的下列信息:SERVICE_NAMEQ服务的注册表子名Q、RESET_PERIOD、REBOOT_MESSAGE、COMMAND_LINE ?FAILURE_ACTIONS?br />   下面的示例显CZ如何使用 sc qfailure 命oQ?br />   sc qfailure rpcss
  sc qfailure rpcss 20
  Q8、sc query
  获得和显C关于指定的服务、驱动程序、服务类型或驱动E序cd的信息?br />   语法
  Sc [ServerName] query [ServiceName] [type= {driver | service | all}] [type= {own | share | interact | kernel | filesys | rec | adapt}] [state= {active | inactive | all}] [bufsize= BufferSize] [ri= ResumeIndex] [group= GroupName]
  参数
  ServiceName
  指定?getkeyname 操作q回的服务名。此 query 参数不与其他?query 参数l合使用Q除?ServerNameQ?br />   type= {driver | service | all}
  指定需要枚丄内容。默认类型ؓ service?br />   driver
  指定仅枚N动程序?br />   service
  指定仅枚举服务?br />   all
  指定同时枚D驱动E序和服务?br />   type= {own | share | interact | kernel | filesys | rec | adapt}
  指定要枚丄服务cd或驱动程序类型?br />   own
  服务以其自n的进E运行。不与其他服务共享可执行文g。这是默认倹{?br />   share
  服务作ؓ׃nq程q行。与其他服务׃n可执行文件?br />   interact
  服务可以与桌面交互,接收用户的输入。交互服务必d LocalSystem 帐户下运行?br />   kernel
  驱动E序?br />   filesys
  文gpȝ驱动E序?br />   state= {active | inactive | all}
  指定要枚丄服务的已开始状态。默认状态是 active?br />   active
  指定所有的zd服务?br />   inactive
  指定所有暂停或停止的服务?br />   all
  指定所有服务?br />   bufsize= BufferSize
  以字节ؓ单位指定枚D~冲区的大小。默认大ؓ 1024 字节。当从查询返回的昄l果过 1024 个字节时Q增加枚丄冲区的大?br />   ri= ResumeIndex
  指定开始或l箋枚D的烦引号。默认gؓ 0?在查询返回的信息过默认~冲够显C的大小Ӟ请与 bufsize= 参数l合使用q个参数?br />   group= GroupName
  指定要枚丄服务l。默认设|ؓ所有组?br />   备注
  如果参数及其g间没有空|Q例如,?type= ownQ而不?type=ownQ,则操作会p|?br />   query 操作可以昄有关服务的下列信息:SERVICE_NAMEQ服务的注册表子名Q、TYPE、STATEQ以及不可用的状态)、WIN32_EXIT_B、SERVICE_EXIT_B、CHECKPOINT ?WAIT_HINT?br />   在某些情况下Qtype= 参数可以使用两次。type= 参数的第一ơ出现指定是否查询服务、驱动器或所有这些项。type= 参数的第二次出现指定一个由 create 操作q一步羃查询范围的cd?br />   ?query 命o的显C结果超q了枚D~冲区的大小Ӟ昄cM于以下内容的消息Q?
  Enum: more data, need 1822 bytes start resume at index 79
  要显C剩余的 query 信息Q请重新q行 queryQ将 bufsize= 讄为所需的字节数Qƈ?ri= 讄为指定的索引。例如,在命令行键入下面的指令会昄剩余的输出:
  sc query bufsize= 1822 ri= 79
  下面的示例显CZ如何使用 sc query 命oQ?br />   sc query
  sc query messenger
  sc query type= driver
  sc query type= service
  sc query state= all
  sc query bufsize= 50
  sc query ri= 14
  sc query type= service type= interact
  sc query type= driver group= ndis
  Q9、sc queryex
  获得和显C关于指定的服务、驱动程序、服务类型或驱动E序cd的扩展信息?br />   语法
  Sc [ServerName] queryex [type= {driver | service | all}] [type= {own | share | interact | kernel | filesys | rec | adapt}] [state= {active | inactive | all}] [bufsize= BufferSize] [ri= ResumeIndex][group= GroupName]
  参数
  ServiceName
  指定?getkeyname 操作q回的服务名。此 queryex 参数不与 ServerName 之外的Q何其?queryex 参数l合使用?br />   type= {driver | service | all}
  指定需要枚丄内容。默认类型ؓ service?br />   driver
  指定仅枚N动程序?br />   service
  指定仅枚举服务?br />   all
  指定同时枚D驱动E序和服务?br />   type= {own | share | interact | kernel | filesys | rec | adapt}
  指定要枚丄服务cd或驱动程序类型?br />   own
  服务以其自n的进E运行。不与其他服务共享可执行文g。这是默认倹{?br />   share
  服务作ؓ׃nq程q行。与其他服务׃n可执行文件?br />   interact
  服务可以与桌面交互,接收用户的输入。交互服务必d LocalSystem 帐户下运行?br />   kernel
  驱动E序?br />   filesys
  文gpȝ驱动E序?br />   state= {active | inactive | all}
  指定要枚丄服务的已开始状态。默认状态是 active?
  active
  指定所有的zd服务?br />   inactive
  指定所有暂停或停止的服务?br />   all
  指定所有服务?br />   bufsize= BufferSize
  以字节ؓ单位指定枚D~冲区的大小。默认大ؓ 1024 字节?br />   ri= ResumeIndex
  指定开始或l箋枚D的烦引号。默认gؓ 0?br />   group= GroupName
  指定要枚丄服务l。默认设|ؓ所有组?br />   备注
  如果参数及其g间没有空|Q例如,?type= ownQ而不?type=ownQ,则操作会p|?br />   queryex 操作可以昄有关服务的下列信息:SERVICE_NAMEQ服务的注册表子名Q、TYPE、STATEQ以及不可用的状态)、WIN32_EXIT_B、SERVICE_EXIT_B、CHECKPOINT、WAIT_HINT、PID ?FLAGS?br />   在某些情况下Qtype= 参数可以使用两次。type= 参数的第一ơ出现指定是否查询服务、驱动器或所有这些项。type= 参数的第二次出现指定一个由 create 操作q一步羃查询范围的cd?br />   ?queryex 命o的显C结果超q了枚D~冲区的大小Ӟ昄cM于以下内容的消息Q?
  Enum: more data, need 2130 bytes start resume at index 75
  要显C剩余的 queryex 信息Q请重新q行 queryexQ将 bufsize= 讄为所需的字节数Qƈ?ri= 讄为指定的索引。例如,在命令行键入下面的指令会昄剩余的输出:
  sc queryex bufsize= 2130 ri= 75
  下面的示例显CZ如何使用 sc queryex 命oQ?br />   sc queryex messenger
  sc queryex group= ""
  Q0、sc querylock
  查询和显C?#8220;服务控制理?#8221;数据库的锁定信息?br />   语法
  Sc [ServerName] querylock
  参数Q略
  Q1、sc sdset
  使用“服务描述W定义语a (SDDL)”来设|服务的安全描述W?br />   语法
  Sc [ServerName] sdset ServiceName ServiceSecurityDescrīptor
  参数
  ServiceSecurityDescrīptor
  ?SDDL 中指定服务描q符?br />   备注
  有关 SDDL 的详l信息,请参?Microsoft |站上的 Security Descrīptor Definition LanguageQ安全描q符定义语言Q?
  Q2、sc sdshow
  使用 SDDL 昄服务的安全描q符?br />   语法
  Sc [ServerName] sdshow ServiceName
  参数Q略
  备注
  有关 SDDL 的详l信息,请参?Microsoft |站上的 Security Descrīptor Definition LanguageQ安全描q符定义语言Q?
  CZ
  sc sdshow rpcss
  Q3、sc start
  启动正在q行的服务?br />   语法
  Sc [ServerName] start ServiceName [ServiceArguments]
  参数
  ServiceArguments
  指定传递给要启动的服务的服务参数?br />   下面的示例显CZ如何使用 sc start 命oQ?br />   sc start tapisrv
  Q4、sc stop
  向服务发?STOP 控制h?br />   语法
  Sc [ServerName] stop ServiceName
  参数Q略
  备注
  q所有服务都能够被停止?br />   下面的示例显CZ如何使用 sc stop 命oQ?br />   sc stop tapisrv


]]>
xp安装Q卸载服?/title><link>http://www.aygfsteel.com/xiaomage234/archive/2008/10/15/234364.html</link><dc:creator>马?/dc:creator><author>马?/author><pubDate>Wed, 15 Oct 2008 01:39:00 GMT</pubDate><guid>http://www.aygfsteel.com/xiaomage234/archive/2008/10/15/234364.html</guid><wfw:comment>http://www.aygfsteel.com/xiaomage234/comments/234364.html</wfw:comment><comments>http://www.aygfsteel.com/xiaomage234/archive/2008/10/15/234364.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xiaomage234/comments/commentRss/234364.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xiaomage234/services/trackbacks/234364.html</trackback:ping><description><![CDATA[<p>SC命o是XPpȝ中功能强大的DOS命o,SC命o能与“服务控制?#8221;和已安装讑֤q行通讯?br /> 安装服务Qsc create serviceName binPath= "D:\server.exe"        [注意binPath= 之后有一个空|必须有]</p> <p>卸蝲服务Qsc delete serviceName</p> <p>or check HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServices </p> <p>以上修改要重h器才能生?br /> <br /> 另:<br /> 启动服务Qnet start serviceName 或sc start serviceName <br /> 停止服务Qnet stop serviceName 或sc stop serviceName <br /> <br /> [SC命o 的参数可以配|指定的服务Q检索当前服务的状态,也可以停止和启动服务Q功能上cMNET STOP/START命oQ但SC速度更快且能停止更多的服务)。]<br /> </p> <img src ="http://www.aygfsteel.com/xiaomage234/aggbug/234364.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xiaomage234/" target="_blank">马?/a> 2008-10-15 09:39 <a href="http://www.aygfsteel.com/xiaomage234/archive/2008/10/15/234364.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">¡</a>| <a href="http://" target="_blank">α</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ͭ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">½</a>| <a href="http://" target="_blank">â</a>| <a href="http://" target="_blank">Ҵ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ѳ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ƽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ӻ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ԭ</a>| <a href="http://" target="_blank">̫</a>| <a href="http://" target="_blank">˷</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ĩ</a>| <a href="http://" target="_blank">÷</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">¦</a>| <a href="http://" target="_blank">ͷ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">«Ϫ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ͩ</a>| <a href="http://" target="_blank">ʳ</a>| <a href="http://" target="_blank">ӻ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ˮ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>