Archives

April 2004 (7)
March 2004 (12)
February 2004 (12)
January 2004 (22)
December 2003 (19)
November 2003 (16)
October 2003 (26)
September 2003 (18)
August 2003 (38)
July 2003 (80)
June 2003 (13)
May 2003 (24)
April 2003 (76)
March 2003 (75)
February 2003 (51)
January 2003 (73)

Category

Family (5)
FYI (18)
Games (2)
Geek (88)
Geographic (3)
Hacks (13)
Home (15)
Humor (54)
Ideas (20)
Ideaspace (15)
Local (15)
Metadata (10)
Microsoft (2)
MovableType (5)
Nitwits (66)
PKI (2)
Politics (22)
Quotes (3)
RDF (15)
RSS (4)
Security (3)
Semantic Web (13)
Site Info (13)
Social Networks (1)
Spam (9)
Sysadmin (1)
Tips (2)
Tivo (2)
TMFTOTHD (1)
To Do (1)
Unlisted (1)
Web (3)
Windows (1)

Local

« MetroBlogs »
DC metroblogs
beltway bloggers

Links


Assorted bits

Blogroll Me!
GeoURL
Listed on BlogShares




July 25, 2003

Windows CMD autorun

Here's a useful hack. Edit the registry on your Windows 2000 (or XP) box so that it will automatically do something when you open a command prompt.

Find the HKEY_CURRENT_USER\Software\Microsoft\Command Processor subtree. Add a REG_SZ value to it. Name that string Autorun and enter the value CD \somedirectory but replace somedirectory with a path that's appropriate on your machine. I've got a \temp directory so I use that path. Also note you can have it perform multiple commands using a syntax like "D: & CD \temp" and that will change to the D: drive and then switch into the D:\temp directory.

Note that you can add this value in the [HKEY_USERS].Default or even the [HKEY_LOCAL_MACHINE] subtrees. Add it to the .Default tree and any new local users to the box would get it added into their subtree. For folks using Active Directory and profiles this probably wouldn't be very useful. There are ways, using domain profiles, to accomplish this but they're a bit more involved. Adding it to the Local Machine substree has the effect of forcing the setting for anyone using the box. I'm not sure that's such a good idea.

This could be configured into a .reg file that users could simple double-click and get it automagically loaded into their subtree. Since the directory pathname is unlikely to be the same on your machines as mine I'm not going to post one here. Besides, this is one of those situations where knowing what you're doing IS IMPORTANT.

As always, no guarantees here folks, you get this wrong and there's no telling what damage you'd be causing to your machine. Proceed with care.


Perma  | Comments (1) | TrackBack (0) | 12:45 PM  | xml
Comments

When i use cmd command prompt it should automatically go to the set path.it's not happening like that.Inorder to get that what are setting.

Posted by: Syed on September 29, 2003 09:50 PM
Post a comment






* if you do not leave a valid e-mail or URL your comment may be deleted *







Navigation

Recent Entries

America and Europe: Vive la différence?
Server changes afoot
Diet behavior mod
Googling for sensitive info
Outlook 2003 and IMAP, a marriage made in Hell
Bike to Work Day, May 7th
Speakeasy rocks
Zippo USB?
When geographic data is nowhere 'near' correct
Local campaign contributions

User comments
Trackbacks

Contact

send me an e-mail E-mail
chat with me using MS messenger MSN Messenger
chat with me via AIM America Online
chat with me on ICQ ICQ
chat with me on Yahoo! Yahoo
Add my vCard to your electronic addressbook vCard
Friend of a Friend FoaF

Syndication

XML  RDF  CDF

Comments

XFML

Extra Stuff

foaf
vCard
pgp info
Linked In
Powered by
Movable Type 2.64