Page 1 of 2 12>
Topic Options
#132483 - 2005-01-14 06:11 PM Can't get wkix32.exe to run
athaynes Offline
Fresh Scripter

Registered: 2005-01-14
Posts: 8
I asked this question in the wrong forum, kixforms.org. I got some help, but I still can get this dang thing to run. I have been using kixtart for a couple of years. I am now using kixforms and want to use the wkix32.exe to run a console-less logon script.
I have a windows 2000 server w/ 2000 and xp clients domain.
If I use a batch file called logon.bat:
Code:
 

Echo Off
START /w %WINDIR%\SYSTEM32\WKIX32.EXE %logonserver%\netlogon\logon.kix
Exit


and then put logon.bat in the user profile it works fine, with the exception of opening a console. I know that I can suppress the window with a switch, but I want to be able to use the wkix32.exe with out a batch file since that is the way it is supposed to work.
Here is my logon script
Code:
 

Break On

$System = CreateObject("Kixtart.System")

;*** This is the main form objects and controls************

$Form = $System.Form()
$Form.SysMenu = 0
$Form.Caption = "Company name"
$Form.Width = 500
$Form.Height = 400
$Form.Center
$form.Opacity = 100

;*** This is the label that contains the company logo******

$lblLog = $Form.Label
$lblLog.Location = 5,5
$lblLog.Size = 150,150
$lblLog.borderstyle = 0
$lblLog.Image = "%logonserver%\netlogon\image\logo.jpg"

;*** This lable contain the policy disclaimer**************

$txtEUNA = $Form.Controls.RichTextBox()
$txtEUNA.Location = 237, 5
$txtEUNA.Size = 250, 250
$txtEUNA.ReadOnly = 1
$txtEUNA.WordWrap = 1
$txtEUNA.MultiLine = 1
$txtEUNA.ScrollBars = 2
$txtEUNA.ToolTipText = "Network User Agreement"
$txtEUNA.text = "User agreement text"

$HyperLink = $Form.Controls.HyperLink
$HyperLink.Text = "Google"
$HyperLink.Value = "Http://www.google.com"
$hyperlink.Location = 310, 280

;*** This label displayes the user tips********************

$lblTip = $Form.label
$lblTip.Location = 5,290
$lblTip.Size = 250,70
$lblTip.borderstyle = 0
$lblTip.Text = "Don't eat yellow snow"

$btnAcc = $Form.Button
$btnAcc.Location = 285,335
$btnAcc.Size = 100,25
$btnAcc.Text = Accept
$btnAcc.ToolTipText = "Accept and Continue"
$btnAcc.onclick = "cmdAcc_Click()"

$btnDec = $Form.Button
$btnDec.Location = 385,335
$btnDec.size = 100,25
$btnDec.text = Decline
$btnDec.ToolTipText = "Decline and Logoff"
$btnDec.onclick = "cmdDec_Click()"


$Form.Show
While $Form.Visible
$=Execute($Form.DoEvents)
Loop

Function cmdAcc_Click()
$Form.Hide
EndFunction

;This function will log the user off is they decline the company network policy

Function cmdDec_Click()
$Form.Hide
If @INWIN=2 ;Win9x
Run 'RunDLL32.EXE SHELL32.DLL,SHExitWindowsEx 0'
Else ;Not Win9x
$RC = Logoff(1)
EndIf
Quit 1
EndFunction

Exit 1



if i put Code:
 wkix32.exe %logonserver%\netlogon\logon.kix 

in the users logonscript nothing happens.

Thanks for any help

Top
#132484 - 2005-01-14 06:33 PM Re: Can't get wkix32.exe to run
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, did you try the formal:
wkix32.exe logon.kix
_________________________
!

download KiXnet

Top
#132485 - 2005-01-14 06:39 PM Re: Can't get wkix32.exe to run
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Over at kforg, you said you set RunLogonScriptSync presumably to hold back the desktop until the script finishes. I see from your BATch file you use Start /Wait to hold WKiX32 but if you don't use a batch file, you cannot hold back the desktop. AFAIK, you are stuck between a rock and a really hard place.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#132486 - 2005-01-14 07:13 PM Re: Can't get wkix32.exe to run
athaynes Offline
Fresh Scripter

Registered: 2005-01-14
Posts: 8
I changed the batch file to just
Code:

Echo Off
wkix32.exe logon.kix
exit



The RunLogonScriptSync registry edit works fine, which is just a test until I change the group policy. The script still runs with no problems, but if I put
Code:
 
wkix32.exe logon.kix



in the users logon script it still won't run.

Top
#132487 - 2005-01-14 07:18 PM Re: Can't get wkix32.exe to run
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, how do you call your batch then?
_________________________
!

download KiXnet

Top
#132488 - 2005-01-14 07:18 PM Re: Can't get wkix32.exe to run
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
also, check your eventlog.
_________________________
!

download KiXnet

Top
#132489 - 2005-01-14 07:26 PM Re: Can't get wkix32.exe to run
athaynes Offline
Fresh Scripter

Registered: 2005-01-14
Posts: 8
I call the batch file in the users logon script in the users properties.
Logon.bat now only contains
Code:
Echo Off
WKIX32.EXE logon.kix
Exit


But if i put Code:
WKIX32.EXE logon.kix



inplace of the logon.bat in the users properties, it won't run

Top
#132490 - 2005-01-14 08:12 PM Re: Can't get wkix32.exe to run
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
What if you renamed your login.kix to kixtart.kix and just called wkix32.exe?
Top
#132491 - 2005-01-14 08:19 PM Re: Can't get wkix32.exe to run
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Make sure you don't have something silly like a trailing space.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#132492 - 2005-01-14 08:27 PM Re: Can't get wkix32.exe to run
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ja, you call logon.bat in the users properties, like you already said.
what I actually asked is how. exactly.

also, what is the system you are trying it on?
have you finally checked the eventlog?

_________________________
!

download KiXnet

Top
#132493 - 2005-01-14 09:05 PM Re: Can't get wkix32.exe to run
Anonymous
Unregistered


I think my problem is in the GPO. I looked in the server and several workstation event logs and they are full of GPO related errors. I just started at this new job and i have inherrited severe domain issues. (sysvol directory being deleted, etc.) Is was rebuilt improperly. So I have many other problems I need to resolve, which should correct this. I will be back soon hopefully. Thanks for your help
Top
#132494 - 2005-01-15 04:30 PM Re: Can't get wkix32.exe to run
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Why do you even use a batch file if you don't want a console? As you've already been told, use KIX32.EXE LOGIN.KIX to call the login script or implement registry changes that allow LOGIN.KIX to be used directly via GPO.

See also How-TO: Run KiXtart scripts via LPO/GPO
_________________________
There are two types of vessels, submarines and targets.

Top
#132495 - 2005-01-15 04:54 PM Re: Can't get wkix32.exe to run
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
From my experience, GPO scripts will not run sync, meaning that the desktop will appear before the script completes.

LegalNoticeCaption should IMHO, be applied as a GPO and not as part of the script which would then negate the need for the script to run sync.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#132496 - 2005-01-23 05:01 PM Re: Can't get wkix32.exe to run
athaynes Offline
Fresh Scripter

Registered: 2005-01-14
Posts: 8
I am not running the script from GPO. I checked my event logs and discovered that the SYSVOL directory was somehow fubared. I have repaired all of that and group policy is operational again. Now that I have eliminated the errors in the event logs on both the server and clients, I can get back to the original problem. My domain consists of windows 2000 servers, windows 2000 and XP clients. I am calling the logon script from the users properties. I put logon.bat in the logon script for a users properties and the batch file will call kixtart and run the script, the code for this is already in the thread. The problem that I still can't figure out is that when I replace the logon.bat with Code:
 wkix32.exe logon.kix  

in the users properties, the script will not run. I have tried renaming the .kix file to kixtart.kix, only putting wkix32.exe in the logon script in the users properties. The kixtart files are located in the NETLOGON share, wkix32.exe is copied to the local workstation in the system32 directory. The kixforms.dll is registered on the workstation. I am at a loss with this. I don't understand why it will only execute with a batch file. Thanks again for your help.

Top
#132497 - 2005-01-23 06:15 PM Re: Can't get wkix32.exe to run
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I know you are not running a GPO script. You told me that in your first post. I only mentioned GPO running async cuz Jens mentioned GPO and I know you want your script to run sync.

That puts us back on the topic of sync vs. async. Unless you have abandoned the notion of running your script sync, you are snookered! The only way to run WKix32 sync is to use START /WAIT! I have already told you that. What then is the point of trying to get your script to run without a BATch file?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#132498 - 2005-01-23 06:29 PM Re: Can't get wkix32.exe to run
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
OH, and don't take my word for it, try reading the manual.
Quote:

Note
By default, the Windows version of KiXtart 2001 runs as an asynchronous process. This means that if you start WKIX32.EXE from a batchfile, the batchfile will not wait for KiXtart to exit and will continue processing. This behavior can cause problems if KiXtart is being used as part of the logon process, especially on Windows 9x clients. To prevent these problems, WKIX32.EXE should be started from a batchfile using the START command with the wait option, e.g.: "START /W WKIX32.EXE". Optionally, on Windows NT or higher, you can also specify the /B option with the START command, to prevent the creation of an additional window.



_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#132499 - 2005-01-23 06:32 PM Re: Can't get wkix32.exe to run
athaynes Offline
Fresh Scripter

Registered: 2005-01-14
Posts: 8
I am not sure I follow because I can run Code:
 wkix32.exe logon.kix 

from the batch file without the start /w and it still holds back the desktop until I either accept the EULA. The RunLogonScriptSync reg edit does that.

Top
#132500 - 2005-01-23 06:45 PM Re: Can't get wkix32.exe to run
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well, that has not been my experience and what you say is making a liar out of Ruud.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#132501 - 2005-01-23 06:51 PM Re: Can't get wkix32.exe to run
athaynes Offline
Fresh Scripter

Registered: 2005-01-14
Posts: 8
Well I am going to go to my office and double check everthing in a few minutes. I am pretty sure that you both know a little more about this than I do. I appreciate the help and sorry for being a pain, if I don't seem to make sense.
Top
#132502 - 2005-01-23 07:20 PM Re: Can't get wkix32.exe to run
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Hmmm... now you are starting to cause me to doubt myself. I don't recall when I last tested the async nature of WKiX. Think it may have been with 4.00 and W2K.

Testing now with WKiX 4.23 and XP/SP2, it is making a liar out of both Ruud and I.

DOS BATch Code:
@echo off

echo start
C:\Kix4.23\wkix32.exe C:\KiXscripts\test.kix
echo done
pause



and the KiX Code:
break on

$rc=MessageBox('Hello World','Test')
Exit 0



Damn... I hate being wrong! Anyone get different results?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

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 1198 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.086 seconds in which 0.038 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