#126362 - 2004-09-09 05:32 PM
Re: Problem with shell command
|
Louie
Fresh Scripter
Registered: 2004-09-09
Posts: 12
|
Quote:
sorry if this has been asked/answered already, but is the cmd.exe version same on failing and working system? (didn't see the answer for the SP q either, might have missed it though...)
I started comparing the "bad" system with a "good" one. Both are WinNT 4.0 SP6a. They had different versions of CMD.EXE, though:
Bad: 4.0.1381.273 Good: 4.0.1381.7086
I copied the good system's CMD.EXE to the bad one, overwriting it, and tried the same script (which works on the "good" one just fine). Same thing as before (@ERROR of 255 and no output). I put the "bad" CMD.EXE back on the "bad" system after I was done so I can keep things straight.
So there's still something I'm missing, but it feels like we're getting closer.
|
|
Top
|
|
|
|
#126364 - 2004-09-09 05:40 PM
Re: Problem with shell command
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I have just tried the following code in a test script on my W2K SP4 laptop. All worked as expected and produced the output as expected. I ran KiXtart version 4.02 and 4.22 froma DOS windows interactively.
Code:
Break ON
shell '%COMSPEC% /C net start > services.txt'
exit 1
Code:
Break ON
shell '%COMSPEC% /C net start >services.txt'
exit 1
This code output to the screen. What do you get without redirection?
Code:
Break ON
shell '%COMSPEC% /C net start'
exit 1
[edit]
I see you have supplied OS info and have some that work and other that don't. This definitely seems to be specific to files versions. Good luck is resolving this. Sorry I can't be of assistance as I have no nt4 here.
[/edit]
Edited by Howard Bullock (2004-09-09 05:45 PM)
|
|
Top
|
|
|
|
#126365 - 2004-09-09 06:23 PM
Re: Problem with shell command
|
Louie
Fresh Scripter
Registered: 2004-09-09
Posts: 12
|
Quote:
next question would be. what's the version of shell32.dll on the systems?
Bad: 4.0.1381.332 Good: 4.72.3812.600
|
|
Top
|
|
|
|
#126370 - 2004-09-09 08:09 PM
Re: Problem with shell command
|
Louie
Fresh Scripter
Registered: 2004-09-09
Posts: 12
|
Quote:
What does running WINVER show?
Do you need to update or re-apply your Service Pack 6a ?
Microsoft Windows NT Workstation 4.0.1381 Service Pack 6 Build 1381
I'll look at the SP6a files and see what its version of shell32.dll looks like.
|
|
Top
|
|
|
|
#126374 - 2004-09-09 08:55 PM
Re: Problem with shell command
|
Louie
Fresh Scripter
Registered: 2004-09-09
Posts: 12
|
Quote:
hmmm,
shell32.dll Version: 4.0.1381.332
Products containing this version:
Windows NT 4.0 SP6 Windows NT 4.0 SP6a
shell32.dll Version: 4.72.3812.600
Products containing this version:
[can't seem to find this one listed anywhere, closest one is]
4.72.3612.1700
but looking at the product list, this comes with just about every MS product you can imagine ... question is (i guess) why are these bad machines so out-of-date ?
I found these versions in SP6a and Q299444i (post SP6a security update):
SP6a: 4.0.1381.332 Q299444i: 4.0.1381.7086
I'll look around and see if I can find a system with the same version of shell32.dll/cmd.exe that works and continue from there.
|
|
Top
|
|
|
|
#126375 - 2004-09-13 04:33 PM
Re: Problem with shell command
|
Louie
Fresh Scripter
Registered: 2004-09-09
Posts: 12
|
The problem looks like it's related to the absence of the Post-Windows NT 4.0 Service Pack 6a Security Rollup Package (see KB article 299444) from affected machines. Over 20K have it, and I'm having no problems running the command on them, but around 10K don't and they're the ones with the issue.
Thank you all for helping me work through this!
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
1 registered
(Allen)
and 1198 anonymous users online.
|
|
|