How can I make notepad my default text editor

Several hundred users need notepad as their default text editor. I would like a vbscript that does this. I am new to vbscript and currently researching Google. Any help is greatly appreciated.
rrangel8Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill PrewCommented:
What do you mean by "their default text editor"?

If you mean that you want a file with a TXT extension to be opened by Notepad, then that is the Windows default already.  Or has something changed that to a different program, and you want to change it back?

~bp
0
rrangel8Author Commented:
for instance....when clicking a word document I want it to open in Notepad.
0
rrangel8Author Commented:
i am trying not to go to each computer and do the file association thing.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Bill PrewCommented:
From a command line, you can check associations by doing the following:

ASSOC .TXT

and

FTYPE TEXTFILE

What do they report?

~bp
0
Bill PrewCommented:
By a Word document, do you mean a DOC file?  If so opening that in Notepad will not work since it is a binary format understood by the Word application.

~bp
0
Bill PrewCommented:
Typically file associations are easier to manipulate in a BAT script file rather than VBS.  Most VBS solutions I've seen just run the needed command via the shell command, like in this example:

http://www.eggheadcafe.com/aspnet_answers/scriptingVisualBasicscript/Aug2006/post27691751.asp

Here's a related EE posting that might help:

http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_23620805.html

~bp
0
rrangel8Author Commented:

for billprew:

assoc.txt : .txt=textfile
fype textfile: textfile - c:\program files\sapien technologies, inc.....sendtops.exe "%1"
0
rrangel8Author Commented:
Going to a long boring meeting right now....will check back in later. Thank you for your thoughts, it gives me something to think about. A fresh pair of eyes to look at an idea that I didn't think of yet.
0
Bill PrewCommented:
Okay, it would be easy enough to re-associate TXT files with notepad, just do something like:

textfile="%WinDir%\System32\notepad.exe" "%1"

But that won't associate DOC files or other extensions to Notepad, which I think would be a bad idea anyway.

~bp
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rrangel8Author Commented:
THANK YOU FOR YOUR TIME AND CONSIDERATION WITH YOUR ASSISTANCE.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.