Page 2 of 9 <12345>Last »
Topic Options
#73477 - 2003-02-25 08:50 PM Re: Problem with kixtart and NT4.0
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
dj, get a moment and read what you are said.

from les' post a piece:
quote:
You can do it from "Active Directory Users and Computers".

like you have been told, use logonscripts normally.

they are not wksta-related but domain based and can be done per-user...
or as I did, selected the entire domain from user management and set their logonscript.
_________________________
!

download KiXnet

Top
#73478 - 2003-02-25 08:50 PM Re: Problem with kixtart and NT4.0
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
DJ,
Don't go Ballistic... it was in reference to my post "There have also been scripts posted that will do it for you".
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#73479 - 2003-02-25 09:01 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
Assign the logon.bat to each user in my domain are you serious? Hell yes that's too much considering there are about 1000 users.

If I can assign it to an OU then that is fine. But I tried assigning a logon.bat but for some reason it doesn't run. Maybe I am calling the script incorrectly in the logon.bat

What should it look like?
Considering my many various client OS's.

Top
#73480 - 2003-02-25 09:28 PM Re: Problem with kixtart and NT4.0
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Assigning a proper logonscript to an account (1 or ALL) is a trivial matter in both NT4 and W2K.

But have you seen this thread: Assign script in Group Policy

NT4 policies suck. I would FDISK computers that had them.

[ 25. February 2003, 21:37: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#73481 - 2003-02-25 09:32 PM Re: Problem with kixtart and NT4.0
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
eh?
didn't someone just say that it's no goodie to try with policies?

now you AD dudes got me lost as well.
_________________________
!

download KiXnet

Top
#73482 - 2003-02-25 09:50 PM Re: Problem with kixtart and NT4.0
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Piece of CAKE



BREAK ON
; Example of LDAP call.  GetObject("LDAP://ou=Users,ou=YourBusinessUnit,dc=YourCompany,dc=com")
; You need to know your LDAP connection.  You can maybe find it by checking the propery details on the OU for your users.
$target = GetObject("LDAP://your LDAP details")
$loginscript="yourlogon.bat"
for each $user in $target
  if $user.loginscript <"$loginscript" 
    ? "Current Script for " +$user.name " is: " +$user.loginscript" Should be: " +$loginscript
;    $user.loginscript=$loginscript  ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat.
;    $user.SetInfo    ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat.
  endif
next


Top
#73483 - 2003-02-25 11:37 PM Re: Problem with kixtart and NT4.0
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
A low tech way to do it is to use this JSI tip to generate a list of users:

http://www.jsifaq.com/SUBB/tip0700/rh0748.htm

Then create a command file that reads a user at time & then uses the net command to set the logon script. Then write a calling script that loops through the file with the FOR command.

But personally, I think it might be worth your while to follow through with what NTDOC is offering. I suspect you will get results faster & you move into current technology.
_________________________
Jack

Top
#73484 - 2003-02-26 01:11 AM Re: Problem with kixtart and NT4.0
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
The script above can scan and modify 1,000s of users within a few seconds. A read through, shell to NET, LOOP, etc.. would have to be performed on the PDC/BDC and would take quite a bit longer to do.
Top
#73485 - 2003-02-26 03:57 AM Re: Problem with kixtart and NT4.0
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

We have verify your code with kixstrip tool and
we are missing one ENDIF statement.
We couldn't verify at the moment KiXscripts Editor accept this
code.

code:
 ;**** Created with KiXscripts Editor | http://KiXscripts.com ****
;**** Last Modified on 2/24/2003 at 11:47:08 AM by mmontgomery ****
; Revised By Matthew T. Montgomery (mmontgomery@sussexcounty.net)

;? 'Error = '+@ERROR+' - '+@SERROR
;Error checking per line

;***************************************************************************************************************************
;Copy Kix32.exe and My Computer Information.kix Shortcut To The Client PC's Desktop - For Windows 2000
;***************************************************************************************************************************

;MD c:\Kixscripts
;If NOT Exist('c:\Kixscripts\kix32.exe')
;Copy '\\sussex1\netlogon\Kixtart\kix32.exe' 'c:\Kixscripts'
;EndIf
;If NOT Exist('c:\Kixscripts\My Computer Info.kix')
;Copy '\\sussex1\netlogon\Kixtart\My Computer Information.kix' 'c:\Kixscripts'
;EndIf
$desktop = ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop")
IF NOT Exist('$desktop\My Computer Information.lnk')
COPY '\\sussex1\netlogon\Kixtart\My Computer Information.lnk' '$desktop'
ENDIF


;******************************************************************************
; Check the following key for W2k Machines to make the window not run minimized
;******************************************************************************

IF @dos >= "5.0"
$hklms = 'HKEY_LOCAL_MACHINE\SOFTWARE'
IF 1 <> ReadValue($hklms+"\Microsoft\Windows NT\CurrentVersion\Winlogon", "RunLogonScriptSync")
$ = WriteValue ($hklms+"\Microsoft\Windows NT\CurrentVersion\Winlogon", "RunLogonScriptSync", "1", "REG_DWORD")
ENDIF
ENDIF

;************************************************************
;Windows MessageBox To Greet The User And Display Information
;************************************************************

MessageBox(" Hello @FULLNAME - today is @DAY @MDAYNO @MONTH *** You are logging onto the @DOMAIN Domain *** Your current user rights are @Priv Your Password will expire in @PWAGE days. Host Name: @HOSTNAME IP address: @IPADDRESS0 Your System Specifications = @PRODUCTTYPE, @MHZ Mhz @CPU","Sussex Domain Logon",64,5)

; ------------------------------------------------------------------------
; @MHZ = processor speed
; @CPU = processor type
; @TIME = curent time
; @fullname = shows users full name as entered on Server logon credentials
; @wksta = workstation name as entered on the local PC
; ------------------------------------------------------------------------

;***********************************
; Synchronize Time From "Sussex-DC1"
;***********************************
SETTIME "\\SUSSEX-DC1"

;*****************
;Clears The Screen
;*****************
CLS

;***************************************************
;Disables The Ability To Interrupt The Script Window
;***************************************************
BREAK OFF

;***********************************
;Deletes all currently mapped drives
;***********************************
USE "*" /delete

;*******************************************
; Network Drive Mappings by Group Membership
;*******************************************
IF InGroup('Domain Users')
? 'I: (\\Sussex-FS-1\General)'
USE I: '\\Sussex-FS-1\General'
? 'P: (\\Sussex1\Users\@USERID)'
USE P: '\\Sussex1\USERS\@USERID'
? 'S: (\\Sussex1\Shared)'
USE S: '\\Sussex1\Shared'
ENDIF

IF InGroup('Information Systems')
? 'W: (\\Sussex-FS-2\Information Systems)'
USE W: '\\Sussex-FS-2\Information Systems'
ENDIF

IF InGroup('Mapping And Addressing')
? 'G: (\\Sussex1\Global)'
USE G: '\\Sussex1\Global'
? 'R: (\\Sussex1\ReAddressing)'
USE R: '\\Sussex1\ReAddressing'
? 'V: (\\Sussex1\View)'
USE V: '\\Sussex1\View'
? 'Z: (\\Sussex-fs-1\Aerial_Photos)'
USE Z: '\\Sussex-fs-1\Aerial_Photos'
ENDIF

;************************************
;Printer Mappings by Group Membership
;************************************
IF InGroup('Information Systems')
$rc=AddPrinterConnection("\\Sussex-DC2\IS HP LaserJet 4100tn")
IF $rc=0
? "Adding printer, IS HP LaserJet 4100tn"
$rc=AddPrinterConnection("\\Sussex-DC2\IS HP Color LaserJet 4550")
IF $rc=0
? "Adding printer, IS HP Color LaserJet 4500"
ELSE
? "$$RC = "+$rc
? "@@Error = "+@error
? "@@SError = "+@serror
ENDIF
ENDIF

;**********************************************************************************************
; Checks for Exchange Server Profile, If Not, Creates One (Tested On Windows 2000 Professional)
;**********************************************************************************************
$index = 0
$keyfound = 0

$search_location="HKEY_CURRENT_USER\Software\Microsoft\Windows Messaging Subsystem\Profiles"
IF (KeyExist($search_location) = 1) ; 1 if found
$keyname = EnumKey("HKEY_CURRENT_USER\Software\Microsoft\Windows Messaging Subsystem\Profiles", $index)
WHILE @error = 0
$keyfound = $keyfound + 1
$index = $index + 1
$keyname = EnumKey("HKEY_CURRENT_USER\Software\Microsoft\Windows Messaging Subsystem\Profiles", $index)
LOOP
ELSE
$search_location="HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles"
IF (KeyExist($search_location) = 1) ; 3 if found
$keyname = EnumKey("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles", $index)
WHILE @error = 0
$keyfound = $keyfound + 1
$index = $index + 1
$keyname = EnumKey("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles", $index)
LOOP
ENDIF
; 3 if end
ENDIF
;1 if end


IF $keyfound = 0
$createprofile = @lserver + "\NETLOGON\Profgen.exe " + @lserver + "\NETLOGON\Newprof.exe -P " + @lserver + "\NETLOGON\Custom.prf -X -R -L"
RUN $createprofile
? "Email profile created"
; profgen.exe, newprof.exe and custom.prf can be found at http://www.microsoft.com/downloads/search.asp? in a file called idk99.exe
; or email noelh@clara.net for the files.
ENDIF

;********************************************************
;Script Window Stays Focused For Specified Amount Of Time
;********************************************************
SLEEP 2 ; Wait for 5 sec

;***********************
;Exits The Script Window
;***********************
EXIT

;($begin)
;
; wed 26-feb-2003 03:42:36 (kix 4.20 vs 4.00e)
;
;Informative KIXSTRIP: input=158 output=158 skip=0
;
;Warning KIXSTRIP: 1 error in block structure. missing statement(s).
; - do:until [0:0]
; - for|each:in|to:step|next [0|0:0|0:0|0]
; - function:endfunction [0:0]
; -ERROR- - if:else:endif [12:2:11]
; - select:case:endselect [0:0:0]
; - while:loop [2:2]
;Warning KIXSTRIP: some lines contains errors or possible errors.
;Informative KIXSTRIP: 14 block_structures found.
;Informative KIXSTRIP: no UDF's found.
;Informative KIXSTRIP: no labels found.
;Summary KIXSTRIP: BREAK CALL DEBUG DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE
;Informative KIXSTRIP: 1 BREAK
;Informative KIXSTRIP: 1 EXIT
;Informative KIXSTRIP: 1 RUN
;Informative KIXSTRIP: 1 SLEEP
;Informative KIXSTRIP: 9 USE
;
;($end)
;($begin)
;
;
;($end)

we think that
code:
       IF $rc=0
? "Adding printer, IS HP LaserJet 4100tn"
$rc=AddPrinterConnection("\\Sussex-DC2\IS HP Color LaserJet 4550")
IF $rc=0
? "Adding printer, IS HP Color LaserJet 4500"
ELSE
? "$$RC = "+$rc
? "@@Error = "+@error
? "@@SError = "+@serror
ENDIF

should be
code:
       IF $rc=0
? "Adding printer, IS HP LaserJet 4100tn"
ENDIF
$rc=AddPrinterConnection("\\Sussex-DC2\IS HP Color LaserJet 4550")
IF $rc=0
? "Adding printer, IS HP Color LaserJet 4500"
ELSE
? "$$RC = "+$rc
? "@@Error = "+@error
? "@@SError = "+@serror
ENDIF

greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#73486 - 2003-03-03 10:08 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
code:
   BREAK ON
; Example of LDAP call. GetObject("LDAP://ou=Users,ou=YourBusinessUnit,dc=YourCompany,dc=com")
; You need to know your LDAP connection. You can maybe find it by checking the propery details on the OU for your users.
$target = GetObject("LDAP://your LDAP details")
$loginscript="yourlogon.bat"
for each $user in $target
if $user.loginscript <> "$loginscript"
? "Current Script for " +$user.name " is: " +$user.loginscript+ " Should be: " +$loginscript
; $user.loginscript=$loginscript ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat.
; $user.SetInfo ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat.
endif
next

This code I am not sure how to use.
Is there anyway I could give you information to fill in, the structure is what I am concerned with. To get it right.

Top
#73487 - 2003-03-03 10:24 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
What exactly is the problem with this?

The script is pretty self-explanatory.
_________________________
There are two types of vessels, submarines and targets.

Top
#73488 - 2003-03-03 10:32 PM Re: Problem with kixtart and NT4.0
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
Jens,

I am not sure but I get the impression DJ thinks COM is greek.

DJ,

The latest versions of kixtart allows one to use COM scripting.
You need to install DCOM on Win9x/NT clients to use it (on Win2K/XP/ME I think it comes pre-installed).
We have 2 FAQs on the topic:COM Primer & A FAQ with some COM info links

plus the COM forum is full of tips.

[ 03. March 2003, 22:38: Message edited by: Jack Lothian ]
_________________________
Jack

Top
#73489 - 2003-03-04 02:35 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
The problem with the script is that I am not sure how to figure out the LDAP part.
I looked in AD and don't see anything.

The other thing is...is there an easy way to automatically deploy the dcom if the client doesn't already have it?

Top
#73490 - 2003-03-04 03:37 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
The script is a server script, thus ypour client do not need ADS. You would run your script on one of the Ad servers.

What do you mean by you don't know your AD setup?

The script explains the required parameters explicitly
quote:
GetObject("LDAP://ou=Users,ou=YourBusinessUnit,dc=YourCompany,dc=com")

This cannot be that hard, can it? Somebody must have set up AD, right? And the OUs and DCs shoudl be listed in the AD Manager.
_________________________
There are two types of vessels, submarines and targets.

Top
#73491 - 2003-03-04 03:48 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
I am trying too many things at once. Is the problem. I have passed my deadline on making this work and I am in trouble so to speak.

Essentially what I need to have happen is this.
I need to deploy a logon script by Active Directory Group Policy. I need it to work on 98, NT 4 WS, 2000 Pro and XP Pro clients. That's it. Right now I am only trying to make it work on NT4 WS and it isn't working.

I know it is possible because I have heard of people doing it. I have been searching the forums for many different posts and don't really get what I am looking for. A lot of reading and not much resource. Such as Do this, this, and this. The reply is I did this, this, and this.
Nobody is saying whether it worked or not just more code to try. That is where my frustration is coming from. I am extremely greatful for the help I have received so far. Basically I have the kixtart.kix logon script working fine it is just the deployment part now. I do know if I put it assigned to the user's account in AD it works fine. But there are too many users for me to do that with. So that is why I need to deploy it by OU in AD either by the script or a batch file. Can anyone help me with knowing all of this?

[ 04. March 2003, 16:01: Message edited by: DJ Ballistic ]

Top
#73492 - 2003-03-04 04:09 PM Re: Problem with kixtart and NT4.0
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
The code that has been posted in this thread would solve to problem you are having. Run this code on one of your AD servers. Insert the correct OU and DC, which should be documented in the AD Manager of your AD domain.

I'm sorry if we can't tell you what exactly to put into the GetObject but we didn't set up yoru AD domain. That is something you should have documented somewhere. I also should only take a minute or two to find this in the AD Manager. Then it's just a matter of putting it into the script and running it.

It shouldn't take you mre than five mintes to do all this.
_________________________
There are two types of vessels, submarines and targets.

Top
#73493 - 2003-03-04 04:16 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
Well right now here is what I have

code:
Break ON
; Example of LDAP call. GetObject("LDAP://ou=Users,ou=YourBusinessUnit,dc=YourCompany,dc=com")
; You need to know your LDAP connection. You can maybe find it by checking the propery details on the OU for your users.
$target = GetObject("LDAP://ou=Users,ou=Test,dc=sussexcounty,dc=net")
$loginscript="logon.bat"
For Each $user in $target
If $user.loginscript <> "$loginscript"
? "Current Script for " +$user.name " is: " +$user.loginscript+ " Should be: " +$loginscript
; $user.loginscript=$loginscript ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat.
; $user.SetInfo ; Remove the semi-colon at the front of this line to enable actually resetting the logon bat.
EndIf
Next

I don't know if I changed it to be correct or not. The user is located in the Test OU and the domain is sussexcounty.net

Top
#73494 - 2003-03-04 04:17 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
See I don't want to apply this to the entire domain as of yet because I need to work out all the bugs with the different OS's.

So I am logging in with a test user that is in that Test OU and is a member of the necessary groups I am testing for. I just have to login with this test user on each of these different OS's to make sure it works on every one before changing it to work on the entire domain heirarchy.

And I am still confused as to where that code should go. In my kixtart.kix script? And is there anything special my logon.bat should contain?

[ 04. March 2003, 16:18: Message edited by: DJ Ballistic ]

Top
#73495 - 2003-03-04 04:18 PM Re: Problem with kixtart and NT4.0
Ryan Offline
Fresh Scripter

Registered: 2001-11-11
Posts: 42
Loc: the Netherlands
Just be sure the first script is started. Insert a net send to your computer, like "Net Send %ComputerName% This is a Test !", (this is only for the test). If logon.bat starts kix will also start. But not in your Logon.bat.

You've typed \\sussex1\\NETLOGON, but it should be \\sussex1\NETLOGON. Just be shure that's correct. Otherwise the Kix32 won't be copied and also the script won't be found.

Hope this might help you out!

Top
#73496 - 2003-03-04 04:21 PM Re: Problem with kixtart and NT4.0
DJ Ballistic Offline
Starting to like KiXtart

Registered: 2003-02-21
Posts: 185
See what is happening with the NT 4 is that it acts like it isn't even running the script. It just logs in without any errors or prompts relating to my script. So how can I make sure it is running? I assume in AD it isn't setup right.
Top
Page 2 of 9 <12345>Last »


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

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.078 seconds in which 0.029 seconds were spent on a total of 13 queries. Zlib compression enabled.

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