#29697 - 2002-09-26 03:26 PM
INGROUP command will not function
|
surfkat
Fresh Scripter
Registered: 2002-09-26
Posts: 19
Loc: Oxford, UK
|
Hello Folks
I have botched and hacked a script together so I can mount drives on clients machines. The OS are varied, Win95/98 and Win 2000. I have a mixed Domain with ADS running on a few Window 2000 servers with some NT servers.
The script works fine except INGROUP is ingnored on the Windows 2000 client. What am I doing wrong. Also, can I get rid of the
SHELL "Winset.exe HOMEDIR=@HOMEDIR"???
from the top of the script. I believe its just for the WIn95/98 clients. Using Kix2001 v4.11.00
The rest of the script is here:
I have batch script first:
@ECHO OFF Z:\kix32.exe /d script1.scr EXIT
Then this is the script1.scr:
SHELL "winset.exe USERNAME=@USERID" SHELL "Winset.exe HOMEDIR=@HOMEDIR" BREAK ON ;(re)set Ctrl-C/Break handling SMALL ? "HI, @FULLNAME" ? ""@USERID ? ? "Your Logon Server:" @LSERVER ? ? "Your Password is " @PWAGE " Days Old." ? ? "Home Directory Location:" ? @Homeshr "\" @HomeDir ? ? CLS RUN "NET Use F: \\adv***al\apps" RUN "NET Use H: \\adv**ta\apps" SLEEP 5 RUN "NET USE U: \\advglobal\@USERID$" SLEEP 10 If INGROUP("Domain Admins") RUN "Net Use O: \\advmeta\o" ENDIF If INGROUP("Sun") RUN "Net Use S: \\advsun\sun426" ENDIF SLEEP 4 CLS RUN "\\adv***bal\interchk\w95inst\setup.exe -inl -a" RUN "start /wait \\adv***bal\interchk\savagent.exe -update -poll 3600" RUN "\\adv***bal\interchk\run95sag.exe -update" sleep 4 EXIT
If you can help. Much appreciated
Cheers
SurfKat
|
|
Top
|
|
|
|
#29699 - 2002-09-26 03:50 PM
Re: INGROUP command will not function
|
surfkat
Fresh Scripter
Registered: 2002-09-26
Posts: 19
Loc: Oxford, UK
|
Thanks that worked! Cool.
Now I have another problem. I keep getting device in operation errors and some Winset errors both occur on Windows 2000 client. Any ideas?
Cheers
Thats made my day that as!
|
|
Top
|
|
|
|
#29701 - 2002-09-26 03:58 PM
Re: INGROUP command will not function
|
surfkat
Fresh Scripter
Registered: 2002-09-26
Posts: 19
Loc: Oxford, UK
|
A big thumbs up to everyone!
|
|
Top
|
|
|
|
#29702 - 2002-09-26 03:59 PM
Re: INGROUP command will not function
|
surfkat
Fresh Scripter
Registered: 2002-09-26
Posts: 19
Loc: Oxford, UK
|
A big thumbs up to everyone!
I have put
RUN "NET USE "*" /DELETE"
before all the other mount lines.
This get rid of the device in use operation error. Now what do I have to do with WINSET, do I need it for Windows95/98 machine to read the commands?
Cheers
|
|
Top
|
|
|
|
#29703 - 2002-09-26 04:03 PM
Re: INGROUP command will not function
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
don't use run 'net use...' use shell... run will go in it's own process and the script might bump into each other.
use shell or just 'use * /delete /persistent'
|
|
Top
|
|
|
|
#29708 - 2002-09-26 04:25 PM
Re: INGROUP command will not function
|
surfkat
Fresh Scripter
Registered: 2002-09-26
Posts: 19
Loc: Oxford, UK
|
It is getting nice.
It quite warming to know our small planet can work together!
I am just altering the script and checking it.
Thank again.
Should be back in a few moments to tell you how it worked out.
|
|
Top
|
|
|
|
#29709 - 2002-09-26 04:41 PM
Re: INGROUP command will not function
|
surfkat
Fresh Scripter
Registered: 2002-09-26
Posts: 19
Loc: Oxford, UK
|
Thanks guys it works!!!!
Here is the full script, you are wrote.
?''+@ERROR+' - '+@SERROR if @inwin=2 ; winset stuff SHELL "winset.exe USERNAME=@USERID" SHELL "Winset.exe HOMEDIR=@HOMEDIR" endif BREAK ON ;(re)set Ctrl-C/Break handling SMALL ? "HI, @FULLNAME" ? ""@USERID ? ? "Your Logon Server:" @LSERVER ? ? "Your Password is " @PWAGE " Days Old." ? ? "Home Directory Location:" ? @Homeshr "\" @HomeDir ? ? CLS USE "*" /DELETE Use F: \\adv**bal\apps Use H: \\adv**ta\apps SLEEP 5 USE U: \\adv**bal\@USERID$ SLEEP 10 If INGROUP("Domain Admins") Use O: \\adv**ta\o ENDIF If INGROUP("Sun") Use S: \\ad**un\sun426 ENDIF SLEEP 4 CLS EXIT
Not quite sure if I have the correct location for
?''+@ERROR+' - '+@SERROR
Cheers
|
|
Top
|
|
|
|
#29711 - 2002-09-26 04:52 PM
Re: INGROUP command will not function
|
surfkat
Fresh Scripter
Registered: 2002-09-26
Posts: 19
Loc: Oxford, UK
|
Guys
I have a problem! The User drive mapping is not working on either Win98 or Win2K. Any ideas?
Have changed line to:
USE U: \\advglobal\@USERID$$
It worked when I had the line as
RUN "NET USE.... etc
What do you think?
Cheers
|
|
Top
|
|
|
|
#29714 - 2002-09-26 04:59 PM
Re: INGROUP command will not function
|
surfkat
Fresh Scripter
Registered: 2002-09-26
Posts: 19
Loc: Oxford, UK
|
I can confirm
RUN "NET USE U: \\advglobal\@USERID$"
Works.
I have looked at the other bbs messages, and it does seem confusing!
Can anyone suggest a good book covering scripting on Windows machines?
Cheers
Rob
|
|
Top
|
|
|
|
#29715 - 2002-09-26 05:07 PM
Re: INGROUP command will not function
|
surfkat
Fresh Scripter
Registered: 2002-09-26
Posts: 19
Loc: Oxford, UK
|
USE U: "\\advglobal\@USERID$"
Yes this works.
Thanks for all your help.
Have a great weekend
cheers
Rob
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 781 anonymous users online.
|
|
|