Page 1 of 2 12>
Topic Options
#197876 - 2010-02-25 11:41 AM login script problem
mrcosmo Offline
Fresh Scripter

Registered: 2010-02-05
Posts: 14
Loc: nl
Dear all,

im having problems with my login script
no user is getting the welcome message, so i think im having a problem \:\(

i use a login.bat which points to a login kix script.

this worked for 5 years but suddenly it stopped \:\(

anyone can point me out what could be the problem

i am using win2003 ad directory

Top
#197877 - 2010-02-25 11:53 AM Re: login script problem [Re: mrcosmo]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
I am trying to look at your login.bat file, but keep getting "Access Denied" messages.. ;\) Clarvoyance mode isn't working either, so maybe if you post the BAT file, and tell us what version of kix, and what - if anything - changed recently, we'd be able to help more effectively. \:D

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#197878 - 2010-02-25 11:54 AM Re: login script problem [Re: mrcosmo]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Can you post your script (the batch file and the kix file)? It is a bit difficult to say what is going wrong without seeing the code.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#197880 - 2010-02-25 01:30 PM Re: login script problem [Re: Mart]
mrcosmo Offline
Fresh Scripter

Registered: 2010-02-05
Posts: 14
Loc: nl
Hi all,

below is my script, i made some changes becuase its private.
maybe you can see why it doens't run anymore also i am open for corrections.

thx in advance

this is written in my login.bat

 Code:
@echo off
cls
%0\..\kix32 %0\..\kixtart.scr


below is my kixscript

 Code:
SETCONSOLE("HIDE")
SETTIME "*"

$COMP = SUBSTR(@WKSTA,1,2)
$klantnaam="TEST"
$sbeheer="lala"
$tstnr="1214455"

$ASERVER="servera"
$BSERVER="serverb"
$CSERVER="serverc"
$DSERVER="serverd"
$ESERVER="servere"
$FSERVER="serverf"

;client os
if @inwin="1" $os="W2k-NT-XP" 
endif

if @inwin="2" $os="W9x" 
endif


;general mappings

USE H: /d
USE H: "\\$ASERVER\test"
USE S: /d
USE S: "\\$cserver\test2"


IF @inwin="1"
; Printers
;deltree ("HKEY_CURRENT_USER\Printers\Connections")
;addkey ("HKEY_CURRENT_USER\Printers\Connections")
ADDPRINTERCONNECTION("\\$ESERVER\printtest0")
ADDPRINTERCONNECTION("\\$ASERVER\printtest1")
ADDPRINTERCONNECTION("\\$ASERVER\printtest2")
ADDPRINTERCONNECTION("\\$ESERVER\printtest3")
ADDPRINTERCONNECTION("\\$ESERVER\printtest4")
ADDPRINTERCONNECTION("\\$ESERVER\printtest5")
ADDPRINTERCONNECTION("\\$ASERVER\printtest6")
ADDPRINTERCONNECTION("\\$ESERVER\printtest7")
ADDPRINTERCONNECTION("\\$ESERVER\printtest8")
ADDPRINTERCONNECTION("\\$ESERVER\printtest9")
ADDPRINTERCONNECTION("\\$ESERVER\printtest10")
ADDPRINTERCONNECTION("\\$ESERVER\printtest11")
ADDPRINTERCONNECTION("\\$ASERVER\Network FAX for Windows")
ENDIF

IF INGROUP("GG-test")
	USE V: /d
	USE V: "\\$dSERVER\test"
        use o: /d
        use o: "\\$fserver\terttt"
endif

;IF INGROUP("yrdyyd")

;MESSAGEBOX(app test)

;Run \\test\test\tet\test\test.exe

;endif


;test shares

IF INGROUP("test-test")
        USE L: /d
        USE L: "\\$FSERVER\lalalala"
endif

IF INGROUP("test2")
        USE L: /d
        USE L: "\\$FSERVER\lalalalala"
endif

IF INGROUP("fsfsfsfs")
        USE L: /d
        USE L: "\\$FSERVER\dfsdfsdfs"
endif

;tesstttt 2 shares

IF INGROUP("sssssssss")
        USE M: /d
        USE M: "\\$FSERVER\sssssssss"
endif

IF INGROUP("ffffffffffff")
        USE M: /d
        USE M: "\\$FSERVER\fffffffff"
endif

IF INGROUP("ssssssssssssswwwww")
        USE M: /d
        USE M: "\\$FSERVER\swwwww"
endif

IF INGROUP("it")
        USE w: /d
        USE w: "\\$fSERVER\seseseseses"
        USE n: /d
        USE n: "\\$fserver\it$"
endif


IF INGROUP("admin")
        USE L: /d
        USE L: "\\$ESERVER\ADMIN"

endif

IF INGROUP("burp")
        USE i: /d
        USE i: "\\$ESERVER\burp"

IF INGROUP("popop")
        USE M: /d
        USE M: "\\$ESERVER\popop"

endif

IF INGROUP("lolol")
	USE V: /d
	USE V: "\\$ESERVER\lolol"
endif


;IF INGROUP("jhajaja")
;	USE L: /d
;	USE L: "\\$FSERVER\jaja"
;endif

IF INGROUP("uuuuuu")
USE I: /d
USE I: "\\$ASERVER\uuuuuu"
endif




;office2007 standard

;IF INGROUP("office2007")
;run "\\$ESERVER\test\setup.exe /admin update.MSP"
;endif

If InGroup('Office2007')
  'Installing Office 2007' ?
  $Cmd = '\\' + $Server + \test\office2007 standaard\setup.exe /admin update.MSP'
  'Command: ' $Cmd ? ; for debugging
  Run $Cmd
EndIf


IF INGROUP("lalala)
use j: /d
use j: "\\$aserver\lalala$"
endif


IF INGROUP("eeeeee")
run "explorer http://test.nl"
endif

;printer redirection for dos
IF INGROUP("dos")
USE L: /d
USE L: "\\$DSERVER\dos"
USE LPT3: /d
USE LPT3: "\\$ASERVER\PRT003"
endif
IF INGROUP("burp")
USE LPT3: /d
USE LPT3: "\\$ASERVER\burp
endif

;if not exist ("%Windir%\msagent\chars\santa.acs")
;   copy "\\Vdb-dc01\msagent\santa.acs" "%Windir%\msagent\chars\."
;endif


;debug-----------------------------------------------------------------------------------------

;Groet-----------------------------------------------------------------------------------------
IF @TIME<"12:00:00" and @TIME>"06:00:00" $GROET="Goedemorning" GOTO GROET ENDIF
IF @TIME>"12:00:00" and @TIME<"18:00:00" $GROET="Goodmidday" GOTO GROET ENDIF
IF @TIME>"18:00:00" and @TIME<"23:59:00" $GROET="Goodevening" GOTO GROET ENDIF
IF @TIME>"00:01:00" and @TIME<"06:00:00" $GROET="goodnight"  GOTO GROET ENDIF
:GROET

;Dag-------------------------------------------------------------------------------------------
IF @DAY="Sunday"    $DAG="zondag"    GOTO DAG ENDIF
IF @DAY="Monday"    $DAG="maandag"   GOTO DAG ENDIF
IF @DAY="Tuesday"   $DAG="dinsdag"   GOTO DAG ENDIF
IF @DAY="Wednesday" $DAG="woensdag"  GOTO DAG ENDIF
IF @DAY="Thursday"  $DAG="donderdag" GOTO DAG ENDIF
IF @DAY="Friday"    $DAG="vrijdag"   GOTO DAG ENDIF
IF @DAY="Saturday"  $DAG="zaterdag"  GOTO DAG ENDIF
:DAG

;Maand-----------------------------------------------------------------------------------------
IF @MONTHNO="1"  $MAAND="Januari"   GOTO MAAND ENDIF
IF @MONTHNO="2"  $MAAND="Februari"  GOTO MAAND ENDIF
IF @MONTHNO="3"  $MAAND="Maart"     GOTO MAAND ENDIF
IF @MONTHNO="4"  $MAAND="April"     GOTO MAAND ENDIF
IF @MONTHNO="5"  $MAAND="Mei"       GOTO MAAND ENDIF
IF @MONTHNO="6"  $MAAND="Juni"      GOTO MAAND ENDIF
IF @MONTHNO="7"  $MAAND="Juli"      GOTO MAAND ENDIF
IF @MONTHNO="8"  $MAAND="Augustus"  GOTO MAAND ENDIF
IF @MONTHNO="9"  $MAAND="September" GOTO MAAND ENDIF
IF @MONTHNO="10" $MAAND="Oktober"   GOTO MAAND ENDIF
IF @MONTHNO="11" $MAAND="November"  GOTO MAAND ENDIF
IF @MONTHNO="12" $MAAND="December"  GOTO MAAND ENDIF
:MAAND

;Welkom----------------------------------------------------------------------------------------


MESSAGEBOX($GROET+" @FULLNAME 
Het is vandaag "+$DAG+ " @mdayno " +$MAAND+" @year 

U bent ingelogd op computer @WKSTA
van het Domein @domain via server @LSERVER.
,"Welkom op het netwerk van $test",64,8)

EXIT


Edited by Mart (2010-02-25 01:58 PM)
Edit Reason: Added code tags.

Top
#197881 - 2010-02-25 01:38 PM Re: login script problem [Re: mrcosmo]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Argh!! my eyes! Use [ code ] [/ code ] tags :P
Top
#197882 - 2010-02-25 02:02 PM Re: login script problem [Re: Arend_]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
Hi,

you're missing a quote sign after the @LSERVER.

MESSAGEBOX(
$GROET+" @FULLNAME Het is vandaag "+$DAG+" @mdayno " +
$MAAND+" @year U bent ingelogd op computer @WKSTA van het Domein @domain via server @LSERVER.","Welkom op het netwerk van $test",64,8)
_________________________
The Code is out there

Top
#197883 - 2010-02-25 02:03 PM Re: login script problem [Re: DrillSergeant]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Drill beat me to it \:\)

Edited by apronk (2010-02-25 02:03 PM)

Top
#197884 - 2010-02-25 02:06 PM Re: login script problem [Re: Arend_]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Besides that I would change the code to this:
 Code:
$=MessageBox(
$GROET+" "+@FULLNAME+@CRLF+"Het is vandaag "+
$DAG+" "+@mdayno+" "+$MAAND+" "+@year+@CRLF+@CRLF+
"U bent ingelogd op computer "+@WKSTA+" van het Domein "+@domain+
" via server "+@LSERVER+".","Welkom op het netwerk van "+$test,64,8)

Exit 0

Then again there is a whole lot more I would change, so nevermind \:\)


Edited by apronk (2010-02-25 02:09 PM)

Top
#197885 - 2010-02-25 02:14 PM Re: login script problem [Re: Arend_]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
You're missing an ENDIF after the (1st) If Ingroup("burp")

Edited by apronk (2010-02-25 02:17 PM)
Edit Reason: edited because there are 2 times Ingroup("burp")

Top
#197886 - 2010-02-25 02:15 PM Re: login script problem [Re: Arend_]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Fixed the code tags.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#197887 - 2010-02-25 02:30 PM Re: login script problem [Re: Mart]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Optimized the whole code a bit, give it a try:
 Code:
$=SETCONSOLE("HIDE")

Dim $Comp, $klantnaam, $sbeheer, $testnr, $os
$COMP = SUBSTR(@WKSTA,1,2)
$klantnaam="TEST"
$sbeheer="lala"
$tstnr="1214455"

Dim $ASERVER,$BSERVER,$CSERVER,$DSERVER,$ESERVER,$FSERVER
$ASERVER="servera"
$BSERVER="serverb"
$CSERVER="serverc"
$DSERVER="serverd"
$ESERVER="servere"
$FSERVER="serverf"

;client os
If @INWIN="1" $os="W2k-NT-XP" EndIf
If @INWIN="2" $os="W9x" EndIf

;general mappings
Use H: /d
Use H: "\\$ASERVER\test"
Use S: /d
Use S: "\\$cserver\test2"

If @INWIN="1"
  ; Printers
  ;$=DelTree("HKCU\Printers\Connections")
  ;$=AddKey("HKCU\Printers\Connections")
  $=ADDPRINTERCONNECTION("\\$ESERVER\printtest0")
  $=ADDPRINTERCONNECTION("\\$ASERVER\printtest1")
  $=ADDPRINTERCONNECTION("\\$ASERVER\printtest2")
  $=ADDPRINTERCONNECTION("\\$ESERVER\printtest3")
  $=ADDPRINTERCONNECTION("\\$ESERVER\printtest4")
  $=ADDPRINTERCONNECTION("\\$ESERVER\printtest5")
  $=ADDPRINTERCONNECTION("\\$ASERVER\printtest6")
  $=ADDPRINTERCONNECTION("\\$ESERVER\printtest7")
  $=ADDPRINTERCONNECTION("\\$ESERVER\printtest8")
  $=ADDPRINTERCONNECTION("\\$ESERVER\printtest9")
  $=ADDPRINTERCONNECTION("\\$ESERVER\printtest10")
  $=ADDPRINTERCONNECTION("\\$ESERVER\printtest11")
  $=ADDPRINTERCONNECTION("\\$ASERVER\Network FAX for Windows")
EndIf

If InGroup("GG-test")
  Use V: /d
  Use V: "\\$dSERVER\test"
  Use o: /d
  Use o: "\\$fserver\terttt"
EndIf

;test shares

If InGroup("test-test")
  Use L: /d
  Use L: "\\$FSERVER\lalalala"
EndIf

If InGroup("test2")
  Use L: /d
  Use L: "\\$FSERVER\lalalalala"
EndIf

If InGroup("fsfsfsfs")
  Use L: /d
  Use L: "\\$FSERVER\dfsdfsdfs"
EndIf

If InGroup("sssssssss")
  Use M: /d
  Use M: "\\$FSERVER\sssssssss"
EndIf

If InGroup("ffffffffffff")
  Use M: /d
  Use M: "\\$FSERVER\fffffffff"
EndIf

If InGroup("ssssssssssssswwwww")
  Use M: /d
  Use M: "\\$FSERVER\swwwww"
EndIf

If InGroup("it")
  Use w: /d
  Use w: "\\$fSERVER\seseseseses"
  Use n: /d
  Use n: "\\$fserver\it$"
EndIf

If InGroup("admin")
  Use L: /d
  Use L: "\\$ESERVER\ADMIN"
EndIf

If InGroup("burp")
  Use i: /d
  Use i: "\\$ESERVER\burp"
EndIf

If InGroup("popop")
  Use M: /d
  Use M: "\\$ESERVER\popop"
EndIf

If InGroup("lolol")
  Use V: /d
  Use V: "\\$ESERVER\lolol"
EndIf

If InGroup("uuuuuu")
  Use I: /d
  Use I: "\\$ASERVER\uuuuuu"
EndIf

If InGroup('Office2007')
  'Installing Office 2007' ?
  Dim $Cmd
  $Cmd = '\\' + $Server + '\test\office2007 standaard\setup.exe /admin update.MSP'
  'Command: ' $Cmd ? ; for debugging
  Run $Cmd
EndIf

If InGroup("lalala)
  Use j: /d
  Use j: "\\$aserver\lalala$"
EndIf

If InGroup("eeeeee")
  run "explorer http://test.nl"
EndIf

;printer redirection for dos
If InGroup("dos")
  Use L: /d
  Use L: "\\$DSERVER\dos"
  Use LPT3: /d
  Use LPT3: "\\$ASERVER\PRT003"
EndIf

If InGroup("burp")
  Use LPT3: /d
  Use LPT3: "\\$ASERVER\burp
EndIf

;If NOT Exist("%Windir%\msagent\chars\santa.acs")
;   Copy "\\Vdb-dc01\msagent\santa.acs" "%Windir%\msagent\chars\."
;EndIf

;debug-----------------------------------------------------------------------------------------

;Groet-----------------------------------------------------------------------------------------
If @TIME<"12:00:00" AND @TIME>"06:00:00" $GROET="Goedemorning" EndIf
If @TIME>"12:00:00" AND @TIME<"18:00:00" $GROET="Goodmidday" EndIf
If @TIME>"18:00:00" AND @TIME<"23:59:00" $GROET="Goodevening" EndIf
If @TIME>"00:01:00" AND @TIME<"06:00:00" $GROET="goodnight" EndIf

;Dag-------------------------------------------------------------------------------------------
Select
  Case @DAY="Sunday"
    $DAG="zondag"
  Case @DAY="Monday"
    $DAG="maandag"
  Case @DAY="Tuesday"
    $DAG="dinsdag"
  Case @DAY="Wednesday"
    $DAG="woensdag"
  Case @DAY="Thursday"
    $DAG="donderdag"
  Case @DAY="Friday"
    $DAG="vrijdag"
  Case @DAY="Saturday"
    $DAG="zaterdag"
EndSelect

;Maand-----------------------------------------------------------------------------------------
Select
  Case @MONTHNO="1"
    $MAAND="Januari"
  Case @MONTHNO="2"
    $MAAND="Februari"
  Case @MONTHNO="3"
    $MAAND="Maart"
  Case @MONTHNO="4"
    $MAAND="April"
  Case @MONTHNO="5"
    $MAAND="Mei"
  Case @MONTHNO="6"
    $MAAND="Juni"
  Case @MONTHNO="7"
    $MAAND="Juli"
  Case @MONTHNO="8"
    $MAAND="Augustus"
  Case @MONTHNO="9"
    $MAAND="September"
  Case @MONTHNO="10"
    $MAAND="Oktober"
  Case @MONTHNO="11"
    $MAAND="November"
  Case @MONTHNO="12"
    $MAAND="December"
EndSelect

;Welkom----------------------------------------------------------------------------------------
Dim $strMsgHead, $strMsgBody1, $strMsgBody2
$strMsgHead = $GROET+" "+@FULLNAME
$strMsgBody1 = "Het is vandaag "+$DAG+" "+@mdayno+" "+$MAAND+" "+@year
$strMsgBody2 = "U bent ingelogd op computer "+@WKSTA+" van het Domein "+@domain+" via server "+@LSERVER+"."
$=MessageBox($strMsghead+@CRLF+@CRLF+$strMsgBody1+@CRLF+$strMsgBody2,"Welkom op het netwerk van "+$test,64,8)
Exit 0


Edited by apronk (2010-02-25 03:49 PM)
Edit Reason: Added Quote as DrillSergeant pointed out

Top
#197888 - 2010-02-25 02:51 PM Re: login script problem [Re: Arend_]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
btw, there's another single quote sign missing here too:


$Cmd = '\\' + $Server + '\test\office2007 standaard\setup.exe /admin update.MSP'
'Command: ' $Cmd ? ; for debugging
_________________________
The Code is out there

Top
#197890 - 2010-02-25 03:50 PM Re: login script problem [Re: DrillSergeant]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Editted, I never looked at that one. Thx Drill :-)
Top
#197891 - 2010-02-25 03:56 PM Re: login script problem [Re: Arend_]
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
Notepad++ is my colouring friend ;-)
_________________________
The Code is out there

Top
#197901 - 2010-02-26 12:11 AM Re: login script problem [Re: Mart]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Mart - didn't you try the clarivoyance method? I thought it might have been my receptors with all the snow and such. \:D

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#197902 - 2010-02-26 12:16 AM Re: login script problem [Re: Glenn Barnas]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Um, SANITY would have caught those, by the line numbers.. ;\)

Sanity is a UDF that checks the syntax of your script, making sure that paired objects like quotes, parens, and even code sets like If/EndIf all match up. It's a very handy tool to help identify problems like this. Mismatched quotes are probably among the worst, but pairing a For with an EndIf (don't ask) ranks right up there. Sanity finds them all.

You can download Sanity here on KORG or from the Kix library on my web site. It's also part of my Kix development kit.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#197904 - 2010-02-26 08:01 AM Re: login script problem [Re: DrillSergeant]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
 Originally Posted By: DrillSergeant
Notepad++ is my colouring friend ;-)

I still after all those years use plain old notepad :-)

Top
#197905 - 2010-02-26 10:25 AM Re: login script problem [Re: Arend_]
mrcosmo Offline
Fresh Scripter

Registered: 2010-02-05
Posts: 14
Loc: nl
hi all \:\) thx for the script!
im giving it a try now!

just a quick question why

Dim $Comp, $klantnaam, $sbeheer, $testnr, $os

whats DIM ?

Top
#197907 - 2010-02-26 11:14 AM Re: login script problem [Re: mrcosmo]
BradV Offline
Seasoned Scripter
****

Registered: 2006-08-16
Posts: 687
Loc: Maryland, USA
It's in the manual. It is declaring your variables. Not necessarily needed, but when you start getting into more complex scripts with variable scopes it helps a lot. It also helps when you come back to a script after some time (especially if you put in comments for each variable)! \:\)
Top
#197908 - 2010-02-26 12:02 PM Re: login script problem [Re: Glenn Barnas]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
 Originally Posted By: Glenn Barnas
Mart - didn't you try the clarivoyance method? I thought it might have been my receptors with all the snow and such. \:D

Glenn


Nope, my crystal globe is all banged up and new ones are in short supply.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
Page 1 of 2 12>


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

Who's Online
1 registered (Allen) and 641 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.077 seconds in which 0.028 seconds were spent on a total of 14 queries. Zlib compression enabled.

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