#27514 - 2002-08-22 02:51 PM
Complete Newbie......questions
|
Addict
Getting the hang of it
Registered: 2002-08-22
Posts: 62
Loc: Ohio, US
|
I have a network that runs Windows 95/98 clients and Windows 2000 Server DCs with some Novell servers. I'm not real sure where to begin with this.
First, I'm not acustomed to using 2000 logon scripts. We currently use logon scripts from our Novell servers. I don't really know where to start.
I've written a logon script (just a basic 'net use'), but it doesn't execute on Win9x machines. I've assigned via the AD Users snap-in under Profile. I copied it to the Netlogon share so it replicates itself as well.
Another thing. Any ideas on how to check to see if Kix is installed and if its not to install it? I've got the kix script written, but I just need to get it to execute. I copied all the kix files(kix32.exe, kx16.dll & kx32.dll) to the window/system on my test machine as well. The basic logon batch file does execute on Win2k machines.
Sorry is these seem like dumb questions, but I'm new to this and need a bit of guidance.
|
Top
|
|
|
|
#27516 - 2002-08-22 03:14 PM
Re: Complete Newbie......questions
|
Addict
Getting the hang of it
Registered: 2002-08-22
Posts: 62
Loc: Ohio, US
|
Thanks for the reply. The batch file name is logon.bat. It still doesn't execute on Win9s machines though. Well I'll jsut have to wait for the admins who have Win9x machines to wake . [ 22. August 2002, 15:15: Message edited by: Civic_Addict ]
|
Top
|
|
|
|
#27519 - 2002-08-22 03:24 PM
Re: Complete Newbie......questions
|
Addict
Getting the hang of it
Registered: 2002-08-22
Posts: 62
Loc: Ohio, US
|
Good links. Lots of good info. But my logon script isn't starting at all. Any ideas?
|
Top
|
|
|
|
#27520 - 2002-12-03 05:39 AM
Re: Complete Newbie......questions
|
MCA
KiX Supporter
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
Did you find already a solution? Please return status uodate. People on this board always be glad to help you. Possible your open-end was lost. thanks & greetings.
|
Top
|
|
|
|
#27521 - 2002-12-03 06:44 AM
Re: Complete Newbie......questions
|
Steve M
Fresh Scripter
Registered: 2002-05-08
Posts: 40
Loc: Orange,California
|
Hi Civic_Adict, I am fairly new to kix just like you and instead of me telling you about links and reading the manual I will try to give some guidence to you. I also have an NT win2k servers and Novell servers with win9x and win2k clients. I prefer to use kix on the win9x clients only and the win2k pro boxes I use the native win2k GPO's. To get my win9x clients to work with kix I have 4 scripts total. Logon.bat calls script1.bat wich calls script1.scr and finally that calls the macro.bat The macro the bat is really the only one that I add or edit. All four of these scripts are in the netlogon share. On the user properties for script you must specify the Logon.bat and the rest is taken care of. Below are my scripts that you may copy and make any modifications you need. I hope this will get you started. code:
if "%OS%"=="Windows_NT" goto winnt if exist %windir%\win.com goto BATSTART ;GOTO BATSTART $res=WRITEVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","KixScript","$kixscript","REG_SZ") EXIT :BATSTART
SET KIXDIR=C:\UTILS
REM set the full UNC path to the KiXtart script REM (the Z: drive cannot be used here, it no longer exists when REM the KiXtart script is running from RunOnce) REM SET KIXSCRIPT=%LOGONSERVER%\NETLOGON\script1.scr
REM set the filename of the KiXtart version tag; REM change this name to upgrade to a newer version of KiXtart REM SET KIXVER=KIX347.TAG
REM ---------------------------------------------------------------------
REM if necessary, create destination directory REM IF NOT EXIST %KIXDIR%\NUL MKDIR %KIXDIR%
REM perform a completely new install or upgrade of KiXtart REM if the current version tag can not be found REM IF EXIST %KIXDIR%\%KIXVER% GOTO KIXCOPIED COPY %0\..\KIX32.EXE %KIXDIR% /Y >NUL COPY %0\..\KX16.DLL %KIXDIR% /Y >NUL COPY %0\..\KX32.DLL %KIXDIR% /Y >NUL COPY %0\..\KX95.DLL %KIXDIR% /Y >NUL ECHO. >%KIXDIR%\%KIXVER%
:KIXCOPIED
REM check all KiXtart files individually and restore them REM if something has been deleted accidentally by the user REM IF NOT EXIST %KIXDIR%\KIX32.EXE COPY %0\..\KIX32.EXE %KIXDIR% >NUL IF NOT EXIST %KIXDIR%\KX16.DLL COPY %0\..\KX16.DLL %KIXDIR% >NUL IF NOT EXIST %KIXDIR%\KX32.DLL COPY %0\..\KX32.DLL %KIXDIR% >NUL IF NOT EXIST %KIXDIR%\KX95.DLL COPY %0\..\KX95.DLL %KIXDIR% >NUL
REM use KiXtart to add the KiXtart script to the RunOnce registry key REM IF NOT EXIST %0 GOTO script1 %KIXDIR%\KIX32.EXE %0 $kixscript="%KIXDIR%\KIX32.EXE %KIXSCRIPT%" GOTO script1 :NOEXT %KIXDIR%\KIX32.EXE %0.BAT $kixscript="%KIXDIR%\KIX32.EXE %KIXSCRIPT%" :script1 %0\..\kix32.exe script1.scr EXIT
:winnt
EXIT
code:
? "Setting DOS variables..." SHELL "winset.exe USERNAME=@USERID" SHELL "Winset.exe ADDRESS=@ADDRESS" SHELL "Winset.exe COMPUTER=@WKSTA" SHELL "Winset.exe DOMAIN=@DOMAIN" SHELL "Winset.exe COMMENT=@COMMENT" SHELL "Winset.exe FULLNAME=@FULLNAME" SHELL "Winset.exe HOMEDIR=@HOMEDIR" SHELL "Winset.exe HOMESHR=@HOMESHR" SHELL "Winset.exe LSERVER=@LSERVER" SHELL "Winset.exe PRIV=@PRIV" ? "Done." Call Macro.bat EXIT
code:
SHELL "winset.exe USERNAME=@USERID" BREAK ON ;(re)set Ctrl-C/Break handling COLOR r+/n ; CLS ; small Color b+/n BOX (7,20,17,61,FULL) ; Color w+/n ; IF ((@time > "00:00:00") AND (@time < "12:00:00")) at (9,22) "Good Morning," ELSE IF ((@time >= "12:00:00") AND (@time < "18:00:00")) at (9,22) "Good Afternoon," ELSE at (9,22) "Good Evening," ENDIF ENDIF ; at (10,22) @fullname at (12,22) "Please Wait For Logon script Execution" at (13,22) "Progress"
$drive="\\FS2\"+@userid+chr(36) USE U: $drive SLEEP 5
DelKey("HKEY_CURRENT_USER\Software\KiXtart\TokenCache")
if INGROUP("ESCROW-REO") USE S: /delete /Persistent use S: "\\FS2\REO$" ? "Member of ESCROW-REO group" ENDIF
if INGROUP("ESCROW-UNIT1") USE S: /delete /Persistent use S: "\\FS2\ESCROW-UNIT1$" ? "Member of ESCROW-UNIT1 group" ENDIF
if INGROUP("ESCROW-UNIT2") USE S: /delete /Persistent use S: "\\FS2\ESCROW-UNIT2$" ? "Member of ESCROW-UNIT2 group" ENDIF
if INGROUP("ESCROW-UNIT3") USE S: /delete /Persistent use S: "\\FS2\ESCROW-UNIT3$" ? "Member of ESCROW-UNIT3 group" ENDIF
if INGROUP("ESCROW-UNIT4") USE S: /delete /Persistent use S: "\\FS2\ESCROW-UNIT4$" ? "Member of ESCROW-UNIT4 group" ENDIF
if INGROUP("ESCROW-UNIT5") USE S: /delete /Persistent use S: "\\FS2\ESCROW-UNIT5$" ? "Member of ESCROW-UNIT5 group" ENDIF
if INGROUP("Everyone") ? "Member of Everyone group" USE I: /delete /Persistent use I: "\\FS2\APPS" If Exist ("c:\windows\RD.bat") = 0 If Exist ("c:\windows\RD.pif") = 0 If Exist ("c:\windows\MSTSc.exe") = 0 If Exist ("c:\windows\MSTSCAX.DLL") = 0 copy "\\W2K2\netlogon\RD.BAT" "c:\windows" copy "\\W2K2\netlogon\RD.PIF" "c:\windows" copy "\\W2K2\netlogon\MSTSC.EXE" "c:\windows" copy "\\W2K2\netlogon\MSTSCAX.DLL" "c:\windows" ENDIF ENDIF ENDIF ENDIF ENDIF
if INGROUP("LED") ? "Member of LED group" USE G: /delete /Persistent use G: "\\ATC-CORP\VOL2" USE S: /delete /Persistent use S: "\\FS2\LED$" If Exist ("c:\windows\DESKTOP\TRAKKE~1.PIF") = 0 copy "\\W2K2\netlogon\TRAKKE~1.PIF" "c:\windows\desktop" ;copies Trakker Star shortcut to desktop If Exist ("c:\windows\DESKTOP\TRAKKE~2.PIF") = 0 copy "\\W2K2\netlogon\TRAKKE~2.PIF" "c:\windows\desktop" ;copies Trakker Lend shortcut to desktop If Exist ("c:\windows\DESKTOP\STARDO~1.PIF") = 0 copy "\\W2K2\netlogon\STARDO~1.PIF" "c:\windows\desktop" ;copies Star Docnet shortcut to desktop endif endif endif endif
if INGROUP("REALEC") USE R: /delete /Persistent USE R: "\\FS1\REALEC" ? "Member of REALEC group" endif sleep 5
if INGROUP("TRAKKER") USE L: /delete /Persistent use L: "\\TK2\TRAKKER" ? "Member of Trakker group" ENDIF sleep 5
;if INGROUP("USBANK") ;USE I: /delete /Persistent ;use I: "\\FS2\Apps" ;? "Member of USBANK group" ;USE U: /delete /Persistent ;USE H: $drive ;endif
;if INGROUP("LANEGUIDE") ;USE I: /delete /Persistent ;use I: "\\FS1\LANE GUIDE" ;? "Member of LANEGUIDE group" ;endif
if INGROUP("Domain Admins") ? "Member of Domain Admins group" sleep 5 USE G: /delete /Persistent use G: "\\ATC-CORP\VOL2" USE L: /delete /Persistent use L: "\\TK2\TRAKKER" If Exist ("c:\windows\DESKTOP\TRAKKE~1.PIF") = 0 ;Checks for the existance of Trakker Star shortcut If Exist ("c:\windows\DESKTOP\TRAKKE~2.PIF") = 0 ;Checks for the existance of Trakker Lend shortcut If Exist ("c:\windows\DESKTOP\ESCROW~1.PIF") = 0 ;Checks for the existance of Escrow Docnet shortcut If Exist ("c:\windows\DESKTOP\REOESC~1.PIF") = 0 ;Checks for the existance of Reo Escrow Docnet shortcut If Exist ("c:\windows\DESKTOP\STARDO~1.PIF") = 0 ;Checks for the existance of Star Docnet shortcut
copy "\\W2K2\netlogon\TRAKKE~1.PIF" "c:\windows\desktop" ;copies Trakker Star shortcut to desktop copy "\\W2K2\netlogon\TRAKKE~2.PIF" "c:\windows\desktop" ;copies Trakker Lend shortcut to desktop copy "\\W2K2\netlogon\ESCROW~1.PIF" "c:\windows\desktop" ;copies Escrow Docnet shortcut to desktop copy "\\W2K2\netlogon\REOESC~1.PIF" "c:\windows\desktop" ;copies Reo Escrow Docnet shortcut to desktop copy "\\W2K2\netlogon\STARDO~1.PIF" "c:\windows\desktop" ;copies Star Docnet shortcut to desktop ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF
_________________________
Steve
|
Top
|
|
|
|
#27523 - 2002-12-03 07:42 AM
Re: Complete Newbie......questions
|
MCA
KiX Supporter
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
NTDOC
Before asking a status update: - first we are looking for "owner will receive an email". - secondly we are reading contents very closely. when the combination is unique enough an update can be very interesting. In other situation we try only to complete the answer. A direct feedback isn't real- ly necessary for us.
Steve
A pity is it, when your nice work will get lost. We advise you to create a new topic when you want to share a nice piece of script or other information (f.e. OFF-TOPIC) with us. It makes is also possible that you can monitor with ease reactions.
greetings.
|
Top
|
|
|
|
#27524 - 2002-12-03 02:12 PM
Re: Complete Newbie......questions
|
Addict
Getting the hang of it
Registered: 2002-08-22
Posts: 62
Loc: Ohio, US
|
Whoa. Its back from the dead.
I did finally solve my problem. NT4!!!!!
We have and old NT4 BDC sitting back there. Win9x prefers NT4 over Win2k and my login scripts weren't replicating to that server(and still don't but that's another thing). So to sum it up, Win9x will process the scripts from an NT4 box over Win2k.
Thank you all for the replies. I will definately have more questions as my login script grows.
|
Top
|
|
|
|
#27526 - 2002-12-03 02:37 PM
Re: Complete Newbie......questions
|
Addict
Getting the hang of it
Registered: 2002-08-22
Posts: 62
Loc: Ohio, US
|
In all honesty, I don't know why its still there.
I inherited this network, so I hate to just take it offline. But it will be going away soon regardless. Once my NT4 Terminal Server gets the boot! All hail Citrix...
|
Top
|
|
|
|
#27529 - 2002-12-04 01:06 AM
Re: Complete Newbie......questions
|
Steve M
Fresh Scripter
Registered: 2002-05-08
Posts: 40
Loc: Orange,California
|
sealeopard, my code that copies the pifs to the shortcuts works fine without any problems so I cannot understand why I am getting pounded on my code. I have had people in this newsfroup tell me that this and that code cannot work and believe it or not it does work.
_________________________
Steve
|
Top
|
|
|
|
#27530 - 2002-12-04 01:21 AM
Re: Complete Newbie......questions
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Your code may work is certain cirmstances, but it does need to be reviewed and corrected to work as I think you intended it to work.
For instance: code:
if INGROUP("Everyone") ? "Member of Everyone group" USE I: /delete /Persistent use I: "\\FS2\APPS" If Exist ("c:\windows\RD.bat") = 0 If Exist ("c:\windows\RD.pif") = 0 If Exist ("c:\windows\MSTSc.exe") = 0 If Exist ("c:\windows\MSTSCAX.DLL") = 0 copy "\\W2K2\netlogon\RD.BAT" "c:\windows" copy "\\W2K2\netlogon\RD.PIF" "c:\windows" copy "\\W2K2\netlogon\MSTSC.EXE" "c:\windows" copy "\\W2K2\netlogon\MSTSCAX.DLL" "c:\windows" ENDIF ENDIF ENDIF ENDIF ENDIF
The copy commands will only ever execute when ALL the IF statements return true. Is that what you wanted? If so this does the same thing: code:
if INGROUP("Everyone") ? "Member of Everyone group" USE I: /delete /Persistent use I: "\\FS2\APPS" If Exist ("c:\windows\RD.bat") = 0 and Exist ("c:\windows\RD.pif") = 0 and Exist ("c:\windows\MSTSc.exe") = 0 and Exist ("c:\windows\MSTSCAX.DLL") = 0 copy "\\W2K2\netlogon\RD.BAT" "c:\windows" copy "\\W2K2\netlogon\RD.PIF" "c:\windows" copy "\\W2K2\netlogon\MSTSC.EXE" "c:\windows" copy "\\W2K2\netlogon\MSTSCAX.DLL" "c:\windows" ENDIF ENDIF
Oh and why the Ingroup("Everyone")? If you want everyone then execute the code for everyone without the added overhead of checking a group?
My guess is that you reall want something like: code:
USE I: /delete /Persistent use I: "\\FS2\APPS" If Exist ("c:\windows\RD.bat") = 0 copy "\\W2K2\netlogon\RD.BAT" "c:\windows" Endif If Exist ("c:\windows\RD.pif") = 0 copy "\\W2K2\netlogon\RD.PIF" "c:\windows" Endif If Exist ("c:\windows\MSTSc.exe") = 0 copy "\\W2K2\netlogon\MSTSC.EXE" "c:\windows" Endif If Exist ("c:\windows\MSTSCAX.DLL") = 0 copy "\\W2K2\netlogon\MSTSCAX.DLL" "c:\windows" Endif
[ 04. December 2002, 01:30: Message edited by: Howard Bullock ]
|
Top
|
|
|
|
#27532 - 2002-12-04 01:29 AM
Re: Complete Newbie......questions
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Thanks Les. The code has been corrected.
|
Top
|
|
|
|
#27533 - 2002-12-04 04:06 AM
Re: Complete Newbie......questions
|
Steve M
Fresh Scripter
Registered: 2002-05-08
Posts: 40
Loc: Orange,California
|
LLigetfa, answer to your question about the ;GOTO BATSTART $res=WRITEVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","KixScript","$kixscript","REG_SZ")
I was told the runonce was necessary. Can rem that out?
_________________________
Steve
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 551 anonymous users online.
|
|
|