#126756 - 2004-09-16 05:01 AM
SHELL Command
|
Anonymous
Anonymous
Unregistered
|
Can someone please help? There is a machine on my network that will not run SHELL commands from within the KIXTART script. The whole SHELL command just doesn't run. In an attempt to figure out what was wrong, I output the @ERROR variable to the screen BEFORE the SHELL command and AFTER the SHELL command. Before the SHELL command @ERROR was zero, after the command @ERROR was -1. Unless someone out there knows why SHELL would be doing this, I suspect I will have to re-build the whole system, and I don't really want to do that. Before anyone suggests a script problem, I should point out this script runs on EVERY workstation except this one particular one. Any suggestions would be appreciated.
|
|
Top
|
|
|
|
#126757 - 2004-09-16 05:39 AM
Re: SHELL Command
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
What happens when you execute the command directly in a CMD window? What does %errorlevel% show after.
|
|
Top
|
|
|
|
#126758 - 2004-09-16 06:31 AM
Re: SHELL Command
|
Anonymous
Anonymous
Unregistered
|
The commands run fine in a CMD window.
For example:
Take this simple KIX script called TEST.KIX that I created for testing purposes. This file resides in the root of C: on my machine.
SHELL "CMD /C START /MAX /W chkdsk c:"
On my machine (in the root dir of a CMD prompt) I run KIXTART TEST.KIX, and it works just fine.
On the other machine, you do the same thing, it does NOTHING.
@ERROR is ALWAYS -1 on the faulty machine. %errorlevel% is 0
@ERROR on my machine is 0 , and %errorlevel% is 0.
What I am looking for is a cause for SHELL not doing anything at all when called?
|
|
Top
|
|
|
|
#126761 - 2004-09-16 08:35 AM
Re: SHELL Command
|
Anonymous
Anonymous
Unregistered
|
Please, stop looking for faults in the script. It is not the script. The script works fine on hundereds of other computers. This one PC does not run SHELL commands. It doesn't matter what is spawned by the SHELL command - this one computer will not do it. It doesn't matter if using RUN instead of SHELL works or not, I need to use SHELL. Every other computer will run the SHELL command, why not this one? SHELL "and_then_anything_you_like" results in nothing on this one PC. What does it mean when @ERROR is set to -1 after the SHELL command is called? Obviously it means somthing went wrong, but what? Perhaps I am asking the wrong people here. This forum seems to be more full of problems like "this script doesn't work - why?" Where as my problem is a little more complex, my scripts work - an internal KIX command is what is not working here. I have already discussed with this particular user about the possibility of re-imaging his unit, and while not ideal, at the moment seems the only viable option. More than enough time and energy has been spent trying to solve this to no avail. A full system re-build seems the only cost effective option right now. Thanks for trying anyway everyone.
|
|
Top
|
|
|
|
#126764 - 2004-09-17 02:29 AM
Re: SHELL Command
|
Anonymous
Anonymous
Unregistered
|
You just don't get it do you? At NO point did I say there was a problem or a bug with the KIX program itself. I diagnosed that on one machine, ANY SHELL command is effectively ignored by the machine when the script is run. I asked if anyone else has seen this phenomenon or not, and if so, how to go about fixing it. It's NOT the commands that are run within the SHELL that are at fault, it's the SHELL command itself at fault on this particular machine, so please don't criticize me for not stating the result of the command being run outside KIX. I already stated that all SHELL commands were effectively being ignored by the script. There is something wrong with the PC. I was asking if anyone else had seen this before. Obviously not. Thankyou anyway. etc etc. In answer to your statement about wasted time, yes, I am in a hurry. I have a large network of PCs to maintain, and quite frankly, my time would be much better spent doing more important things than trawling message boards and web sites for answers to peculiar problems, and getting bogged down reiterating the problem with people who have not bothered to understand the problem in the first instance. Time is money. A user is being inconvenienced. Yes, i'm in a hurry to fix it so the user is happy and can do his work again. Wouldn't you be in a hurry too? You know users don't you? They are the reason that anyone who works in IT has a job. I am here to help them, and taking a long time to fix a problem is not helping them.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1219 anonymous users online.
|
|
|