Page 3 of 4 <1234>
Topic Options
#58040 - 2001-08-08 04:30 PM Re: Check for user account
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
adsi is done:
http://kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=3&t=000190
_________________________
!

download KiXnet

Top
#58041 - 2001-08-08 04:40 PM Re: Check for user account
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
It's only part of it ... but you can see the 20 lines'o'code prediction will become true !!!

Have I said yet that we all were pretty f*** without Shawn ???

3 Cheers to SHAWN !!!

[Jochen's asking himself how long S. must be in the business to gain that level of knowledge and think's 'must be since they "de-bugged" their Computers with insect-powder and mouse-traps' ]

_________________________



Top
#58042 - 2001-08-08 04:41 PM Re: Check for user account
Anonymous
Unregistered


There seems be a option too fix this problem.
See two messages above.

[ 08 August 2001: Message edited by: awinkel ]

Top
#58043 - 2001-08-08 04:48 PM Re: Check for user account
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
Have to check this stuff on my home wksta. I can't stand to hear that there just isn't something. remember when my old boss wanted to check the UserMustChangePassOnNextLogon in batch file. I was so stubbern that I made exe that checked it.
stupidity is an infecting deceise!
_________________________
!

download KiXnet

Top
#58044 - 2001-08-08 05:06 PM Re: Check for user account
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
J

LOL - I've been scripting for a little while - do the letters "PDP-11" or "RSX11/M" mean anything to you young pups ?

-Shawn

[ 08 August 2001: Message edited by: Shawn ]

Top
#58045 - 2001-08-08 05:18 PM Re: Check for user account
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
S.

The PDP-11 was (or is) a DEC model that was seen first when I was born ... to say it with B. Adams : Those were the best days of my life !

RSX11/M ... i never heard about that , but hey I know how to search stuff on the web !

......
[lame]

an Operating System ?

[/lame]

-Jochen

_________________________



Top
#58046 - 2001-08-08 05:22 PM Re: Check for user account
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
.... this one's going to beat that classic 'progress bar' thread
_________________________



Top
#58047 - 2001-08-08 05:46 PM Re: Check for user account
Anonymous
Unregistered


Sure, I'm proud to be the starter of it.
Top
#58048 - 2001-08-08 05:57 PM Re: Check for user account
Anonymous
Unregistered


NET USER sucks bigtime.. but still:

It redirects output to CON when it finds a user (where you can pipe to find without any problem), but to the ERROR stream (or whatever the heck that used to be called - Shawn? *grin*).

NET USER nonexistentuser /DOMAIN 1>CON 2>NUL |FIND "whatever" would not return that IRRITATING "username could not be found" message OVER your pipe to FIND

So:

code:
 SHELL '%comspec% /c NET USER WHOEVER /DOMAIN 2>NUL | FIND /c "whatever" | CHOICE /c:01 /n' 

Could set the errorlevel of kix correctly without having to write to a file AND keeping the screen clean.

*phew*

Ramon I-REFUSE-TO-WRITE-DUMMY-FILES de la Fuente
Or should I go for: Ramon I-REFUSE-TO-COOPERATE-IN-ANY-THREAD-LIKE-THE-PROGRESS-BAR-THREAD de la Fuente??

[ 08 August 2001: Message edited by: Fuentez ]

Top
#58049 - 2001-08-08 07:33 PM Re: Check for user account
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
... only 12 , ermmm sorry 11 posts left to beat it
_________________________



Top
#58050 - 2001-08-08 08:20 PM Re: Check for user account
Anonymous
Unregistered


In my opinion still 10.
Wait till I have test it monday, I think many people will react on it.

Top
#58051 - 2001-08-09 10:20 AM Re: Check for user account
Anonymous
Unregistered


*RATATATATATATATAA*
Must.. kill.. this.. thread...


Top
#58052 - 2001-08-09 10:52 AM Re: Check for user account
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK

Why?

[ 09 August 2001: Message edited by: Lonkero ]

_________________________
!

download KiXnet

Top
#58053 - 2001-08-09 11:07 AM Re: Check for user account
Anonymous
Unregistered


I was just completely metally recovered from that MOSNTER thread! I remember it like it was yesterday...

"It started off like any other thread, a simple question and we all expected a simple answer. But then came the big doggs.. with their fancy-schmancy scripting.. and *POW!* off went the topic! Most of us though we'd never see the end of it and I suspect even the hard-core Bulletin Boarders where getting nervous..."
"We lost a lot of newbees and greenhorns on that horrible day - and even though I considered myself to have the marbles to stand such a thread, it proved me wrong... I learned al lot about myself."

Finally, after months of intensive therapy, I return to the Bulletin Board and what do you know?? Another monster thread; In the first week!Makes me wonder though.. maybe it's not a coincicence.. maybe I'm causing all this!

[how's THAT for off-topic babble?? *grin* Please don't take my stars mr.moderator...]

Top
#58054 - 2001-08-10 12:54 AM Re: Check for user account
Anonymous
Unregistered


When I start this thread I throught that I was asking a simple question...
It seems that it was not so simple if I throught.

Top
#58055 - 2001-08-13 01:00 PM Re: Check for user account
Anonymous
Unregistered


Here I'm again.
I have a little problem with the combination of the script and rcmd.exe
When I make a connection to the server with rcmd.exe via the kixtartscript, the script stops.
The script below the rcmd.exe command doesn't execute anymore.
Is there any option to fix this?

Top
#58056 - 2001-08-13 01:06 PM Re: Check for user account
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
you need to do the call to rcmsrvc in that way that it returns back.
rcmd can take commandline like normal %comspec% or you need to say some how in the connection that it needs to stop.
easiest way is to start the rcmd as single line and call it as many times you need to.
_________________________
!

download KiXnet

Top
#58057 - 2001-08-13 01:11 PM Re: Check for user account
Anonymous
Unregistered


I have try it with %comspec% /c but that doesn't work.
Below a part op the script:
code:

SHELL "%comspec% /c c:\tools\rcmd.exe \\taa-fs1"

If Open(1, "c:\klassen.txt") = 0
WHILE @ERROR = 0
$x = ReadLine(1)
SHELL "%comspec% /c net user $klas$counter /domain 2>nul | find /c "succes"| choice /c:01 /n > nul"
IF @error=1
? "User not found"
else
? "user found"
LOOP
$null=Close(1)
ELSE
SELECT


[ 13 August 2001: Message edited by: awinkel ]

Top
#58058 - 2001-08-13 08:56 PM Re: Check for user account
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Sander,

using rcmd in a script would be better fired off with a single command attached :

code:

shell '%Comspec% /C rcmd \\Yourserver yourcommand /yourparams > nul 2>nul'

(This will execute the command line on the remote Server and afterwards closes the rcmd session !)
! : the errorlevel returned is always the errorlevel from rcmd.exe (1 = ok !)


To catch the error of a rcmd'd command you might wanna try this :

code:

shell '%ComSpec% /c (rcmd \\Server command) > nul 2>nul'

@error ?
get $


Untested , cos I'm @home !


Another opportunity might be :

code:

shell '%ComSpec% /c (rcmd \\Server command) |find "Whatever" >nul'
@error ;(of find.exe)
get$

... think You'll have to check what's best !

Have a nice August !
C'ya in September

Jochen

_________________________



Top
#58059 - 2001-08-13 09:31 PM Re: Check for user account
Anonymous
Unregistered


Thanks for your examples.
I will test them tomorrow at work.

Nice holiday

Top
Page 3 of 4 <1234>


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

Who's Online
0 registered and 2366 anonymous users online.
Newest Members
BeeEm, min_seow, Audio, Hoschi, Comet
17882 Registered Users

Generated in 0.062 seconds in which 0.028 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