#121437 - 2004-06-17 03:42 PM
My script quits half way though... HELP
|
kevin79
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
|
|
|
|
#121439 - 2004-06-17 04:11 PM
Re: My script quits half way though... HELP
|
kevin79
Fresh Scripter
Registered: 2003-05-06
Posts: 19
Loc: Grand Rapids, MI
|
There is no error, it just exits out of the script.
|
|
Top
|
|
|
|
#121442 - 2004-06-17 04:48 PM
Re: My script quits half way though... HELP
|
kevin79
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
|
|
|
|
#121444 - 2004-06-18 08:04 AM
Re: My script quits half way though... HELP
|
NTDOC
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
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
|
|
|
|
#121447 - 2004-06-18 05:41 PM
Re: My script quits half way though... HELP
|
kevin79
Fresh Scripter
Registered: 2003-05-06
Posts: 19
Loc: Grand Rapids, MI
|
THANK YOU!!!!! It works now!
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 764 anonymous users online.
|
|
|