Page 1 of 1 1
Topic Options
#115783 - 2004-03-09 10:52 PM Shell command issues
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
I am trying to use the following shell command and the return code is not as expected.
Code:
    Shell "CMD NETDOM MOVE " +$Computer +"DOMAIN:HSSOCS USERD:"+$User+" PASSWORDD:"+$Pass



According to the documentation if it was successfull it would return a 0, but I alway's get 0 return code even when it fails.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#115784 - 2004-03-09 10:57 PM Re: Shell command issues
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
So, what is the return code?

Also, why are you hardcoding the command interpreter instead of using %COMSPEC% ?
_________________________
There are two types of vessels, submarines and targets.

Top
#115785 - 2004-03-09 11:10 PM Re: Shell command issues
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
well... since that version netdom only works in XP (and maybe 2k), cmd is the only one that works... and it is shorter than %comspec%


I'm fairly sure cmd is in the path as well...
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#115786 - 2004-03-09 11:14 PM Re: Shell command issues
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
The return code is always 0 no matter what the results.

As for why CMD over comspec, what I am used to typing, and I am using strictly 2K everywhere, and it is in the path but mostly because that is what I am used to typing.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#115787 - 2004-03-10 02:03 AM Re: Shell command issues
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You are missing a space between $Computer and DOMAIN:HSSOCS.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#115788 - 2004-03-10 02:10 AM Re: Shell command issues
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well... to the point of CMD vs. %comspec%, neither is needed for NETDOM to work.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#115789 - 2004-03-10 03:20 PM Re: Shell command issues
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
However, it is a best practice to use %COMSPEC% instead of CMD independent of whether the called application actually needs it or not.
_________________________
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
1 registered (Allen) and 271 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.119 seconds in which 0.095 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