Page 1 of 1 1
Topic Options
#121437 - 2004-06-17 03:42 PM My script quits half way though... HELP
kevin79 Offline
Fresh Scripter

Registered: 2003-05-06
Posts: 19
Loc: Grand Rapids, MI
I have a section of my script that was working up until Friday, when I made some changes. I must've changed something without realizing it and now I can't figure out where the problem is. I've run the script in debug mode and it just quits right after "If @INWIN="2". Does anyone see my problem?

Code:

:QAD
$cascade98=@LSERVER + "\support\Cascade98.lnk"
$cascadeNT=@LSERVER + "\support\Cascade.lnk"
$ats9x=@LSERVER + "\support\ATS9x.lnk"
$atsNT=@LSERVER + "\support\ATS.lnk"
$stx9x=@LSERVER + "\support\Systex9x.lnk"
$stxNT=@LSERVER + "\support\Systex.lnk"
$ckt9x=@LSERVER + "\support\CKTechEB29x.lnk"
$cktNT=@LSERVER + "\support\CKTechEB2.lnk"
If @INWIN="2"
If Exist ($qad)
Copy $cascade $qad
Copy $ckt $qad
Copy $ats $qad
Copy $stx $qad
Endif
If Exist ($qadeb2)
Copy $cascade $qadeb2
Copy $ckt $qadeb2
Copy $ats $qadeb2
Copy $stx $qadeb2
Endif
If Exist ($qad) or Exist ($qadeb2)
;Personal Desktop
Shell '%ComSpec% /c find /i "Cascade Icon Version 2 copied" "%userprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$desktop\Cascade.lnk")
Copy "$cascade98" "$desktop\Cascade.lnk"
Writeprofilestring ("%userprofile%\qad.txt", "QAD", "Cascade", "Cascade icon version 2 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "ATS Icon Version 3 copied" "%userprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$desktop\ATS.lnk")
Copy "$ats9x" "$desktop\ATS.lnk"
Writeprofilestring ("%userprofile%\qad.txt", "QAD", "ATS", "ATS icon version 3 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "Systex Icon Version 2 copied" "%userprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$desktop\Systex.lnk")
Copy "$stx9x" "$desktop\Systex.lnk"
Writeprofilestring ("%userprofile%\qad.txt", "QAD", "Systex", "Systex icon version 2 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "CKTech Icon EB2 copied" "%userprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$desktop\CKTech.lnk")
Copy $ckt9x $cktechicon
Writeprofilestring ("%userprofile%\qad.txt", "QAD", "CKTech", "CKTech icon EB2 copied")
Endif
Endif
;Common Desktop
Shell '%ComSpec% /c find /i "Cascade Icon Version 2 copied" "%allusersprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$alldesktop\Cascade.lnk")
Copy "$cascade98" "$alldesktop\Cascade.lnk"
Writeprofilestring ("%alluserprofile%\qad.txt", "QAD", "Cascade", "Cascade icon version 2 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "ATS Icon Version 3 copied" "%allusersprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$alldesktop\ATS.lnk")
Copy "$ats9x" "$alldesktop\ATS.lnk"
Writeprofilestring ("%alluserprofile%\qad.txt", "QAD", "ATS", "ATS icon version 3 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "Systex Icon Version 2 copied" "%allusersprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$alldesktop\Systex.lnk")
Copy "$stx9x" "$alldesktop\Systex.lnk"
Writeprofilestring ("%alluserprofile%\qad.txt", "QAD", "Systex", "Systex icon version 2 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "CKTech Icon EB2 copied" "%allusersprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$alldesktop\CKTech.lnk")
Copy "ckt9x $cktechicon
Writeprofilestring ("%alluserprofile%\qad.txt", "QAD", "CKTech", "CKTech icon EB2 copied")
Endif
Endif
Endif
Endif
If @INWIN="1"
If Exist ($qad)
Copy $cascade $qad
Copy $ckt $qad
Copy $ats $qad
Copy $stx $qad
Endif
If Exist ($qadeb2)
Copy $cascade $qadeb2
Copy $ckt $qadeb2
Copy $ats $qadeb2
Copy $stx $qadeb2
Endif
If Exist ($qad) or Exist ($qadeb2)
;Personal Desktop
Shell '%ComSpec% /c find /i "Cascade Icon Version 2 copied" "%userprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$desktop\Cascade.lnk")
Copy "$cascadeNT" "$desktop\Cascade.lnk"
Writeprofilestring ("%userprofile%\qad.txt", "QAD", "Cascade", "Cascade icon version 2 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "ATS Icon Version 3 copied" "%userprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$desktop\ATS.lnk")
Copy "$atsNT" "$desktop\ATS.lnk"
Writeprofilestring ("%userprofile%\qad.txt", "QAD", "ATS", "ATS icon version 3 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "Systex Icon Version 2 copied" "%userprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$desktop\Systex.lnk")
Copy "$stxNT" "$desktop\Systex.lnk"
Writeprofilestring ("%userprofile%\qad.txt", "QAD", "Systex", "Systex icon version 2 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "CKTech Icon EB2 copied" "%userprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$desktop\CKTech.lnk")
Copy $cktNT $cktechicon
Writeprofilestring ("%userprofile%\qad.txt", "QAD", "CKTech", "CKTech icon EB2 copied")
Endif
Endif
;Common Desktop
Shell '%ComSpec% /c find /i "Cascade Icon Version 2 copied" "%allusersprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$alldesktop\Cascade.lnk")
Copy "$cascadeNT" "$alldesktop\Cascade.lnk"
Writeprofilestring ("%alluserprofile%\qad.txt", "QAD", "Cascade", "Cascade icon version 2 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "ATS Icon Version 3 copied" "%allusersprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$alldesktop\ATS.lnk")
Copy "$atsNT" "$alldesktop\ATS.lnk"
Writeprofilestring ("%alluserprofile%\qad.txt", "QAD", "ATS", "ATS icon version 3 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "Systex Icon Version 2 copied" "%allusersprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$alldesktop\Systex.lnk")
Copy "$stxNT" "$alldesktop\Systex.lnk"
Writeprofilestring ("%alluserprofile%\qad.txt", "QAD", "Systex", "Systex icon version 2 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "CKTech Icon EB2 copied" "%allusersprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$alldesktop\CKTech.lnk")
Copy $cktNT $cktechicon
Writeprofilestring ("%alluserprofile%\qad.txt", "QAD", "CKTech", "CKTech icon EB2 copied")
Endif
Endif
Endif
Endif
Return



I know my code isn't very efficient, but I just need to get it working.

Top
#121438 - 2004-06-17 04:00 PM Re: My script quits half way though... HELP
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
It might help if you told us what the error message is.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#121439 - 2004-06-17 04:11 PM Re: My script quits half way though... HELP
kevin79 Offline
Fresh Scripter

Registered: 2003-05-06
Posts: 19
Loc: Grand Rapids, MI
There is no error, it just exits out of the script.
Top
#121440 - 2004-06-17 04:20 PM Re: My script quits half way though... HELP
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You are not telling a complete story. If KiX encounters an error, there would be a message. It looks like this is just a snippet of your code as I see a RETURN at the end. If you isolate this snippet to another file and run it, does it fail?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#121441 - 2004-06-17 04:33 PM Re: My script quits half way though... HELP
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
This line in your code:

Copy $ckt9x $cktechicon

Kinda stands out - as not being quoted like all the others.

-Shawn

Top
#121442 - 2004-06-17 04:48 PM Re: My script quits half way though... HELP
kevin79 Offline
Fresh Scripter

Registered: 2003-05-06
Posts: 19
Loc: Grand Rapids, MI
No, there isn't any error message, it just quits. Here is my script with all of my variables included with the above code, you can run it if you want. I can also post my entire script if you would like.

Code:
 
$HKLMS="HKEY_LOCAL_MACHINE\Software"
$HKCUS="HKEY_CURRENT_USER\Software"
$HKCUSMWCV="$HKCUS\Microsoft\Windows\CurrentVersion"
$HKLMSMWCV="$HKLMS\Microsoft\Windows\CurrentVersion"
$HKLMSMWNTCV="$HKLMS\Microsoft\Windows NT\CurrentVersion"
$HKLMAppPaths="$HKLMS\Microsoft\Windows\CurrentVersion\App Paths\"
$HKLMHDS="HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System"
$HKLMSCCS="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet"
$desktop=readvalue("$HKCUSMWCV\Explorer\Shell Folders","Desktop")
$startmenu=readvalue("$HKCUSMWCV\Explorer\Shell Folders","Start Menu")
$alldesktop=readvalue("$HKLMSMWCV\Explorer\User Shell Folders","Common Desktop")
$allstartmenu=readvalue("$HKLMSMWCV\Explorer\User Shell Folders","Common Start Menu")
$hosts=@LSERVER + "\support\hosts"
$services=@LSERVER + "\support\services"
$wmailto=@LSERVER + "\support\wmailto.ini"
$qad="c:\qad90gui"
$qadeb2="c:\qadeb2gui"
$cascade=@LSERVER + "\support\cascade90.svg"
$ckt=@LSERVER + "\support\cktecheb2.svg"
$ats=@LSERVER + "\support\ats90.svg"
$stx=@LSERVER + "\support\SystexEB2.svg"
$mls="\\Baku\MLSV8\Programs"
$noble=@LSERVER + "\support\noble90.svg"
$cktechicon=$desktop + "\CKTechEB2.lnk"
$cascade98=@LSERVER + "\support\Cascade98.lnk"
$cascadeNT=@LSERVER + "\support\Cascade.lnk"
$ats9x=@LSERVER + "\support\ATS9x.lnk"
$atsNT=@LSERVER + "\support\ATS.lnk"
$stx9x=@LSERVER + "\support\Systex9x.lnk"
$stxNT=@LSERVER + "\support\Systex.lnk"
$ckt9x=@LSERVER + "\support\CKTechEB29x.lnk"
$cktNT=@LSERVER + "\support\CKTechEB2.lnk"
If @INWIN="2"
If Exist ($qad)
Copy $cascade $qad
Copy $ckt $qad
Copy $ats $qad
Copy $stx $qad
Endif
If Exist ($qadeb2)
Copy $cascade $qadeb2
Copy $ckt $qadeb2
Copy $ats $qadeb2
Copy $stx $qadeb2
Endif
If Exist ($qad) or Exist ($qadeb2)
;Personal Desktop
Shell '%ComSpec% /c find /i "Cascade Icon Version 2 copied" "%userprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$desktop\Cascade.lnk")
Copy "$cascade98" "$desktop\Cascade.lnk"
Writeprofilestring ("%userprofile%\qad.txt", "QAD", "Cascade", "Cascade icon version 2 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "ATS Icon Version 3 copied" "%userprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$desktop\ATS.lnk")
Copy "$ats9x" "$desktop\ATS.lnk"
Writeprofilestring ("%userprofile%\qad.txt", "QAD", "ATS", "ATS icon version 3 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "Systex Icon Version 2 copied" "%userprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$desktop\Systex.lnk")
Copy "$stx9x" "$desktop\Systex.lnk"
Writeprofilestring ("%userprofile%\qad.txt", "QAD", "Systex", "Systex icon version 2 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "CKTech Icon EB2 copied" "%userprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$desktop\CKTech.lnk")
Copy $ckt9x $cktechicon
Writeprofilestring ("%userprofile%\qad.txt", "QAD", "CKTech", "CKTech icon EB2 copied")
Endif
Endif
;Common Desktop
Shell '%ComSpec% /c find /i "Cascade Icon Version 2 copied" "%allusersprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$alldesktop\Cascade.lnk")
Copy "$cascade98" "$alldesktop\Cascade.lnk"
Writeprofilestring ("%alluserprofile%\qad.txt", "QAD", "Cascade", "Cascade icon version 2 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "ATS Icon Version 3 copied" "%allusersprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$alldesktop\ATS.lnk")
Copy "$ats9x" "$alldesktop\ATS.lnk"
Writeprofilestring ("%alluserprofile%\qad.txt", "QAD", "ATS", "ATS icon version 3 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "Systex Icon Version 2 copied" "%allusersprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$alldesktop\Systex.lnk")
Copy "$stx9x" "$alldesktop\Systex.lnk"
Writeprofilestring ("%alluserprofile%\qad.txt", "QAD", "Systex", "Systex icon version 2 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "CKTech Icon EB2 copied" "%allusersprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$alldesktop\CKTech.lnk")
Copy "ckt9x $cktechicon
Writeprofilestring ("%alluserprofile%\qad.txt", "QAD", "CKTech", "CKTech icon EB2 copied")
Endif
Endif
Endif
Endif
If @INWIN="1"
If Exist ($qad)
Copy $cascade $qad
Copy $ckt $qad
Copy $ats $qad
Copy $stx $qad
Endif
If Exist ($qadeb2)
Copy $cascade $qadeb2
Copy $ckt $qadeb2
Copy $ats $qadeb2
Copy $stx $qadeb2
Endif
If Exist ($qad) or Exist ($qadeb2)
;Personal Desktop
Shell '%ComSpec% /c find /i "Cascade Icon Version 2 copied" "%userprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$desktop\Cascade.lnk")
Copy "$cascadeNT" "$desktop\Cascade.lnk"
Writeprofilestring ("%userprofile%\qad.txt", "QAD", "Cascade", "Cascade icon version 2 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "ATS Icon Version 3 copied" "%userprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$desktop\ATS.lnk")
Copy "$atsNT" "$desktop\ATS.lnk"
Writeprofilestring ("%userprofile%\qad.txt", "QAD", "ATS", "ATS icon version 3 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "Systex Icon Version 2 copied" "%userprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$desktop\Systex.lnk")
Copy "$stxNT" "$desktop\Systex.lnk"
Writeprofilestring ("%userprofile%\qad.txt", "QAD", "Systex", "Systex icon version 2 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "CKTech Icon EB2 copied" "%userprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$desktop\CKTech.lnk")
Copy $cktNT $cktechicon
Writeprofilestring ("%userprofile%\qad.txt", "QAD", "CKTech", "CKTech icon EB2 copied")
Endif
Endif
;Common Desktop
Shell '%ComSpec% /c find /i "Cascade Icon Version 2 copied" "%allusersprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$alldesktop\Cascade.lnk")
Copy "$cascadeNT" "$alldesktop\Cascade.lnk"
Writeprofilestring ("%alluserprofile%\qad.txt", "QAD", "Cascade", "Cascade icon version 2 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "ATS Icon Version 3 copied" "%allusersprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$alldesktop\ATS.lnk")
Copy "$atsNT" "$alldesktop\ATS.lnk"
Writeprofilestring ("%alluserprofile%\qad.txt", "QAD", "ATS", "ATS icon version 3 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "Systex Icon Version 2 copied" "%allusersprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$alldesktop\Systex.lnk")
Copy "$stxNT" "$alldesktop\Systex.lnk"
Writeprofilestring ("%alluserprofile%\qad.txt", "QAD", "Systex", "Systex icon version 2 copied")
Endif
Endif
Shell '%ComSpec% /c find /i "CKTech Icon EB2 copied" "%allusersprofile%\qad.txt" >nul'
If Not @Error=0
If Exist ("$alldesktop\CKTech.lnk")
Copy $cktNT $cktechicon
Writeprofilestring ("%alluserprofile%\qad.txt", "QAD", "CKTech", "CKTech icon EB2 copied")
Endif
Endif
Endif
Endif



Top
#121443 - 2004-06-18 05:32 AM Re: My script quits half way though... HELP
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
If you run the script from a console window KiXtart will display an error message. Alternatively, use DEBUG ON in the first line of your script and step through it to see where it fails. Finally, as a best practice, you should use
Code:

$rc=setoption('explicit','on')
$rc=setoption('novarsinstrings','on')


as this will improve code quality dramatically and lower debugging time and complexity.
_________________________
There are two types of vessels, submarines and targets.

Top
#121444 - 2004-06-18 08:04 AM Re: My script quits half way though... HELP
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Quote:

No, there isn't any error message, it just quits.




Well I would guess then that you're using WKIX32.EXE and not KIX32.EXE or you're using KiXtart v3.x because as far as I know all the KiXtart v4.x releases attempt to show the error message that caused the problem.


Please download KiXtart v4.22 and try running the script again from a DOS prompt using KIX32.EXE and you should get back some kind of error if it is quitting unexpectedly.

Top
#121445 - 2004-06-18 03:37 PM Re: My script quits half way though... HELP
kevin79 Offline
Fresh Scripter

Registered: 2003-05-06
Posts: 19
Loc: Grand Rapids, MI
Quote:

[Well I would guess then that you're using WKIX32.EXE and not KIX32.EXE or you're using KiXtart v3.x because as far as I know all the KiXtart v4.x releases attempt to show the error message that caused the problem.





I am using KIX32.exe, not WKIX32.exe and it is the newest version. I do have debugging turned on and it is NOT giving me an error message. If I move the @INWIN="1" part to the top, it will go through it but as soon as it hits the @INWIN="2" it quits.

Top
#121446 - 2004-06-18 03:54 PM Re: My script quits half way though... HELP
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Your missing a closing quote on this line:

Copy "ckt9x $cktechicon


Top
#121447 - 2004-06-18 05:41 PM Re: My script quits half way though... HELP
kevin79 Offline
Fresh Scripter

Registered: 2003-05-06
Posts: 19
Loc: Grand Rapids, MI
THANK YOU!!!!! It works now!
Top
Page 1 of 1 1


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

Who's Online
0 registered and 764 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.063 seconds in which 0.026 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