#16157 - 2002-01-14 08:03 PM
Insufficient Memory Error!
|
Nate Meyer
Lurker
Registered: 2001-11-29
Posts: 4
Loc: Dakota County Government
|
Does anyone else get this error “Insufficient Memory” I am running kixtart scripts from a batch files using the netlogon service from multiple BDC’s. This error message is very random but always on WIN9x. The batch file calls wkix32.exe and runs several kix scripts. After encountering the error, the box remains on the desktop and has to be manually closed. In the upper left-hand corner of the box it says 'batfilename.bat-finished' All the scripts complete without error. All drive mapping remain... My script sets environment variable using winset.exe if the users OS is not NT. If anyone else is experiencing this INSUFFICIENT MEMORY! error please let me know. Thank you in advanced FIRST halve of the CODE: ; wsclogon.kix CLS IF "%OS%" = "Windows_NT" Goto Variablez Else SHELL @LDRIVE + "\Winset.exe" + "ComputerName=$WKSTA" SHELL @LDRIVE + "\Winset.exe" + "UserFullName=$FullName" SHELL @LDRIVE + "\Winset.exe" + "UserDesc=$comment" SHELL @LDRIVE + "\Winset.exe" + "Privilege=$PRIV" SHELL @LDRIVE + "\Winset.exe" + "WorkGroup=$DOMAIN" SHELL @LDRIVE + "\Winset.exe" + "NetLogonDrv=$LDRIVE" SHELL @LDRIVE + "\Winset.exe" + "MACAddress=$ADDRESS" SHELL @LDRIVE + "\Winset.exe" + "UserName=$USERID" SHELL @LDRIVE + "\Winset.exe" + "LogonServer=$LSERVER" SHELL @LDRIVE + "\Winset.exe" + "UserDomain=$LDOMAIN" ENDIF :Variablez IF "%OS%" <> "Windows_NT" SET "ComputerName=$WKSTA" SET "UserFullName=$FullName" SET "UserDesc=$comment" SET "Privilege=$PRIV" SET "WorkGroup=$DOMAIN" SET "NetLogonDrv=$LDRIVE" SET "MACAddress=$ADDRESS" SET "UserName=$USERID" SET "LogonServer=$LSERVER" SET "UserDomain=$LDOMAIN" ENDIF ; Set Environment Variables used to set local variables $ComputerName="@WKSTA" $UserFullName="@FULLNAME" $UserDesc="@COMMENT" $Privilege="@PRIV" $WorkGroup="@DOMAIN" $NetLogonDrv="@LDRIVE" $MACAddress="@IPADDRESS0" $UserName="@USERID" $LogonServer="@LSERVER" $UserDomain="@LDOMAIN" $WINSET="$NetLogonDrv\WINSET" CLS :WelcomeScreen small COLOR b+/n BOX (0,0,26,79,GRID) COLOR b/n BOX (3,9,23,71,GRID) COLOR g+/n BOX (2,8,22,70,FULL) AT (11,11) "UserID : " SETTIME "\\GSC1" IF ((@time > "00:00:00") AND (@time < "12:00:00")) AT (12,11) "Good Morning :" ELSE IF ((@time >= "12:00:00") AND (@time < "18:00:00")) AT (12,11) "Good Afternoon :" ELSE AT (12,11) "Good Evening :," ENDIF ENDIF ; AT (13,11) "Description : " AT (14,11) "Privilege : " AT (15,11) "Computer Name : " AT (16,11) "IP Address : " AT (17,11) "Domain : " AT (18,11) "Logon Domain : " AT (19,11) "Logon Server : " ; DISPLAY VARIABLES Color y+/n AT (9,10) " WELCOME TO THE DAKOTA COUNTY NETWORK" AT (11,35) @USERID AT (12,35) @FULLNAME AT (13,35) @COMMENT AT (14,35) @PRIV AT (15,35) @WKSTA AT (16,35) @IPADDRESS0 AT (17,35) @DOMAIN AT (18,35) @LDOMAIN AT (19,35) @LSERVER color y+/b AT (21,10) "Mapping Drives...Thank you for your patience..." ;map data drives to nscfs3 ;map executable drive according to location ;$LSERVER=wscfstst CALL \\wscfstst\kixtart\nettest $LSERVER=wscfstst $TYPE=MICROSOFT IF $TYPE = "MICROSOFT" USE V: /del USE V: "\\$LSERVER\EXECPROD" USE W: /del USE W: "\\$LSERVER\SYS3" USE X: /del USE X: "\\$LSERVER\KIXTART" USE Y: /del USE Y: "\\$LSERVER\SYS"
ELSE ;SHELL "Y:\PUBLIC\MAP ROOT Z:=$MAPZ" SHELL "Y:\PUBLIC\MAP ROOT V:=$MAPV" USE W: /del USE W: "$MAPW" SHELL "Y:\PUBLIC\MAP ROOT X:=$MAPX" ENDIF USE P: /del USE P: @HOMESHR
|
|
Top
|
|
|
|
#16158 - 2002-01-15 08:45 AM
Re: Insufficient Memory Error!
|
Lonkero
KiX Master Guru
   
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
well, before going to that insufficient problem. your call for winset seems odd. line: SHELL @LDRIVE + "\Winset.exe" + "ComputerName=$WKSTA"is translated: SHELL "\\Logonserver\netlogon\Winset.exeComputerName=$WKSTA" when it should be SHELL "\\Logonserver\netlogon\Winset.exe ComputerName=$WKSTA" and in script way: SHELL @LDRIVE + "\Winset.exe ComputerName=$WKSTA" cheers,
_________________________
!download KiXnet
|
|
Top
|
|
|
|
#16159 - 2002-01-21 06:03 AM
Re: Insufficient Memory Error!
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
|
|
Top
|
|
|
|
#16160 - 2002-01-22 05:26 PM
Re: Insufficient Memory Error!
|
Nate Meyer
Lurker
Registered: 2001-11-29
Posts: 4
Loc: Dakota County Government
|
No. There are still desktops that have the 'insufficiant memory' error. Also some Win95 Clients recieve a 'Winset' error. The Winset error says Winset: This program has performed an illegal operation and will be shut down. Also: A required .dll file, Z:\Winset.exe, was not foundI have changed the code to the following: IF "%OS%" = "Windows_NT" Goto Variablez Else SHELL @LDRIVE + "\Winset.exe ComputerName=$WKSTA" SHELL @LDRIVE + "\Winset.exe UserFullName=$FullName" SHELL @LDRIVE + "\Winset.exe UserDesc=$comment" SHELL @LDRIVE + "\Winset.exe Privilege=$PRIV" SHELL @LDRIVE + "\Winset.exe WorkGroup=$DOMAIN" SHELL @LDRIVE + "\Winset.exe NetLogonDrv=$LDRIVE" SHELL @LDRIVE + "\Winset.exe MACAddress=$ADDRESS" SHELL @LDRIVE + "\Winset.exe UserName=$USERID" SHELL @LDRIVE + "\Winset.exe LogonServer=$LSERVER" SHELL @LDRIVE + "\Winset.exe UserDomain=$LDOMAIN" ENDIF :Variablez IF "%OS%" <> "Windows_NT" SET "ComputerName=$WKSTA" SET "UserFullName=$FullName" SET "UserDesc=$comment" SET "Privilege=$PRIV" SET "WorkGroup=$DOMAIN" SET "NetLogonDrv=$LDRIVE" SET "MACAddress=$ADDRESS" SET "UserName=$USERID" SET "LogonServer=$LSERVER" SET "UserDomain=$LDOMAIN" ENDIF ; Set Environment Variables used to set local variables $ComputerName="@WKSTA" $UserFullName="@FULLNAME" $UserDesc="@COMMENT" $Privilege="@PRIV" $WorkGroup="@DOMAIN" $NetLogonDrv="@LDRIVE" $MACAddress="@IPADDRESS0" $UserName="@USERID" $LogonServer="@LSERVER" $UserDomain="@LDOMAIN" $WINSET="$NetLogonDrv\WINSET" CLS :WelcomeScreen small COLOR b+/n BOX (0,0,26,79,GRID) COLOR b/n BOX (3,9,23,71,GRID) COLOR g+/n BOX (2,8,22,70,FULL) AT (11,11) "UserID : " SETTIME "\\GSC1" IF ((@time > "00:00:00") AND (@time < "12:00:00")) AT (12,11) "Good Morning :" ELSE IF ((@time >= "12:00:00") AND (@time < "18:00:00")) AT (12,11) "Good Afternoon :" ELSE AT (12,11) "Good Evening :," ENDIF ENDIF ; AT (13,11) "Description : " AT (14,11) "Privilege : " AT (15,11) "Computer Name : " AT (16,11) "IP Address : " AT (17,11) "Domain : " AT (18,11) "Logon Domain : " AT (19,11) "Logon Server : " ; DISPLAY VARIABLES Color y+/n AT (9,10) " WELCOME TO THE DAKOTA COUNTY NETWORK" AT (11,35) @USERID AT (12,35) @FULLNAME AT (13,35) @COMMENT AT (14,35) @PRIV AT (15,35) @WKSTA AT (16,35) @IPADDRESS0 AT (17,35) @DOMAIN AT (18,35) @LDOMAIN AT (19,35) @LSERVER color y+/b AT (21,10) "Mapping Drives...Thank you for your patience..." ;map data drives to nscfs3 ;map executable drive according to location ;$LSERVER=wscfstst CALL \\wscfstst\kixtart\nettest $LSERVER=wscfstst $TYPE=MICROSOFT IF $TYPE = "MICROSOFT" USE V: /del USE V: "\\$LSERVER\EXECPROD" USE W: /del USE W: "\\$LSERVER\SYS3" USE X: /del USE X: "\\$LSERVER\KIXTART" USE Y: /del USE Y: "\\$LSERVER\SYS"
ELSE ;SHELL "Y:\PUBLIC\MAP ROOT Z:=$MAPZ" SHELL "Y:\PUBLIC\MAP ROOT V:=$MAPV" USE W: /del USE W: "$MAPW" SHELL "Y:\PUBLIC\MAP ROOT X:=$MAPX" ENDIF USE P: /del USE P: @HOMESHR
|
|
Top
|
|
|
|
#16161 - 2002-01-22 05:35 PM
Re: Insufficient Memory Error!
|
Nate Meyer
Lurker
Registered: 2001-11-29
Posts: 4
Loc: Dakota County Government
|
More Info. I am running kixtart from a batch file during the NT4.0 NETLOGON service. The logon batch files and kix scripts are depenant on the users location. (4 campasus) We have Win9x, NT and Win2k desktops. I am migrating all users from Novell to NT4.0. So we have some clients running Client for Microsoft Network, and Microsoft Client for Novell. My problems seem to be more consistant with desktop Operating Systems as aposed to the Client software. All of the above mentioned errors occur on Win9X. Thank you in advance, for any advice.
|
|
Top
|
|
|
|
#16162 - 2002-01-23 06:52 AM
Re: Insufficient Memory Error!
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,We have add some debugging code to your script. So you can see - which lines were executed - what was the time of execution - what was the error status Debug version:
code:
CLS COLOR C+/N AT (1,1) " " IF RedirectOutput("c:\kixdebug.log") ENDIF ? "-"+@date+" "+@time+"- Script "+@kix+" starting." ?"- 1-"+@time+"- @error @serror "? IF "%OS%" = "Windows_NT" ?"- 2-"+@time+"- @error @serror "? GOTO Variablez ?"- 3-"+@time+"- @error @serror "? ELSE ?"- 4-"+@time+"- @error @serror "? SHELL @ldrive + "\Winset.exe ComputerName=$WKSTA" ?"- 5-"+@time+"- @error @serror "? SHELL @ldrive + "\Winset.exe UserFullName=$FullName" ?"- 6-"+@time+"- @error @serror "? SHELL @ldrive + "\Winset.exe UserDesc=$comment" ?"- 7-"+@time+"- @error @serror "? SHELL @ldrive + "\Winset.exe Privilege=$PRIV" ?"- 8-"+@time+"- @error @serror "? SHELL @ldrive + "\Winset.exe WorkGroup=$DOMAIN" ?"- 9-"+@time+"- @error @serror "? SHELL @ldrive + "\Winset.exe NetLogonDrv=$LDRIVE" ?"- 10-"+@time+"- @error @serror "? SHELL @ldrive + "\Winset.exe MACAddress=$ADDRESS" ?"- 11-"+@time+"- @error @serror "? SHELL @ldrive + "\Winset.exe UserName=$USERID" ?"- 12-"+@time+"- @error @serror "? SHELL @ldrive + "\Winset.exe LogonServer=$LSERVER" ?"- 13-"+@time+"- @error @serror "? SHELL @ldrive + "\Winset.exe UserDomain=$LDOMAIN" ?"- 14-"+@time+"- @error @serror "? ENDIF ?"- 15-"+@time+"- @error @serror "? :variablez ?"- 16-"+@time+"- @error @serror "? IF "%OS%" <> "Windows_NT" ?"- 17-"+@time+"- @error @serror "? SET "ComputerName=$WKSTA" ?"- 18-"+@time+"- @error @serror "? SET "UserFullName=$FullName" ?"- 19-"+@time+"- @error @serror "? SET "UserDesc=$comment" ?"- 20-"+@time+"- @error @serror "? SET "Privilege=$PRIV" ?"- 21-"+@time+"- @error @serror "? SET "WorkGroup=$DOMAIN" ?"- 22-"+@time+"- @error @serror "? SET "NetLogonDrv=$LDRIVE" ?"- 23-"+@time+"- @error @serror "? SET "MACAddress=$ADDRESS" ?"- 24-"+@time+"- @error @serror "? SET "UserName=$USERID" ?"- 25-"+@time+"- @error @serror "? SET "LogonServer=$LSERVER" ?"- 26-"+@time+"- @error @serror "? SET "UserDomain=$LDOMAIN" ?"- 27-"+@time+"- @error @serror "? ENDIF ?"- 28-"+@time+"- @error @serror "? ; Set Environment Variables used to set local variables ?"- 29-"+@time+"- @error @serror "? $computername="@WKSTA" ?"- 30-"+@time+"- @error @serror "? $userfullname="@FULLNAME" ?"- 31-"+@time+"- @error @serror "? $userdesc="@COMMENT" ?"- 32-"+@time+"- @error @serror "? $privilege="@PRIV" ?"- 33-"+@time+"- @error @serror "? $workgroup="@DOMAIN" ?"- 34-"+@time+"- @error @serror "? $netlogondrv="@LDRIVE" ?"- 35-"+@time+"- @error @serror "? $macaddress="@IPADDRESS0" ?"- 36-"+@time+"- @error @serror "? $username="@USERID" ?"- 37-"+@time+"- @error @serror "? $logonserver="@LSERVER" ?"- 38-"+@time+"- @error @serror "? $userdomain="@LDOMAIN" ?"- 39-"+@time+"- @error @serror "? $winset="$NetLogonDrv\WINSET" ?"- 40-"+@time+"- @error @serror "? CLS ?"- 41-"+@time+"- @error @serror "? :welcomescreen ?"- 42-"+@time+"- @error @serror "? SMALL ?"- 43-"+@time+"- @error @serror "? COLOR b+/n ?"- 44-"+@time+"- @error @serror "? BOX (0,0,26,79,GRID) ?"- 45-"+@time+"- @error @serror "? COLOR b/n ?"- 46-"+@time+"- @error @serror "? BOX (3,9,23,71,GRID) ?"- 47-"+@time+"- @error @serror "? COLOR g+/n ?"- 48-"+@time+"- @error @serror "? BOX (2,8,22,70,FULL) ?"- 49-"+@time+"- @error @serror "? AT (11,11) "UserID : " ?"- 50-"+@time+"- @error @serror "? SETTIME "\\GSC1" ?"- 51-"+@time+"- @error @serror "? IF ((@time > "00:00:00") AND (@time < "12:00:00")) ?"- 52-"+@time+"- @error @serror "? AT (12,11) "Good Morning :" ?"- 53-"+@time+"- @error @serror "? ELSE ?"- 54-"+@time+"- @error @serror "? IF ((@time >= "12:00:00") AND (@time < "18:00:00")) ?"- 55-"+@time+"- @error @serror "? AT (12,11) "Good Afternoon :" ?"- 56-"+@time+"- @error @serror "? ELSE ?"- 57-"+@time+"- @error @serror "? AT (12,11) "Good Evening :," ?"- 58-"+@time+"- @error @serror "? ENDIF ?"- 59-"+@time+"- @error @serror "? ENDIF ?"- 60-"+@time+"- @error @serror "? ; ?"- 61-"+@time+"- @error @serror "? AT (13,11) "Description : " ?"- 62-"+@time+"- @error @serror "? AT (14,11) "Privilege : " ?"- 63-"+@time+"- @error @serror "? AT (15,11) "Computer Name : " ?"- 64-"+@time+"- @error @serror "? AT (16,11) "IP Address : " ?"- 65-"+@time+"- @error @serror "? AT (17,11) "Domain : " ?"- 66-"+@time+"- @error @serror "? AT (18,11) "Logon Domain : " ?"- 67-"+@time+"- @error @serror "? AT (19,11) "Logon Server : " ?"- 68-"+@time+"- @error @serror "? ; DISPLAY VARIABLES ?"- 69-"+@time+"- @error @serror "? COLOR y+/n ?"- 70-"+@time+"- @error @serror "? AT (9,10) " WELCOME TO THE DAKOTA COUNTY NETWORK" ?"- 71-"+@time+"- @error @serror "? AT (11,35) @userid ?"- 72-"+@time+"- @error @serror "? AT (12,35) @fullname ?"- 73-"+@time+"- @error @serror "? AT (13,35) @comment ?"- 74-"+@time+"- @error @serror "? AT (14,35) @priv ?"- 75-"+@time+"- @error @serror "? AT (15,35) @wksta ?"- 76-"+@time+"- @error @serror "? AT (16,35) @ipaddress0 ?"- 77-"+@time+"- @error @serror "? AT (17,35) @domain ?"- 78-"+@time+"- @error @serror "? AT (18,35) @ldomain ?"- 79-"+@time+"- @error @serror "? AT (19,35) @lserver ?"- 80-"+@time+"- @error @serror "? COLOR y+/b ?"- 81-"+@time+"- @error @serror "? AT (21,10) "Mapping Drives...Thank you for your patience..." ?"- 82-"+@time+"- @error @serror "? ?"- 83-"+@time+"- @error @serror "? ;map data drives to nscfs3 ?"- 84-"+@time+"- @error @serror "? ;map executable drive according to location ?"- 85-"+@time+"- @error @serror "? ;$LSERVER=wscfstst ?"- 86-"+@time+"- @error @serror "? CALL \\wscfstst\kixtart\nettest ?"- 87-"+@time+"- @error @serror "? $lserver=wscfstst ?"- 88-"+@time+"- @error @serror "? $type=MICROSOFT ?"- 89-"+@time+"- @error @serror "? IF $type = "MICROSOFT" ?"- 90-"+@time+"- @error @serror "? USE V: /del ?"- 91-"+@time+"- @error @serror "? USE V: "\\$LSERVER\EXECPROD" ?"- 92-"+@time+"- @error @serror "? USE W: /del ?"- 93-"+@time+"- @error @serror "? USE W: "\\$LSERVER\SYS3" ?"- 94-"+@time+"- @error @serror "? USE X: /del ?"- 95-"+@time+"- @error @serror "? USE X: "\\$LSERVER\KIXTART" ?"- 96-"+@time+"- @error @serror "? USE Y: /del ?"- 97-"+@time+"- @error @serror "? USE Y: "\\$LSERVER\SYS" ?"- 98-"+@time+"- @error @serror "? ELSE ?"- 99-"+@time+"- @error @serror "? ;SHELL "Y:\PUBLIC\MAP ROOT Z:=$MAPZ" ?"- 100-"+@time+"- @error @serror "? SHELL "Y:\PUBLIC\MAP ROOT V:=$MAPV" ?"- 101-"+@time+"- @error @serror "? USE W: /del ?"- 102-"+@time+"- @error @serror "? USE W: "$MAPW" ?"- 103-"+@time+"- @error @serror "? SHELL "Y:\PUBLIC\MAP ROOT X:=$MAPX" ?"- 104-"+@time+"- @error @serror "? ENDIF ?"- 105-"+@time+"- @error @serror "? USE P: /del ?"- 106-"+@time+"- @error @serror "? USE P: @homeshr;($begin) ; ; wed 23-jan-2002 05:15:06 (kix 4.00 vs 2.33e) ; ;Informative KIXSTRIP: no errors found (input=106 output=106 skip=0). ; ;Summary KIXSTRIP: block structures ; - do:until [0:0] ; - for|each:in|to:step|next [0|0:0|0:0|0] ; - function:endfunction [0:0] ; - if:else:endif [5:4:5] ; - select:case:endselect [0:0:0] ; - while:loop [0:0] ;Informative KIXSTRIP: 5 block_structures found. ;Informative KIXSTRIP: no UDF's found. ;Informative KIXSTRIP: 2 labels found. ;Summary KIXSTRIP: BREAK CALL DEBUG DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE ;Informative KIXSTRIP: 1 CALL ;Informative KIXSTRIP: 1 GOTO ;Informative KIXSTRIP: 12 SHELL ;Informative KIXSTRIP: 12 USE ; ;($end)
Please run this version and return the output of file "c:\kixdebug.log" to the board. Please return also the result of set command to the board.Please can you put also your CONFIG.SYS and AUTOEXEC.BAT on the board? greetings. btw: it can be possible that the output on your screen looks a little bit confu- sion, but that isn't important. Possible the result of our RedirectOutput call.
btw: please try to run your script also with WINSET installed on your clients with above problems. btw: change your CONFIG.SYS file for SHELL call f.e. SHELL=C:\COMMAND.COM /E:2048 /P How to automate this proces? see our next reaction. btw: by a small SHELL size f.e. /E:1024 we get following message "Out of environment space". After changing it to /E:2048 we don't get this message again. For testing your limitations we have create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46=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa set z47=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa set z48=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa set z49=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa set z50=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
|
Top
|
|
|
|
#16163 - 2002-01-23 06:53 AM
Re: Insufficient Memory Error!
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,A very important possible for config.sys is the usage of sections, which make it possible to use the WriteProfileString function to change a specified key. Important in such situation is: your CONFIG.SYS file should have a section name before your key value. A good section name will be common. Normally your script only contains one statement, but to remove double lines and to create the necessary section name we must use some additional state- ments. For a RunOnce update we are using another key in your config.sys file. Our script example:
code:
$config="c:\config.sys" $config_temp="%temp%\config.tmp" $debug_mode="yes" IF (Exist($config) = 1) AND (Len(ReadProfileString($config,"common","set prompt")) <> Len("$p$g $t$h$h$h")) DEL $config_temp IF (Open(1,$config,2) = 0) ; -read access- IF (Open(2,$config_temp,5) = 0) ; -write access- $line=ReadLine(1) ; -create '[common]' section IF (WriteLine(2,"[common]"+CHR(13)+CHR(10)) <> 0) ENDIF ; -add 'shell' key- IF (WriteLine(2,"shell=c:\command.com /e:1024 /p"+CHR(13)+CHR(10)) <> 0) ENDIF ; -we are using the 'set prompt' key to check has already been updated- IF (WriteLine(2,"set prompt=$p$g $t$h$h$h"+CHR(13)+CHR(10)) <> 0) ENDIF WHILE (@error = 0) IF ($debug_mode = "yes") ? " -> "+$line ENDIF IF (Instr($line,"shell=") = 0) AND (Instr($line,"[common]") = 0) AND (Instr($line,"prompt=") = 0) IF (WriteLine(2,$line+CHR(13)+CHR(10)) <> 0) ENDIF IF ($debug_mode = "yes") " (copy)" ENDIF ELSE IF ($debug_mode = "yes") " (skip)" ENDIF ENDIF $line=ReadLine(1) LOOP IF Close(2) ENDIF ENDIF IF Close(1) ENDIF ? IF (Exist($config_temp) = 1) COPY $config_temp $config /H IF (@error <> 0) ? "Warning KIX: update config.sys returns error @error (@serror)" ELSE DEL $config_temp ENDIF ? "update "+Ucase($config)+" file." ENDIF ENDIF ? "update completed." ELSE ? "already updated." ENDIF
Our input file was:
code:
SHELL=C:\COMMAND.COM /E:1024 /P DEVICE=C:\WINDOWS\HIMEM.SYS DEVICE=C:\WINDOWS\EMM386.EXE NOEMS FILESHIGH=100 BUFFERSHIGH=30 DOS=HIGH,UMB LASTDRIVE=Z FCBSHIGH=4,0 SHELL=C:\COMMAND.COM /E:4096 /P SHELL=C:\COMMAND.COM /E:1024 /P SHELL=C:\COMMAND.COM /E:1024 /P SHELL=C:\COMMAND.COM /E:1024 /P SHELL=C:\COMMAND.COM /E:1024 /P SHELL=C:\COMMAND.COM /E:1024 /P SHELL=C:\COMMAND.COM /E:1024 /P SHELL=C:\COMMAND.COM /E:1024 /P
Our result file is:
code:
[common] shell=c:\command.com /e:1024 /p set prompt=$p$g $t$h$h$h DEVICE=C:\WINDOWS\HIMEM.SYS DEVICE=C:\WINDOWS\EMM386.EXE NOEMS FILESHIGH=100 BUFFERSHIGH=30 DOS=HIGH,UMB LASTDRIVE=Z FCBSHIGH=4,0
Your screen output will be something like this: first run[b]
code:
-> SHELL=C:\COMMAND.COM /E:1024 /P (skip) -> DEVICE=C:\WINDOWS\HIMEM.SYS (copy) -> DEVICE=C:\WINDOWS\EMM386.EXE NOEMS (copy) -> FILESHIGH=100 (copy) -> BUFFERSHIGH=30 (copy) -> DOS=HIGH,UMB (copy) -> LASTDRIVE=Z (copy) -> FCBSHIGH=4,0 (copy) -> SHELL=C:\COMMAND.COM /E:4096 /P (skip) -> SHELL=C:\COMMAND.COM /E:1024 /P (skip) -> SHELL=C:\COMMAND.COM /E:1024 /P (skip) -> SHELL=C:\COMMAND.COM /E:1024 /P (skip) -> SHELL=C:\COMMAND.COM /E:1024 /P (skip) -> SHELL=C:\COMMAND.COM /E:1024 /P (skip) -> SHELL=C:\COMMAND.COM /E:1024 /P (skip) -> SHELL=C:\COMMAND.COM /E:1024 /P (skip) update C:\CONFIG.SYS file. update completed.
Second run:
code:
already updated.
Greetings. btw: we must take some precaution for a known flushing problem with write-buffers. We are only use the [b]WriteLine functions. For new changes with other scripts you can use the WriteProfileString function to do that. A call can be something like this:
code:
IF (WriteProfileString("c:\config.sys","common","set dircmd","/o:n") <> 0) ENDIF
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|