MSFN Forum: KiXtart Login Assistance - MSFN Forum

Jump to content



  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

KiXtart Login Assistance Best Practices and functionality questions Rate Topic: -----

#21 User is offline   jftuga 

  • Member
  • PipPip
  • Group: Members
  • Posts: 283
  • Joined: 27-October 05

Posted 10 April 2006 - 02:01 PM

IIRC, I tried @LDRIVE ( or was it @LSERVER ) but it was giving me problems. Permission problems I think. I ran it under the KixTart debugger and noticed that the return codes for WriteProfileString() was giving an access denied error. What I have written was the only way that I could get it to consistently work. Go figure...

As for @TICKS, most, if not all, of our computers get turned off every night.

-John


#22 User is offline   Mordac85 

  • Jack of all trades, master of none
  • PipPipPip
  • Group: Members
  • Posts: 374
  • Joined: 26-January 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 10 April 2006 - 02:12 PM

Sounds like someone doesn't have write perms to one, or all, of those LogonStatus$ shares on your DC's.

#23 User is offline   nmX.Memnoch 

  • MSFN Master
  • Group: Moderator
  • Posts: 2,086
  • Joined: 15-September 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 10 April 2006 - 02:19 PM

That's what I'm saying....this should've worked:

$REWT = "@LSERVER\LogonStatus$\@WKSTA.LOG"


Not that one way is more correct than the other...but that should work.

This post has been edited by nmX.Memnoch: 10 April 2006 - 02:20 PM


#24 User is offline   nmX.Memnoch 

  • MSFN Master
  • Group: Moderator
  • Posts: 2,086
  • Joined: 15-September 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 10 April 2006 - 03:04 PM

View PostMordac85, on Apr 10 2006, 02:17 PM, said:

As a possible mod to nmX.Memnoch's code, you can also run it from your own system against selected systems in an IP range, domain, etc by throwing it into a loop. Which is probably what you want rather than put another item in your login script that may only hit a subset of your systems.


I got bored...

Modified from this example script (after fixing part of it).


Dim $Filter[0]
$Filter[0]="Computers"; Or replace "Computers" with "User" or "Group"

$ou = GetObject("LDAP://CN=users,DC=domainname,DC=com")
$ou.Filter = $Filter[0]

For Each $UserOrGroupOrComputer in $ou
   $WK = "\\" +  Trim(SubStr($UserOrGroupOrComputer.Name,4))
   ? "$WK"
   If Exist("$WK\C$\")
	  "   ONLINE"
	  $X = WriteValue("$WK\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","RunLogonScriptSync","1",REG_DWORD)
	  Select
		 Case @ERROR = 0
			"   UPDATED"
		 Case @ERROR > 0
			"   FAILED WITH @ERROR ERROR CODE"
	  EndSelect
   EndIf
Next

Hmm...thought the CODE tags were supposed to keep things from wrapping?? Anyway, $X = WriteValue through REG_DWORD) should all be on one line.


This will provide the following type of console output for each computer:

\\computername   ONLINE   UPDATED


If the computer isn't online it'll just return the computer name.

Also, in case you don't read the notes on the original script I linked...

CN= should only be used on default AD containers. If you've made a seperate OU for your computers then you should use OU=. For example, if your domain name is domain.com and you're using the default Computers container then use:

CN=Computers,DC=domain,DC=com

But if you've made a new OU called Workstations (because some people like to keep their workstations, laptops, servers, etc, seperate) then you would use:

OU=Workstations,DC=domain,DC=com

This post has been edited by nmX.Memnoch: 10 April 2006 - 03:05 PM


#25 User is offline   Mordac85 

  • Jack of all trades, master of none
  • PipPipPip
  • Group: Members
  • Posts: 374
  • Joined: 26-January 04
  • OS:XP Pro x86
  • Country: Country Flag

Posted 11 April 2006 - 08:13 AM

View PostnmX.Memnoch, on Apr 10 2006, 04:04 PM, said:

I got bored...


Geez, wish I had the time for that. I spent too much time on the board yesterday and am paying for it now. Nice loop tho and you can substitute, or add, any other action to run that against an entire OU. Sweet!

#26 User is offline   nmX.Memnoch 

  • MSFN Master
  • Group: Moderator
  • Posts: 2,086
  • Joined: 15-September 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 11 April 2006 - 08:35 AM

View PostMordac85, on Apr 11 2006, 09:13 AM, said:

View PostnmX.Memnoch, on Apr 10 2006, 04:04 PM, said:

I got bored...


Geez, wish I had the time for that.


:D

It doesn't happen often...besides, I needed the script anyway. :)

#27 User is offline   RIcoh 

  • Group: Members
  • Posts: 1
  • Joined: 17-May 06

Posted 17 May 2006 - 06:03 AM

Hey Memnoch,

have you finished the script that checks computer group membership for mapping printers based on computer location?

Ricoh

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy