Congratulations!
By thinking of the time when it happened, you can probably
work out "who dunnit", e.g.
- Some software installation
- Malware
- Virus infection
- Someone else playing with your machine
- You playing with your machine
"zhongsheng" <(E-Mail Removed)> wrote in message
news:2B6992C8-CDAF-4B4C-9387-(E-Mail Removed)...
> Thank you very much.
>
> I changed that from environment variable table. It works now. I am
> wondering
> how has that happened. I don't believe I have ever touched pathext before
> from neither environment variable nor regedit.
>
> zhongsheng
>
> "Pegasus (MVP)" wrote:
>
>> Your %pathext% lacks the .bat component. You need to restore it here,
>> then reboot the machine:
>> HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
>>
>> You can test this immediately by renaming your batch file to
>> MyTest.cmd. Does this work?
>>
>>
>> "zhongsheng" <(E-Mail Removed)> wrote in message
>> news:F8845F5B-8ADC-4C9E-AB0D-(E-Mail Removed)...
>> > Here it is:
>> >
>> > C:\>set pathext
>> > PATHEXT=.com;.exe;.cmd;.vbs;.js;.jse;.wsf;.wsh;.pl;.pls
>> >
>> > C:\>assoc .bat
>> > .bat=batfile
>> >
>> > Thanks,
>> >
>> > zhongsheng
>> >
>> > "Pegasus (MVP)" wrote:
>> >
>> >> OK. Now what to you see when you open a Command Prompt
>> >> and type these commands:
>> >> set pathext{Enter}
>> >> assoc .bat{Enter}
>> >>
>> >>
>> >> "zhongsheng" <(E-Mail Removed)> wrote in message
>> >> news:E1B62D12-C4EF-47F9-92ED-(E-Mail Removed)...
>> >> > Thanks for the reply,
>> >> >
>> >> > It says:
>> >> >
>> >> > C:\>mytest
>> >> > 'mytest' is not recognized as an internal or external command,
>> >> > operable program or batch file.
>> >> >
>> >> >
>> >> > zhongsheng
>> >> >
>> >> > "Pegasus (MVP)" wrote:
>> >> >
>> >> >>
>> >> >> "zhongsheng" <(E-Mail Removed)> wrote in
>> >> >> message
>> >> >> news:22BF74EC-B90D-47C4-9B91-(E-Mail Removed)...
>> >> >> > Hi,
>> >> >> >
>> >> >> > I have this batch command problem and don't know how to resolve
>> >> >> > it.
>> >> >> >
>> >> >> > For example, I have a batch file called mytest.bat.
>> >> >> >
>> >> >> > It works if I double click it in Windows Explorer
>> >> >> > It works if I type mytest.bat in DOS Window
>> >> >> > It does not work if I just type mytest.
>> >> >> >
>> >> >> > I can't find any reference to this problem. I hope somebody can
>> >> >> > point
>> >> >> > me
>> >> >> > out
>> >> >> > on this. This prevents me from doing lots of stuff.
>> >> >> >
>> >> >> > Thanks,
>> >> >> >
>> >> >> > zhongsheng
>> >> >>
>> >> >> What do you see when you do this:
>> >> >> 1. Create the file c:\MyTest.bat
>> >> >> 2. Put this line inside:
>> >> >> echo Hello world.
>> >> >> 3. Open a Command Prompt (Click Start / Run / cmd {OK}
>> >> >> 4. Type this command:
>> >> >> c:\MyTest {Enter}
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>
|