#114507 - 2004-02-21 12:16 PM
Troubles With Messagebox!
|
msmid
Lurker
Registered: 2004-02-21
Posts: 4
Loc: Leerdam, NL
|
hi,
I made te folowing script with kix. Trying to pop up an messagebox. the mappings are made without a problem but the message box just wont appear!
this is my code trying to display the message box Code:
;welkoms scherm ;-------------------------------------------- MESSAGEBOX ("$Greeting @Fullname,
Welkom Op het netwerk van: MAAN De volgende netwerkschijven zijn verbonden:
$DriveI $DriveJ $DriveK $DriveL $DriveM","Login Script",064,3)
I started the script in my profile path with te folowing: Code:
kix32.exe login.kix
Within my netlogon directory the folowing files are avalible Code:
kix32.exe wkix32.exe kxrpc.exe kix32.dll kx16.dll kx95.dll
what did I do wrong? could anywone help me?
thanx a lot!
Maarten Smid (Netherlands)
_________________________
Left Blank To Save Space...
|
|
Top
|
|
|
|
#114515 - 2004-02-21 09:59 PM
Re: Troubles With Messagebox!
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11628
Loc: CA
|
Hello Maarten and welcome to the board.
Please let us know the following information to better help you.
1. What network type do you have NT or AD 2. What client types do you need to support 9x/NT/2K/XP 3. What version of KiXtart are you using
Here is some example code you can try. Copy the following code to a text file then run from a DOS Console KIX32.EXE NEWFILE.KIX and it should operate for you.
I'm not sure what or where you are defining your variables so I created these to demonstrate their operation. If you have real values for them then you can plug those in as well in the real script. For now, just to demonstrate simply run the code as is below.
Code:
Break On $nul=SetOption('Explicit','On') $nul=SetOption('NoVarsInStrings','On') Dim $DriveI,$DriveJ,$DriveK,$DriveL,$DriveM,$WelkomMSG
;welkoms scherm;-------------------------------------------- $DriveI = 'I: ' $DriveJ = 'J: ' $DriveK = 'K: ' $DriveL = 'L: ' $DriveM = 'M: '
$WelkomMSG = 'Greetings ' + @FullName + @CRLF + 'Welkom Op het netwerk van: MAAN ' + @CRLF + 'De volgende netwerkschijven zijn verbonden: ' + @CRLF + $DriveI + @CRLF + $DriveJ + @CRLF + $DriveK + @CRLF + $DriveL + @CRLF + $DriveM $WelkomMSG = MessageBox($WelkomMSG,'Login Script',64)
|
|
Top
|
|
|
|
#114516 - 2004-02-22 01:48 PM
Re: Troubles With Messagebox!
|
msmid
Lurker
Registered: 2004-02-21
Posts: 4
Loc: Leerdam, NL
|
1) I'am Using Windows2k Advanced Server with Active Directory installed. 2) I'am using Windows 2k and XP clients (both of them don't popup my message box) 3) My Kixstart version is the latest (downloaded it yesterday) (non beta)
tnx a lot!
_________________________
Left Blank To Save Space...
|
|
Top
|
|
|
|
#114518 - 2004-02-22 02:34 PM
Re: Troubles With Messagebox!
|
msmid
Lurker
Registered: 2004-02-21
Posts: 4
Loc: Leerdam, NL
|
This is the full version of my script: Code:
:start ;-------------------------------------------- CLS Break OFF Debug ON
;Time equal with server ;-------------------------------------------- SetTime @lserver
;Global Variables ;-------------------------------------------- $hidden="$$" $ConnectI="NoConnection" $ConnectJ="NoConnection" $ConnectK="NoConnection" $ConnectL="NoConnection" $ConnectM="NoConnection" $Greeting="none"
;printer ;-------------------------------------------- AddPrinterConnection("\\wsrv01\MaanDesk") SetDefaultPrinter("\\wsrv01\MaanDesk")
;HomeDirectory ;-------------------------------------------- use I: /Del $userdir=\\wsrv01\+@USERID+$hidden Use I: $userdir
If @error <> 0 Beep $ConnectI="False" Sleep 2 Else $ConnectI="True" EndIf
;email ;-------------------------------------------- use J: /Del If InGroup("email") $emaildir=\\wsrv01\mail_+@USERID+$hidden Use J: $emaildir EndIf
If @error <> 0 Beep $ConnectJ="False" Sleep 2 Else $ConnectJ="True" EndIf
;K - share ;-------------------------------------------- use K: /Del Use K: "\\wsrv01\Algemeen"
If @error <> 0 Beep $ConnectK="False" Sleep 2 Else $ConnectK="True" EndIf
;L - Share ;-------------------------------------------- use L: /Del Use L: "\\lsrv01\apps"
If @error <> 0 Beep $ConnectL="False" Sleep 2 Else $ConnectL="True" EndIf ;M - Share ;--------------------------------------------- use M: /Del Use M: "\\lsrv01\mp3"
If @error <> 0 Beep $ConnectM="False" Sleep 2 Else $ConnectM="True" EndIf
;web ;-------------------------------------------- If InGroup("Web") Use N: "\\lsrv01\www" Use O: "\\lsrv01\sql" EndIf
;Variabelen ;-------------------------------------------- If $ConnectI="True" $DriveI="- I: Persoonlijke Netwerkschijf" Else $DriveI="" Endif If $ConnectJ="True" $DriveJ="- J: Emaildata Netwerkschijf" Else $DriveJ="" Endif If $ConnectK="True" $DriveK="- K: Algemene Netwerkschijf" Else $DriveK="" If $ConnectL="True" $DriveL="- L: Programma's netwerkschijf" Else $DriveL="" Endif If $ConnectM="True" $DriveM="- M: Muziek netwerkschijf" Else $DriveM="" Endif
;Moment van de dag ;-------------------------------------------- $hour = val (SubStr(@time,1,2))
Select Case $Hour < 6 $Greeting = "Goedenacht" Case $Hour < 12 $Greeting = "Goedemorgen" Case $Hour < 18 $Greeting = "Goedemiddag" Case 1 $Greeting = "Goedenavond" EndSelect
;welkoms scherm ;-------------------------------------------- MESSAGEBOX ("$Greeting @Fullname,
Welkom Op het netwerk van: MAAN De volgende netwerkschijven zijn verbonden:
$DriveI $DriveJ $DriveK $DriveL $DriveM","Login Script",064,3)
_________________________
Left Blank To Save Space...
|
|
Top
|
|
|
|
#114521 - 2004-02-23 08:39 AM
Re: Troubles With Messagebox!
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11628
Loc: CA
|
Here Maarten, give this code a try... You were also missing an ENDIF statement.
Code:
;-------------------------------------------- CLS ; I'd use Break On at least during testing otherwise if you break it will log you off Break On Debug ON Dim $iRC $iRC=SetOption('Explicit','On') $iRC=SetOption('NoVarsInStrings','On') Dim $ConnectI,$ConnectJ,$ConnectK,$ConnectL,$ConnectM, Dim $Greeting,$userdir,$emaildir Dim $DriveI,$DriveJ,$DriveK,$DriveL,$DriveM Dim $Hour,$Msg
;Time equal with server ;-------------------------------------------- SetTime @lserver ? 'Setting Time was: ' + @ERROR + ' ' + @SERROR
;Global Variables ;--------------------------------------------
;Don't need to double up in this case if you use NoVarInStrings option ;$hidden="$$" $ConnectI="NoConnection" $ConnectJ="NoConnection" $ConnectK="NoConnection" $ConnectL="NoConnection" $ConnectM="NoConnection" $Greeting="none"
;printer ;-------------------------------------------- ;AddPrinterConnection("\\wsrv01\MaanDesk") ;SetDefaultPrinter("\\wsrv01\MaanDesk")
;HomeDirectory ;-------------------------------------------- use I: /Del ? 'Deleting I: was: ' + @ERROR + ' ' + @SERROR $userdir='\\wsrv01\'+@USERID+'$' Use I: $userdir ? 'Mapping I: was: ' + @ERROR + ' ' + @SERROR
If @error <> 0 Beep $ConnectI="False" Sleep 2 Else $ConnectI="True" EndIf
;email ;-------------------------------------------- ; Odd logic here, you unmap the J: drive but only remap if in a group use J: /Del ? 'Deleting J: was: ' + @ERROR + ' ' + @SERROR If InGroup("email") $emaildir='\\wsrv01\mail_' + @USERID + '$' Use J: $emaildir ? 'Mapping J: was: ' + @ERROR + ' ' + @SERROR EndIf
If @error <> 0 Beep $ConnectJ="False" Sleep 2 Else $ConnectJ="True" EndIf
;K - share ;-------------------------------------------- use K: /Del ? 'Deleting K: was: ' + @ERROR + ' ' + @SERROR Use K: "\\wsrv01\Algemeen" ? 'Mapping K: was: ' + @ERROR + ' ' + @SERROR
If @error <> 0 Beep $ConnectK="False" Sleep 2 Else $ConnectK="True" EndIf
;L - Share ;-------------------------------------------- use L: /Del ? 'Deleting L: was: ' + @ERROR + ' ' + @SERROR Use L: "\\lsrv01\apps" ? 'Mapping L: was: ' + @ERROR + ' ' + @SERROR
If @error <> 0 Beep $ConnectL="False" Sleep 2 Else $ConnectL="True" EndIf ;M - Share ;--------------------------------------------- use M: /Del ? 'Deleting M: was: ' + @ERROR + ' ' + @SERROR Use M: "\\lsrv01\mp3" ? 'Mapping M: was: ' + @ERROR + ' ' + @SERROR
If @error <> 0 Beep $ConnectM="False" Sleep 2 Else $ConnectM="True" EndIf
;web ;-------------------------------------------- If InGroup("Web") Use N: "\\lsrv01\www" ? 'Mapping N: was: ' + @ERROR + ' ' + @SERROR Use O: "\\lsrv01\sql" ? 'Mapping O: was: ' + @ERROR + ' ' + @SERROR EndIf
;Variabelen ;-------------------------------------------- ;Could also do something like this ;$DriveI=IIf($ConnectI,'- I: Persoonlijke Netwerkschijf',"")
If $ConnectI="True" $DriveI="- I: Persoonlijke Netwerkschijf" Else $DriveI="" Endif
If $ConnectJ="True" $DriveJ="- J: Emaildata Netwerkschijf" Else $DriveJ="" Endif
If $ConnectK="True" $DriveK="- K: Algemene Netwerkschijf" Else $DriveK="" ; Was missing an EndIf EndIf
If $ConnectL="True" $DriveL="- L: Programma's netwerkschijf" Else $DriveL="" Endif If $ConnectM="True" $DriveM="- M: Muziek netwerkschijf" Else $DriveM="" Endif
;Moment van de dag ;-------------------------------------------- $hour = Val(SubStr(@TIME,1,2)) Select Case $Hour < 6 $Greeting = "Goedenacht" Case $Hour < 12 $Greeting = "Goedemorgen" Case $Hour < 18 $Greeting = "Goedemiddag" Case 1 $Greeting = "Goedenavond" EndSelect
;welkoms scherm ;-------------------------------------------- ;welkoms scherm ;-------------------------------------------- $Msg = ''+$Greeting + @FullName +'Welkom Op het netwerk van: MAAN' +'De volgende netwerkschijven zijn verbonden:' + @CRLF + $DriveI + @CRLF + $DriveJ + @CRLF + $DriveK + @CRLF + $DriveL + @CRLF + $DriveM ; Removed the time out from the MessageBox for testing $Msg = MessageBox($Msg,'Login Script',64)
|
|
Top
|
|
|
|
#114523 - 2004-02-23 10:32 PM
Re: Troubles With Messagebox!
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11628
Loc: CA
|
Glad to hear it's working.
You can download a tool from MCA's site that will search for those type of errors for you.
KIXSTRIP
http://home.wanadoo.nl/scripting/
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1188 anonymous users online.
|
|
|