Page 1 of 1 1
Topic Options
#138142 - 2005-04-19 03:07 PM Working script stop working after 3 logons
THIEF15 Offline
Fresh Scripter

Registered: 2005-04-04
Posts: 12
I have created a script (with some help from 2 forummods) that does what I want it to do. I can run the script good everytime from my comp (by double clicking the batchfile). Only after the third logon from a laptop I get the following error message.
Code:
In-page IO exception occurred.
This type of exception is thrown by the Windows Memory Manager when it fails
to (re)read code from the KiXtart executable.
Common causes for this exception include:
-running WKIX32 from a batchfile without using START /w
-forced redirection of the network drive from which KiXtart was started
-severe network errors/latency
-faulty anti-virus software


Searching on the error message show me anything like my error (could have searched the wrong way ofcourse). This is my script.
Code:
;*****************
;Wissen oude shares = delete old shares
;*****************
use * /DELETE

;****************
;Uitzoeken welke inlogserver = find out which login server
;*****************
if @lserver='\\server1' ;compare servername
use s: "\\server1\share" ; make share1
use v: "\\server2\share2" ;make share2
$servernaam = 'servername' ;to hide the \\
endif

if @lserver = "\\Server2"
use j: "\\server2\share1"
use k: "\\server2\share2"
use l: "\\server2\share3"
use m: "\\server2\share4"
use s: "\\server2\share5"
use u: "\\server2\share6"
use v: "\\server2\share7"
$servernaam = 'server2'
endif

;*****************
;Laat messagebox zien met loggegevens = show messagebox with logindata
;*****************
Messagebox('Ready to Logon with following information:
Username : @userid
IP : @ipaddress0
Inlogserver : $servernaam
PC naam : @wksta
Domein : @domain','Information',0)

;*****************
;Laat messagebox zien met tekst uit bestand = show messagebox with text out of textfie
;*****************
open (1,"\\server1\Apps\Scripts\test.txt",2)
$x = readline (1)
While @error = 0
? "line read: [" + $x + "]"
Messagebox($x,'Informatie',0)
loop
close (1)



During the login the active directory runs a batchfile with the following in it: \\server1\share\kix32 \\server1\share\login.kix. Anyone have an idea what is wrong?

Thanks in advance,

THIEF15 (the KiXtart newbie/rookie)

Edit: Extra information: the script works again after reboot of the laptop. And its the latest version of KiXtart that i am using.


Edited by THIEF15 (2005-04-21 11:34 PM)

Top
#138143 - 2005-04-19 03:27 PM Re: Working script stop working after 3 logons
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
maybe the line:
use * /DELETE

If you disconnect from the share that is hosting the script, that can happen. When KiX processes through a logon, all NT class machines use UNC and so don't rely on drive letters.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#138144 - 2005-04-19 03:30 PM Re: Working script stop working after 3 logons
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Nevermind... I thought you said it was run by double-clicking.

What OS is the laptop?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#138145 - 2005-04-20 09:48 AM Re: Working script stop working after 3 logons
THIEF15 Offline
Fresh Scripter

Registered: 2005-04-04
Posts: 12
Quote:

Nevermind... I thought you said it was run by double-clicking.

What OS is the laptop?



Both my computer and the laptop is Win2000 with (almost) all windows updates. But after posting the message I also tested logging in 3 times with my pc and then it keeps working like it is supposed to (even after 6 times). Could it be that I had a networkcable and a wireless connection on the laptop (that the KiXtart script try to start 2 times at the same time or something like that)?

Edit: The batch script also has a pause in it to see if everything is going as planned. But I really thing that has nothing to do with the problem (but better give to much information then not enough)


Edited by THIEF15 (2005-04-20 09:54 AM)

Top
#138146 - 2005-04-20 11:42 AM Re: Working script stop working after 3 logons
THIEF15 Offline
Fresh Scripter

Registered: 2005-04-04
Posts: 12
Update: on a different pc (not laptop) it also happens. After that I tried to put the batchfile in the local startup map. Same results. But when i log and the script runs good then I can run the batchfile (shortcut on the desktop with UNC link) as many time as I want to without any problems (10 times). The administrator account doesnt seem to have the problem. Strange that my login (member of administrator group) gives problems too.

Update 2: I have isolated the problem in the line "use * /DELETE". Everytime I remove that line (or put ; in front of it) the script works fine. When I add it again I get the problem again (until i reboot, then it works a few time again). Anyone know what is wrong with it? The users have the right to remove a share so that aint the problem.


Edited by THIEF15 (2005-04-20 02:20 PM)

Top
#138147 - 2005-04-20 03:20 PM Re: Working script stop working after 3 logons
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
You may want to look at your MESSAGEGBOX routine..

Code:

Messagebox('Ready to Logon with following information:
Username
: @userid
IP
: @ipaddress0
Inlogserver
: $servernaam
PC naam
: @wksta
Domein
: @domain','Information',0)



Something more like this:
Code:

Messagebox('Ready to Logon with following information:
Username:'+@userid+
'IP:'+@ipaddress0+
'Inlogserver:'+$servernaam+
'PC naam:'+@wksta+
'Domein:' @domain','Information',0)



Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#138148 - 2005-04-21 11:01 AM Re: Working script stop working after 3 logons
THIEF15 Offline
Fresh Scripter

Registered: 2005-04-04
Posts: 12
Quote:

You may want to look at your MESSAGEGBOX routine..

Something more like this:
Code:

Messagebox('Ready to Logon with following information:
Username:'+@userid+
'IP:'+@ipaddress0+
'Inlogserver:'+$servernaam+
'PC naam:'+@wksta+
'Domein:' @domain','Information',0)



Kent



I tried this code and after debugging (changed "'Domein:' @domain'," to "'Domein:' +@domain,)" I get the message box working only it makes 1 line of the text. Was that the meaning?

Top
#138149 - 2005-04-21 11:12 AM Re: Working script stop working after 3 logons
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
This will put the line feeds back in:
Code:
Messagebox('Ready to Logon with following information:'+@CRLF
+'Username: '+@userid+@CRLF
+'IP:'+@ipaddress0+@CRLF
+'Inlogserver: '+$servernaam+@CRLF
+'PC naam: '+@wksta+@CRLF
+'Domein: '+@domain+@CRLF
,'Information'
,0)


Top
#138150 - 2005-04-21 12:05 PM Re: Working script stop working after 3 logons
THIEF15 Offline
Fresh Scripter

Registered: 2005-04-04
Posts: 12
Quote:

This will put the line feeds back in:
Code:
Messagebox('Ready to Logon with following information:'+@CRLF
+'Username: '+@userid+@CRLF
+'IP:'+@ipaddress0+@CRLF
+'Inlogserver: '+$servernaam+@CRLF
+'PC naam: '+@wksta+@CRLF
+'Domein: '+@domain+@CRLF
,'Information'
,0)





Thanks for the information. But that ain't the solution to my original ploblem. Even with the messageboxes disabled/removed I have the problem that I can only log in once or twice without the error message. The only time when I don't have it is when i disable/remove the "use * /remove" command. Could this be a bug in the newest version?

Top
#138151 - 2005-04-21 01:56 PM Re: Working script stop working after 3 logons
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
You could try removing the network drives individually rather than using "*" - perhaps "*" is dropping IPC connections as well?

Here is an example of how to remove drive mappings using the recently posted EnumNetworkDrives() udf:
Code:
For Each $sDriveMap In EnumNetworkDrives()
If Not @ERROR
$sDriveLetter=Split($sDriveMap,",")[0]
"Removing network mapping '"+$sDriveLetter+"'..."+@CRLF
Use $sDriveLetter /delete /persistent
If @ERROR "Got error ["+@ERROR+"] "+@SERROR+@CRLF EndIf
EndIf
Next

Function EnumNetworkDrives()
Dim $WshNetwork, $oDrives, $i, $DriveArray[0]
$EnumNetworkDrives=""
$WshNetwork = CreateObject("WScript.Network")
If Not @ERROR
$oDrives = $WshNetwork.EnumNetworkDrives
For $i = 0 To $oDrives.Count - 1 Step 2
$DriveArray[Ubound($DriveArray)]=$oDrives.Item($i)+','+$oDrives.Item($i+1)
ReDIM Preserve $DriveArray[UBound($DriveArray)+1]
Next
If UBound($DriveArray) > 0
ReDIM Preserve $DriveArray[UBound($DriveArray)-1]
Else
$DriveArray = 0
EndIf
Else
$EnumNetworkDrives=@ERROR
Exit $EnumNetworkDrives
EndIf
$EnumNetworkDrives=$DriveArray
EndFunction


Top
#138152 - 2005-04-28 09:44 AM Re: Working script stop working after 3 logons
THIEF15 Offline
Fresh Scripter

Registered: 2005-04-04
Posts: 12
I think that the problem is fixed. Apparently the homeshare of the user that I tested with was going to server2. But it couldn't reach server2 from the computers I tested on. So it couldn't make a share and I think thats where the problem came from. Is this posable?

Sorry that I didn't react sooner but was a little busy with another script that had higher priority then this 1.

Edit: Never mind, happened again.


Edited by THIEF15 (2005-04-28 01:46 PM)

Top
#138153 - 2005-04-28 02:06 PM Re: Working script stop working after 3 logons
THIEF15 Offline
Fresh Scripter

Registered: 2005-04-04
Posts: 12
Starting to think it is a use / messagebox conflict. Tested it long with the use commands alone last few days and it didnt gave problems (thats why I thought it was the homeshare problem). So I decided to use the whole script again and I had problems again. Now every time I disable the use * delete it keeps working good, then when I activate it again activate it again and it gives me the error again. If I disable the messagebox it also works good (this is all without rebooting).

Very strange...

Thanks for the help so far.

Top
#138154 - 2005-04-28 02:56 PM Re: Working script stop working after 3 logons
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
If you come to resolution on this, can you please post your final code? This may help others that see this similar type of issue.

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#138155 - 2005-04-28 03:25 PM Re: Working script stop working after 3 logons
THIEF15 Offline
Fresh Scripter

Registered: 2005-04-04
Posts: 12
K I suspect its an bug in KiX2001 v423. I downloaded KiX2001_422 and no problems anymore (10 logins). After that i switched a few times between the versions (random loginsamounts) and same result everytime. Version 422 works and version 423 doesn't.
Top
#138156 - 2005-04-28 07:38 PM Re: Working script stop working after 3 logons
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Please post your code or attempt to track down the specific coding causing the issue. Can't submit a bug without being able to duplicate it.

Quote:

Changes in 4.23:
 
Fixed: Changed the way in which KiXtart adjusts the security of the process.
This fixes an issue with launching KiXtart as a process on a RDP
(Terminal Server) connection.
Fixed: GetFileTime reported incorrect time information on some files.
Fixed: MOVE deleted file when source was the same as target.
  
Changes in 4.22 RC-1/final:
 
Fixed: "USE * /delete"
Enhanced GetFileVersion with options to retrieve 'raw' version information
Added @SCRIPTEXE macro
Enhanced @KIX macro
Added Tablet PC to @producttype
Enabled passing COM properties directly to built-in functions




Top
#138157 - 2005-04-28 08:37 PM Re: Working script stop working after 3 logons
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Quote:

Please post your code or attempt to track down the specific coding causing the issue. Can't submit a bug without being able to duplicate it.





This is so true with 4.5 looming on the horizon.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#138158 - 2005-04-29 11:51 AM Re: Working script stop working after 3 logons
THIEF15 Offline
Fresh Scripter

Registered: 2005-04-04
Posts: 12
Quote:

Please post your code or attempt to track down the specific coding causing the issue. Can't submit a bug without being able to duplicate it.



The code is at the top of this threath .

But from what I found out it looks like it is a combi problem between messagebox and use * /delete problem. If I use the script:
Code:

;*****************
;Wissen oude shares
;*****************
use * /DELETE

;*****************
;Laat messagebox zien met loggegevens
;*****************
Messagebox('Ready to Logon with following information:'+@CRLF
+'Username: '+@userid+@CRLF
+'IP:'+@ipaddress0+@CRLF
+'Inlogserver: '+$servernaam+@CRLF
+'PC naam: '+@wksta+@CRLF
+'Domein: '+@domain+@CRLF,'Information',0)


then I get the problem. Also tested only the text "Ready to Logon with following information" without succes so the problem aint in the macros. If I disable either the use * /delete or the messagebox then I don't have the problem. But as soon as I enable both again then I get the error message again. But when I reboot the computer and then have both enabled it works good for 1 or 2 logins.

The errormessage
Code:
In-page IO exception occurred.
This type of exception is thrown by the Windows Memory Manager when it fails
to (re)read code from the KiXtart executable.
Common causes for this exception include:
-running WKIX32 from a batchfile without using START /w
-forced redirection of the network drive from which KiXtart was started
-severe network errors/latency
-faulty anti-virus software



Hope this helps to figure out the problem.

Top
#138159 - 2005-04-29 07:37 PM Re: Working script stop working after 3 logons
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Please give this a try and let us know how it works out.

Replace Server1 and Server2 with the correct names


 

;**************** 
;Declare variable and set options
;****************
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
;****************
;Declare variables used in the script
;****************
Dim $servernaam,$Msg,$Txt


;*****************
;Wissen oude shares = delete old shares
;*****************
USE * /DELETE /PERSISTENT ; Unmap all drives


;****************
;Uitzoeken welke inlogserver = find out which login server
;*****************
$servernaam = "" ; Set the server name variable to blank
Select
Case InStr(@LSERVER,'server1')
$servernaam = 'server1'
Case InStr(@LSERVER,'server2')
$servernaam = 'server2'
Case 1
; Unexpected or unknown error
$Msg = MessageBox('Unable to determine logon server. Script will now quit','LOGON ERROR',4112)
Quit @ERROR
EndSelect


;****************
; If Server 1 is the logon server map these drives
;****************
If $servernaam = 'server1'
USE S: '\\' + $servernaam + '\share' ; make share1
USE V: '\\server2\share2' ;make share2
EndIf


;****************
; If Server 2 is the logon server map these drives
;****************
If $servernaam = 'server2'
USE J: '\\' + $servernaam + '\share1'
USE K: '\\' + $servernaam + '\share2'
USE L: '\\' + $servernaam + '\share3'
USE M: '\\' + $servernaam + '\share4'
USE S: '\\' + $servernaam + '\share5'
USE U: '\\' + $servernaam + '\share6'
USE V: '\\' + $servernaam + '\share7'
EndIf


;*****************
;Laat messagebox zien met loggegevens = show messagebox with logindata
;*****************


$Msg = MessageBox('Ready to Logon with following information:'+@CRLF
+'Username: '+@USERID+@CRLF
+'IP:'+@IPADDRESS0+@CRLF
+'Inlogserver: '+$servernaam+@CRLF
+'PC naam: '+@WKSTA+@CRLF
+'Domein: '+@DOMAIN+@CRLF,'Information',4112)


;*****************
;Laat messagebox zien met tekst uit bestand = show messagebox with text out of textfie
;*****************
$Txt = ReadFile('\\server1\Apps\Scripts\test.txt')
$Msg = MessageBox(Join($Txt,@CRLF),'Informatie',0)


;****************
; Function to read the file to be used in the above MessageBox call
;****************
Function ReadFile($file)
Dim $lf, $f, $_, $t
$lf=CHR(10)
$f=FreeFileHandle
$_=Open($f,$file)
If @ERROR Exit @ERROR EndIf
Do $t=$t+$lf+ReadLine($f) Until @ERROR
$_=Close($f)
$ReadFile=Split(SubStr($t,2),$lf)
EndFunction


Top
#138160 - 2005-04-30 01:18 AM Re: Working script stop working after 3 logons
THIEF15 Offline
Fresh Scripter

Registered: 2005-04-04
Posts: 12
Looks like a nice script. But it's a shame that I can't test it at the moment. The school where I work has a week vacation now. So the first chance to test it will be monday or tuesday in a week. But I'll try it then.
Top
Page 1 of 1 1


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

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

Generated in 0.073 seconds in which 0.027 seconds were spent on a total of 12 queries. Zlib compression enabled.

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