Page 1 of 1 1
Topic Options
#126756 - 2004-09-16 05:01 AM SHELL Command
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 Offline
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.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#126758 - 2004-09-16 06:31 AM Re: SHELL Command
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
#126759 - 2004-09-16 07:12 AM Re: SHELL Command
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
Just for kicks and giggles...Have you tried using %comspec% instead of hardcoding cmd?

SHELL "%comspec% /C START /MAX /W chkdsk c:"

Top
#126760 - 2004-09-16 07:14 AM Re: SHELL Command
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
Or maybe something even simpler like..

Shell "calc.exe"

Also does the Run command cause the same problems?

Run "calc.exe"

Top
#126761 - 2004-09-16 08:35 AM Re: SHELL Command
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
#126762 - 2004-09-16 12:01 PM Re: SHELL Command
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
you were asked what happens if you run the [censored] on commandline.
you didn't answer.

run your shell stuff on THAT FAILING MACHINE on the COMMAND LINE.
DON'T involve kix, just run that stuff.
then do echo %errorlevel%

does it run?
what is the errorlevel?
_________________________
!

download KiXnet

Top
#126763 - 2004-09-16 12:06 PM Re: SHELL Command
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
and what comes to that help stuff, the support given by this board varies by the person answering to you.
there are vast amount of kixtart beta testers posting on this board and many private-test-round involvers.

about that time wasted, you little hurry aren't you?
you wait for an hour for an answer but it took at least that much to come here to ask it.

in your specific problem, I can say there is not a single known problem with shell or run, thus the problem is not in kix.
that's the starting point, don't resist it.
_________________________
!

download KiXnet

Top
#126764 - 2004-09-17 02:29 AM Re: SHELL Command
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
#126765 - 2004-09-17 02:41 AM Re: SHELL Command
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I suggest you scrub and rebuild. THe problem could be in the reg or a rogue DLL that could take you a long time to hunt down. Your time is probably better spent rebuilding and will leave you with a fresh clean build.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#126766 - 2004-09-17 01:36 PM Re: SHELL Command
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
you don't get me, do you?
a proper check on the machine from the basics would most likely revealed the problem to you in an hour or so.
but you insisting not to even dig in at all but to go the easy way to just rebuild the system... well, it's your problem.

but don't say that I don't get what you say.
what you say is clear and if I would be that kinda person, I would keep on shooting back.

what comes to fixing user's problems, it rarely is dependant of the time it takes.
once you get it worked out, you are praised anyway.
this time, you are just nominated good worker award for overcoming the problem this time.
_________________________
!

download KiXnet

Top
#126767 - 2004-09-19 11:28 PM Re: SHELL Command
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
I have to wonder why you post in a KiXtart forum dedicated to help Kixtart Starters if by your own admission this is not even a KiXtart problem? And then you go off against some of the most respected members of this community whiole still staying on as an anonymous user?

This community is alwasy willing to help others, however, this requires cooperation on both sides. Without in-depth knowledge of your specific problem, the provided answers are the best you can hope for.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.064 seconds in which 0.03 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org