分类 Windows 下的文章

Tips on using Windows PC

Windows PC

1. Concatenate Multiple Text Files in Windows:

You have a directory full of log files that you want to import into Excel or a database so you can do some processing on them… but there are hundreds of files… how do you make them into a single file?

copy /a *.log aggregate.txt

2. How to delete a large folder of a large number of files?
(1) Command Line:
rmdir /s /q "My Apps"
rmdir /s /q "My Documents"
rmdir /s /q "My Pictures"
rmdir /s /q "My Work Files”


(2) Windows Explorer:
Select the folder and then hold down the Shift key and then Delete. You'll be prompted about permanently deleting the files. No recycle bin should speed this up.

3. How to change Windows Command Line Prompt Default Location?
Run --> regedit.exe
HKEY_CURRENT_USER \ Software \ Microsoft \ Command Processor
Add a new String Value in the right pane:
Name: Autorun
Value: CD /d C:\foldername

Unable to get the project file from the Web server

My environment:
OS: Windows XP
Web Server: IIS 5
.NET Framework: 1.1
IDE: Visual Studio 2003

After moving or copying my code directory, when I tried to open the solution in the Visual Studio 2003, I got an error: "Unable to get the project file form the Web server" as following screenshot.

Unable to get the project file from the Web server

The reason is the Visual Studio cannot open the project file, which is http://localhost/projectName.csproj. I checked all settings of the IIS and permission of files and found nothing was wrong. After several hours struggling, I finally figured out following solution.

I deleted the all files under VSWebCache folder which is under C:\Documents and Settings\my_user_name\. The screenshot is as below. The possible reason is when I copied or moved the code folder, the previously generated runtime chache conflicts with the new code folder's location.

Clear the VSWebCache

IIS: Creating Multiple Web Sites within IIS on (2000 and XP Pro)

In the server versions of Windows, you can have multiple versions of web sites installed into IIS and running simultaneously. You can install and run more than one web site within IIS in the professional version of Windows XP or Windows 2000. You just have to pull a trick to modify the IIS metabase to that it is aware of the additional sites. The user interface does not support creating more than one web site. Also, you still will not be able to have more than one site running at the same time.

To create the second web site:

  • Create a command prompt window.
  • Type "cd \Inetpub\Adminscripts" and press enter.
  • Find out what the highest numbered site you currently have is. You can do that by typing

adsutil.vbs ENUM /P W3SVC

If you have never done this process before, the highest numbered site should be 1.

  • Add one to the highest numbered site. Then run this command:

adsutil.vbs COPY W3SVC/1 W3SVC/x

Where x is replaced by the new numbered site. For example if you run the enum command and the highest numbered site is 4, then type this:

adsutil.vbs COPY W3SVC/1 W3SVC/5

  • Run the IIS Manager. You should find a new site has been created. It will be an exact copy of site #1, so you will need to change a few things. Go into the properties for the web site. Change the site name, and the virtual directory for the root of the web site to point to another location on the hard disk. Usually, you will create a new subdirectory under Inetpub and point the virtual directory at that.
  • To use the site, you must first stop the currently running site, then start the new site.

To delete a site, first stop it if it is running (bad things happen if you don't!). Then type:

adsutil.vbs DELETE W3SVC/x

Where x is the number of the site you want to delete.

You can find the number for an existing web site in IIS Manager by enabling logging and examining the logging properties. The web site number is at the bottom of the dialog.

Windows Run Commands

Windows has a lot of useful commands accessible from Run menu. To invoke the Run box, click on Start button and choose Run, or hold down the Windows key and hit R. Run commands allows simply run applications by typing their name instead of click on an icon. Remember these commands. They can save a lot of your time.

P.S. Some commands may be missed in your system.

Windows Run Command

Command Short description
%allusersprofile% c:\documents and settings\all users
%appdata% c:\documents and settings\%username%\application data
%comspec% command line
%homedrive% installation disk
%homepath% user profile directory (documents and settings\%username%)
%path% system default directories
%programfiles% program files directory
%systemdrive% drive containing the windows root directory
%systemroot% windows directory
%temp% or %tmp% temporary directory, usually c:\documents and settings\%username%\local settings\temp
%userprofile% user profile directory
%windir% windows folder
\ system drive
ac3filter.cpl ac3filter
access.cpl accessibility option control
accwiz accessibility wizard
acrobat adobe acrobat
acrodist adobe distiller
adaptertroubleshooter display adapter troubleshooter
appwiz.cpl add/remove programs control
azman.msc authorization manager
bitlockerwizard bitlocker wizard
calc calculator
certmgr.msc certificate manager
charmap character map
chkdsk check disk utility
ciadv.msc indexing service
cleanmgr disk cleanup utility
cliconfg sql client configaration
clipbrd clipboard viewer
cmd command prompt
colorcpl color management
compmgmt.msc computer management
compmgmtlauncher computer management launcher
conf netmeeting
control access.cpl accessibility options
control admintools administrative tools
control appwiz.cpl,,1 add/remove programs w/add new programs preselected
control appwiz.cpl,,2 add/remove programs w/add remove windows components preselected
control appwiz.cpl,,3 add/remove programs w/set program access & defaults preselected
control color display properties (w/appearance tab preselected)
control control panel
control desktop desktop properties
control folders folder properties
control fonts fonts
control keyboard keyboard properties
control mouse mouse properties
control netconnections network connections
control printers printer and fax options
control schedtasks scheduled tasks
control userpassword2 user accounts
credwiz credential backup and restore wizard
dcomcnfg component services
ddeshare dde share
desk.cpl display properties
devmgmt.msc device manager
dfrg.msc disk defragment
dfrgui defragment user interface
dialer phone dialer
directx.cpl directx control panel
diskmgmt.msc disk management
diskpart disk partition manager
dpinst driver package installer
dpiscaling dpi scaling
drwtsn32 dr. watson system troubleshooting utility
dvdplay dvd player
dxdiag direct x troubleshooter
eudcedit private character editor
eventvwr event viewer
excel microsoft excel
explorer windows explorer
findfast.cpl findfast
firefox firefox browser
firewall.cpl windows firewall
firewallcontrolpanel firewall control panel
firewallsettings firewall settings
fonts fonts folder
freecell free cell card game
frontpg microsoft frontpage
fsmgmt.msc shared folders
fsquirt bluetooth transfer wizard
fvenotify bitlocker notifier
fxscover fax cover sheet editor
gpedit.msc group policy editor
hdwwiz.cpl add new hardware wizard
helpctr help and support center
helppane help pane
hypertrm hyperterminal
icwconn1 internet connection wizard
iexplore internet explorer
iexpress iexpress wizard (self extracting package creator)
imageready adobe imageready
inetcpl.cpl internet properties
inetwiz internet setup wizard
intl.cpl regional and language options
ipconfig /all ip configuration (display connection configuration)
ipconfig /displaydns ip configuration (display dns cache contents)
ipconfig /flushdns ip configuration (delete dns cache contents)
ipconfig /registerdns ip configuration (refreshes dhcp & re-registers dns)
ipconfig /release ip configuration (release all connections)
ipconfig /renew ip configuration (renew all connections)
ipconfig /setclassid ip configuration (modifies dhcp class id)
ipconfig /showclassid ip configuration (display dhcp class id)
iscsicpl iscsi initiator
javaws java control panel
joy.cpl game controllers
jpicpl32.cpl java control panel
logoff logoff from windows
lpksetup language pack installer
lusrmgr.msc local users and groups
magnify windows magnifier
mailto opens default email client
main.cpl mouse properties
mblctr windows mobility center
migwiz files and settings transfer tool
mmsys.cpl multimedia properties control
mobsync microsoft synchronization center
moviemk microsoft movie maker
mrt malicious software removal tool
msaccess microsoft access
msconfig system configuration utility
msdt microsoft support diagnostic tool
mshearts hearts card game
msimn outlook express
msinfo32 system information
msmsgs windows messenger
mspaint microsoft paint
msra remote assistance
mstsc remote desktop
ncpa.cpl network connections
nero nero
netplwiz user accounts
netsetup.cpl network setup wizard
notepad notepad
ntbackup windows backup utility
ntmsmgr.msc removable storage
ntmsoprq.msc removable storage operator requests
nusrmgr.cpl user account management
nvtuicpl.cpl nview desktop manager
odbccp32.cpl odbc data source administrator
optionalfeatures optional features manager
osk on screen keyboard
p2phost people near me
packager object packager
password.cpl password properties
pbrush paint
perfmon performance monitor
photoshop adobe photoshop
pinball pinball game
powercfg.cpl power configuration
powerpnt microsoft powerpoint
prefetch windows prefetcher
presentationsettings presentation settings
printbrmui printer migration
printers printers folder
quicktime.cpl quicktime
quicktimeplayer quicktime player
rasphone remote access phonebook
realplay real player
regedit registry editor
regedit32 registry editor (Windows 2000)
rekeywiz encryption file system
rsop.msc resultant set of policies
sdclt windows backup utility
secpol.msc local security settings
services.msc list of services
sethc accessibility settings
sfc /cachesize=x system file checker utility (set cache size to size x)
sfc /purgecache system file checker utility (purge file cache)
sfc /revert system file checker utility (return scan setting to default)
sfc /scanboot system file checker utility (scan on every boot)
sfc /scannow system file checker utility (scan immediately)
sfc /scanonce system file checker utility (scan once at next boot)
shrpubw windows share creation wizard
shutdown shuts down windows
sigverif file signature verification tool
slui software licensing/windows activation
sndvol sound volume
snippingtool snipping tool (an advanced print screen function)
soundrecorder sound recorder
spider spider solitaire card game
sticpl.cpl scanner and camera control
stikynot sticky notes
sysdm.cpl system properties
sysedit system configuration editor
syskey windows system security tool
system.ini windows loading information
systempropertiesadvanced system properties (advanced preselected)
systempropertiescomputername system properties (computer name preselected)
systempropertiesdataexecutionprevention system properties (data execution prevention preselected)
systempropertieshardware system properties (hardware preselected)
systempropertiesperformance system properties (performance preselected)
systempropertiesprotection system properties (protection preselected)
systempropertiesremote system properties (remote preselected)
tabcal digitizer calibration tool
taskmgr task manager
tcptest tcp tester
telephon.cpl phone and modem options
telnet telnet client
timedate.cpl date and time properties
tourstart windows xp tour wizard
tpminit trusted platform module
tweakui tweak ui
utilman utility manager
verifier driver verifier utility
waaucpl.cpl automatic updates
wab windows address book
wabmig windows address book import utility
wercon problem reports and solutions
wf.msc windows firewall with advanced security
wfs windows fax and scan
wiaacmgr windows picture import wizard
win.ini windows loading information
winchat microsoft chat
winmine minesweeper game
winver windows version
winword microsoft word
wmimgmt.msc windows management infrastructure
wmplayer windows media player
write wordpad
wscui.cpl security center
wuapp windows update app manager
wupdmgr windows update launches
wusa windows standalone update manager