PDA

View Full Version : Running Windows Batch Files



dwkinsey
12-06-2001, 05:45 PM
When I try to execute a batch file under Windows 98SE, I get the message "cannot execute c:\windows\command\start.exe". I recopied the file from a working computer but this did not fix it. Microsoft's web site is useless. Any idea what the problem is?

Smitty
12-06-2001, 07:04 PM
Hi dwkinsey

A couple of ideas that may help....?

Open "command" box, right click MSDOS icon top left corner, open properties, and see if
<font color=green>Prevent MS-DOS based programs from detecting Windows</font color=green> checkbox is ticked.

also probably a good idea to check this site out

<a target="_blank" href=http://www.europe.f-secure.com/v-descs/subseven.shtml>F-Secure</a>

Smitty<P ID="edit"><FONT class="small">Edited by Smitty on 12/06/01 13:06.</FONT></P>

POBrien
12-07-2001, 02:03 AM
backup the [HKEY_CLASSES_ROOT\.bat] and [HKEY_CLASSES_ROOT\batfile] subkeys.

Then...

Copy everything between the lines below into notepad and save the file as fix.reg. Double click the file to add the entries in.

*This may not be the fix but it is a necessary step to ensure that you .bat associations are correct.

__________________________________________________ ___________

REGEDIT4

[HKEY_CLASSES_ROOT\.bat]
@="batfile"

[HKEY_CLASSES_ROOT\batfile]
@="MS-DOS Batch File"
"EditFlags"=hex:00,00,00,00

[HKEY_CLASSES_ROOT\batfile\shell]
@=""

[HKEY_CLASSES_ROOT\batfile\shell\open]
@=""
"EditFlags"=hex:00,00,00,00

[HKEY_CLASSES_ROOT\batfile\shell\open\command]
@="%1 %*"

[HKEY_CLASSES_ROOT\batfile\shell\print]
@=""

[HKEY_CLASSES_ROOT\batfile\shell\print\command]
@="C:\\WINDOWS\\NOTEPAD.EXE /p %1"

[HKEY_CLASSES_ROOT\batfile\shell\edit]
@="&Edit"

[HKEY_CLASSES_ROOT\batfile\shell\edit\command]
@="C:\\WINDOWS\\NOTEPAD.EXE %1"

[HKEY_CLASSES_ROOT\batfile\shell\EditWithVS]
@="&Edit with Visual Studio"

[HKEY_CLASSES_ROOT\batfile\shell\EditWithVS\command]
@="\"C:\\Program Files\\Microsoft Visual Studio\\Common\\IDE\\IDE98\\devenv.exe\" \"%1\""

[HKEY_CLASSES_ROOT\batfile\shell\EditWithVS\ddeexec]
@="Open(\"%1\")"

[HKEY_CLASSES_ROOT\batfile\shell\EditWithVS\ddeexec \application]
@="vstudio"

[HKEY_CLASSES_ROOT\batfile\shell\EditWithVS\ddeexec \topic]
@="system"

[HKEY_CLASSES_ROOT\batfile\shellex]

[HKEY_CLASSES_ROOT\batfile\shellex\PropertySheetHan dlers]

[HKEY_CLASSES_ROOT\batfile\shellex\PropertySheetHan dlers\{86F19A00-42A0-1069-A2E9-08002B30309D}]
@=""

[HKEY_CLASSES_ROOT\batfile\DefaultIcon]
@="C:\\WINDOWS\\SYSTEM\\shell32.dll,-153"

__________________________________________________ ____________

Basemodel
12-10-2001, 06:38 PM
can you paste your batch file on here? maybe the problem is there.

dwkinsey
12-10-2001, 06:54 PM
I was able to determine that start.exe gave the same error message when I typed "start /?" as it did when attempting to run a program. The problem could not lie with the batch file since my organization runs the same batch file on nearly every PC that we have (&gt;2000) and also it runs from a file server rather than from the local PC.