The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Unable to launch notepad from 'Run' or view HTML source

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
David Cumps

Posts: 319
Nickname: cumpsd
Registered: Feb, 2004

David Cumps is a Belgian Student learning .NET
Unable to launch notepad from 'Run' or view HTML source Posted: Jun 9, 2004 10:11 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by David Cumps.
Original Post: Unable to launch notepad from 'Run' or view HTML source
Feed Title: David Cumps
Feed URL: http://weblogs.asp.net/cumpsd/rss?containerid=12
Feed Description: A Student .Net Blog :p
Latest .NET Buzz Posts
Latest .NET Buzz Posts by David Cumps
Latest Posts From David Cumps

Advertisement
Today I experienced something weird.
Normally I run a lot of files just from 'Run' (Win+R), but today I did 'Run', 'notepad', and nothing happened...

This was weird.. As I could still open .txt files with Notepad.
I could not run notepad from 'Run'! I was amazed, I mean,.. what could break notepad? :)

First I checked if the file was still there (ofcourse, how could I still view files otherwise..), and if my PATH variable still included Windows. Everything seemed ok.

But then I found it, it only seemed as I could not run notepad.

What happened was the following: There was a notepad.com file in the system32 dir all of the sudden (spyware, virus, don't know). And Windows decided to run that one instead of notepad.exe

So it seems Windows prefers .com over .exe when trying to run a file without an extension.

Why does this happen?

There's another environment variable, called PATHEXT, with the following data:

PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH

Now you can clearly see the order of the files. I tried the same thing with a .bat and .exe file, and changing the env var, and it worked.

I'm not sure if the .COM has to be the first in line for normal system operations?

One side-effect of this was that when I wanted to View Source of a HTML page, it would also launch the notepad.com which did nothing, and thus not showing any source! I remember a lot of people complaining about not being able to view the source of their pages, this could be what's causing it!

Hopefully I'm telling something 'new' here, that's usefull ;) I never knew that order of extensions.

Read: Unable to launch notepad from 'Run' or view HTML source

Topic: Search eBay Using C# Previous Topic   Next Topic Topic: Compaq Loses Another Customer Due To Lousy Customer Service

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use