[XDA_UC][UC][SASHIMI][S4X] S4X_Auto & S4X_Backup [DEC.02.2010] XDA_UC Mods & Answers

Search This thread

powinmo

Senior Member
May 5, 2010
65
15
hey powinmo here is a script and reg file needed to fully import cht 2.0, lockscreen and all. i cant remember where i found the files but it took lots and lots of searching! ive tested it using energyrom's xda uc. the reg file included is what solves the issue with cht not fully importing. it wouldnt fully import before because .cht file associations are not added to the registry until cht editor is opened for the first time. that is what the included reg file does, it adds .cht file associations to the registry :) glad i could step in and help you out since youve helped me out so much with your scripts! thanks and keep up the great work!

Didn't work @ my HD2 with EnergyRom from 6.1.2011 (German). I matched the mscr at my path.
First it seems to work, but not all was importet. Not all rows were importet also not a fourth Site with my Contacts.

Greetings

Snake28


I do appreciate puff's effort to help with the CHT2 import issues. The REG file basically just adds the ability to run the .cht file directly without specifically running the chteditor.exe binary during the command line execution.

I've tested the REG entries on 3 different TP2s with Jan.6 and Jan.16 CHT2 ROMs from NRGZ. No go. Same issues many others are reporting in the CHT2 thread right now.

Just have to wait for the CHTE team to get around to fixing things. Otherwise stick with CHT185/CHTE1851 for something solid.
 

powinmo

Senior Member
May 5, 2010
65
15
Just wanted to say thanks for you guys still working on these scripts. I have ORD and need all the help I can get with tons of stuff to reinstall on every flash. I might be able to do some of this stuff but just don't have the time so I really appreciate the time you spend.

Glad you and others are still finding these scripts useful. Please continue to provide any suggestions and comments to help make it more flexible for you and the community.
 

powinmo

Senior Member
May 5, 2010
65
15
Version 1.62 update zip file has been posted:
http://xdaforums.com/showpost.php?p=10118521&postcount=287

Version 1.62 changelog:
http://xdaforums.com/showpost.php?p=10118557&postcount=288

I've tested this on 4 TP2 units with various flavors of Energy ROMs from Dec.27.2010, Jan.6 and Jan.16 2011. For my setup, everything appears to work as I need it.

Please let me know if there are any issues, concerns, etc. If no one has any major issues in a week or two I may provide a full package update directly to benjamminzIS to post.
 

vinceweis

Senior Member
Jan 10, 2008
306
54
70
Fontana, CA
OnePlus 7T
Glad you and others are still finding these scripts useful. Please continue to provide any suggestions and comments to help make it more flexible for you and the community.

I just used the code to flash the latest Energy ROM. I used the Full Minus backup first. Most things worked really well. It even seemed to import a lot of the cookie settings. One thing I noticed is that I was suprised to see that the Compact start menu was already loaded. It is what I normally use to save memory. What I found however was that it seemed to be operating on top of the standard start menu; ie no memory was gained. I still had to select the compact menu to get the memory I was expecting. Is there something in this code that tried to load the Compact menu but did not disable the Standard menu?
 
I just used the code to flash the latest Energy ROM. I used the Full Minus backup first. Most things worked really well. It even seemed to import a lot of the cookie settings. One thing I noticed is that I was suprised to see that the Compact start menu was already loaded. It is what I normally use to save memory. What I found however was that it seemed to be operating on top of the standard start menu; ie no memory was gained. I still had to select the compact menu to get the memory I was expecting. Is there something in this code that tried to load the Compact menu but did not disable the Standard menu?

have you done any editing of the regexport.ini??? or did you just leave it as it is in the package? if you haven't edited it at all, then you may need to add the lines necessary to backup the compact start menu reg settings... I personally don't know where they are, and I don't have my winmo phone with me right now so I can't really look... but since you did a full minus file backup, and (probably) used just the default regexport.ini then quick menu is one of the things already in the default regexport.ini as I used it myself... but the compact start menu entries are not... sorry I can't be of more help right now, but either ask around in the energy threads if anyone knows what the reg entries are for CSM or do some digging in the registry and I'm sure you'll find it... you could also always do a hard reset, then do a full regexport, then change the compact start menu settings from the app, then do another full regexport and then compare the two regexports with winDiff or similar program (Notepad++ comes with a nice compare plugin too)
 

vinceweis

Senior Member
Jan 10, 2008
306
54
70
Fontana, CA
OnePlus 7T
have you done any editing of the regexport.ini??? or did you just leave it as it is in the package? if you haven't edited it at all, then you may need to add the lines necessary to backup the compact start menu reg settings... I personally don't know where they are, and I don't have my winmo phone with me right now so I can't really look... but since you did a full minus file backup, and (probably) used just the default regexport.ini then quick menu is one of the things already in the default regexport.ini as I used it myself... but the compact start menu entries are not... sorry I can't be of more help right now, but either ask around in the energy threads if anyone knows what the reg entries are for CSM or do some digging in the registry and I'm sure you'll find it... you could also always do a hard reset, then do a full regexport, then change the compact start menu settings from the app, then do another full regexport and then compare the two regexports with winDiff or similar program (Notepad++ comes with a nice compare plugin too)

I did not do any editing. I used default on everything. Thanks, this gives me a start of where to look. It was not a big problem, just thought I would comment on it as it was about the only thing I saw as an issue for me.
 

powinmo

Senior Member
May 5, 2010
65
15
I did not do any editing. I used default on everything. Thanks, this gives me a start of where to look. It was not a big problem, just thought I would comment on it as it was about the only thing I saw as an issue for me.

Glad ben was able to maybe point you in the right direction.

Note that this is likely not a direct problem with the S4X_Auto.mscr scripts I have been helping to update. I can only surmise that the script is now restoring some settings that probably were ignored (bypassed) with the older versions.

But do let us know what you find in case there is some kind of collision happening we might need to address.
 
Glad ben was able to maybe point you in the right direction.

Note that this is likely not a direct problem with the S4X_Auto.mscr scripts I have been helping to update. I can only surmise that the script is now restoring some settings that probably were ignored (bypassed) with the older versions.

But do let us know what you find in case there is some kind of collision happening we might need to address.

well he said he did a full minus file backup with everything at default, and mentioned that he used compact start menu before doing the backup. it's definitely not the scripts fault, all he needs to do is put the reg entries for compact start menu into the regexport.ini before doing his next backup and it will then properly export those keys to be restored...

I'm wondering if I should leave the regexport.ini example up, and just empty the one that's actually in the package, and maybe throw a check into the backup script that throws an error "you need to edit the regexport.ini to fit your personal needs before running this backup!" if it hasn't been edited yet (is still empty). Otherwise, if people are using the default file, and they don't use at least all the programs I did, then they're going to have a lot of empty reg keys being restored, which potentially could cause some strange issues (hopefully not, but it's windows, so you never know)
 
  • Like
Reactions: powinmo

powinmo

Senior Member
May 5, 2010
65
15
well he said he did a full minus file backup with everything at default, and mentioned that he used compact start menu before doing the backup. it's definitely not the scripts fault, all he needs to do is put the reg entries for compact start menu into the regexport.ini before doing his next backup and it will then properly export those keys to be restored...

I'm wondering if I should leave the regexport.ini example up, and just empty the one that's actually in the package, and maybe throw a check into the backup script that throws an error "you need to edit the regexport.ini to fit your personal needs before running this backup!" if it hasn't been edited yet (is still empty). Otherwise, if people are using the default file, and they don't use at least all the programs I did, then they're going to have a lot of empty reg keys being restored, which potentially could cause some strange issues (hopefully not, but it's windows, so you never know)

I knew he posted about using the backup portion of the script, but the way he worded things it was as if the restore script updates I posted were the cause of this. I just wanted folks to realize that.

I would go with your recommendation for updating the regexport.ini. There are just too many dangerous/odd things that can happen with winmo if any funky registry items are missed or imported that do not need to be. I do not use the backup scripts yet (I currently use UCMe2) so I have not had a chance to do any code review on it.

Again, appreciate you checking on the thread when time permits...
 

GLO

Senior Member
Jul 23, 2007
642
12
Sydney
Hi,

Anyone still using this?

I'd love to see it up and running again.

Im particularly trying to find out what reg keys i need to back up so that all my apps are registered via these keys.

How do i find out what keys have changed when an app is registered.
 
Last edited:

powinmo

Senior Member
May 5, 2010
65
15
Hi,

Anyone still using this?

I'd love to see it up and running again.

Im particularly trying to find out what reg keys i need to back up so that all my apps are registered via these keys.

How do i find out what keys have changed when an app is registered.

I still use S4X quite often, but primarily for restoring after flashing a ROM. I have my own backup routines.

Search for "Kheb" here on XDA for a tool to do a diff check before and after you install an app to see the file and registry differences. I use it every so often to check this kind of stuff.
 

ForgetfulGuru

Senior Member
Jun 8, 2010
336
60
Glasgow
www.localitservice.co.uk
Still using it

Been using it for the last 3 or 4 ROM update.
seems todo it's job just ad described.

can't ask for more than that, was a bit of a learning curve to start with, that maybe puts off a lot of users.

As for installed apps registration code, how many you got? use a reg explorer, search for the name of the app and back up the whole key to the correct file in _mod_ (filesreg).

Happy hunting
edited due to XT9 having a laugh. ;)
 
Last edited:
  • Like
Reactions: powinmo

powinmo

Senior Member
May 5, 2010
65
15
Been using it for the last 3 or 4 ROM update.
seems todo it's job just ad described.

can't ask for more than that, was a bit of a learning curve to start with, that maybe puts off a lot of users.

As for installed apps registration code, how many you got? use a reg explorer, search for the name of the app and back up the whole key to the correct file in _mod_ (filesreg).

Happy hunting
edited due to XT9 having a laugh. ;)

If you've used XDA_UC itself, dropping in S4X is not too bad. It is just a matter of rearranging your files to the proper locations at that point. Otherwise, yes there can be a learning curve, but that seems well worth it if you flash a lot and/or support friends/family with WinMo devices.

As for finding where apps register themselves, you can use the Khebs tool to run before, then after you install/reg your app to see what you need to backup... The S4X backup script should then allow you to add in those entries.

Good luck!
 
  • Like
Reactions: ForgetfulGuru

motisu

Senior Member
Apr 2, 2006
1,304
109
68
Xiaomi Poco X3 NFC
Samsung Galaxy Watch 4
Hi Powinmo,

Long ago, I had a request to benjamminzIS about adding a change to the main script which would restore both the PIM.VOL file and also the PIMBACKUP file. The reason that I would like this is because I have a scheduled run of PIMBACKUP nightly at 3:00 AM to backup files and directories that contain info that I want to carry over from HR to HR. Whenever I do an HR, I first restore my PIM to get all my contacts, schedule and phone logs and then I run PIMBACKUP restore to restore the files. ATM S4X will only restore 1 of the 2 and not both. Is it possible to add this option?


http://xdaforums.com/member.php?u=2554890
 
  • Like
Reactions: powinmo

ForgetfulGuru

Senior Member
Jun 8, 2010
336
60
Glasgow
www.localitservice.co.uk
Yes so worth the learning

If you've used XDA_UC itself, dropping in S4X is not too bad. It is just a matter of rearranging your files to the proper locations at that point. Otherwise, yes there can be a learning curve, but that seems well worth it if you flash a lot and/or support friends/family with WinMo devices.

As for finding where apps register themselves, you can use the Khebs tool to run before, then after you install/reg your app to see what you need to backup... The S4X backup script should then allow you to add in those entries.

Good luck!

Thanks for the link to Khebs tool. I tried a forum search for this after the first mention of it here, came up a blank. will be adding this to my install and making regular use of it.

You are so right about the learning curve being VERY worth it. don't think I could be bothered with updates and trying new ROMs if it were not for this fantastic set of tools.
 
  • Like
Reactions: powinmo

powinmo

Senior Member
May 5, 2010
65
15
Hi Powinmo,

Long ago, I had a request to benjamminzIS about adding a change to the main script which would restore both the PIM.VOL file and also the PIMBACKUP file. The reason that I would like this is because I have a scheduled run of PIMBACKUP nightly at 3:00 AM to backup files and directories that contain info that I want to carry over from HR to HR. Whenever I do an HR, I first restore my PIM to get all my contacts, schedule and phone logs and then I run PIMBACKUP restore to restore the files. ATM S4X will only restore 1 of the 2 and not both. Is it possible to add this option?

Hello. Are you using any of the updates I posted for S4X? Release 1.61 fixed a typo (see the updates for my changelog posting) in his PIM subroutine that would have prevented the pim.vol from being restored. If you are, I did a cursory look at the source again, and from what I can tell it should process both correctly now.

I can see why you would need to do both and nothing should be preventing that now... if you are using my updates, enable the debugging/logging and post the logs for me (here or via PM is fine) to help me narrow down the issue.


Thanks for the link to Khebs tool. I tried a forum search for this after the first mention of it here, came up a blank. will be adding this to my install and making regular use of it.

You are so right about the learning curve being VERY worth it. don't think I could be bothered with updates and trying new ROMs if it were not for this fantastic set of tools.

Glad you find these tools to be a nice extension to XDA_UC and/or your automated flashing toolset. If possible, just post around when possible to let people know this tool is still actively supported on all devices, not just the Touch Pro... eg, maybe a review in a neutral device forum here.


*EDIT*
General info for all late to this thread, I am helping to maintain S4X now. Please see Post #1 updates to links to my changelog and downloads for the most current script updates. Most recent version is 1.62 for S4X_Auto.mscr as of this post.
 
Last edited:

motisu

Senior Member
Apr 2, 2006
1,304
109
68
Xiaomi Poco X3 NFC
Samsung Galaxy Watch 4
Hello. Are you using any of the updates I posted for S4X? Release 1.61 fixed a typo (see the updates for my changelog posting) in his PIM subroutine that would have prevented the pim.vol from being restored. If you are, I did a cursory look at the source again, and from what I can tell it should process both correctly now.

I can see why you would need to do both and nothing should be preventing that now... if you are using my updates, enable the debugging/logging and post the logs for me (here or via PM is fine) to help me narrow down the issue.

I know about the typo, I was the first to find it :).
http://xdaforums.com/showpost.php?p=7853379&postcount=216

I am using 1.6.2

How does one turn on debugging mode?

My exact problem is that for some reason, the script doesn't find the PIM.VOL file even though it is there in the proper directory.

One more thing: I saw in the changelog that Pimbackup can be run with a MSCR file to automate the restore. Could you please upload and example of this file?
 
Last edited:

powinmo

Senior Member
May 5, 2010
65
15
I know about the typo, I was the first to find it :).
http://xdaforums.com/showpost.php?p=7853379&postcount=216

I am using 1.6.2

How does one turn on debugging mode?

My exact problem is that for some reason, the script doesn't find the PIM.VOL file even though it is there in the proper directory.

One more thing: I saw in the changelog that Pimbackup can be run with a MSCR file to automate the restore. Could you please upload and example of this file?

Noted about you finding the typo. Much appreciated.

Sorry, I thought I put in debugging in to these scripts, but it was for another project. The log you attached is a sufficient starting point for now.

Where exactly are you putting the PIM.VOL file? The script has it currently (I never modified it) hard coded for something like "[storage card]\xda_uc\s4x\_Mod_\PIM.VOL" where [storage card] is your local sd card location, eg "\Storage Card". It would make more sense to put it in "...\_Mod_\filesPIM" right?

Also, if you've used ".auto" files to install .cab files with custom prompts... same concept for the .mscr for automating PIMBackup.
 
  • Like
Reactions: motisu

motisu

Senior Member
Apr 2, 2006
1,304
109
68
Xiaomi Poco X3 NFC
Samsung Galaxy Watch 4
Where exactly are you putting the PIM.VOL file? The script has it currently (I never modified it) hard coded for something like "[storage card]\xda_uc\s4x\_Mod_\PIM.VOL" where [storage card] is your local sd card location, eg "\Storage Card". It would make more sense to put it in "...\_Mod_\filesPIM" right?

Also, if you've used ".auto" files to install .cab files with custom prompts... same concept for the .mscr for automating PIMBackup.

I am an IDIOT!!! " none so blind as those who will not see" IN the original version of 1.6, I found that error and corrected it to point to filesPIM, but in your updated version, because you corrected the typo, I wrongly assumed that the path was also corrected. What is missing is simply to add \filesPIM to the path and it works. Thanks for the memory jog!!!

As to the auto script, I have worked before with them, but I never used it to check/uncheck boxes, only to tab and press enter. Can you drop me an example of one and I'll modify it accordingly?
 
  • Like
Reactions: powinmo

powinmo

Senior Member
May 5, 2010
65
15
I am an IDIOT!!! " none so blind as those who will not see" IN the original version of 1.6, I found that error and corrected it to point to filesPIM, but in your updated version, because you corrected the typo, I wrongly assumed that the path was also corrected. What is missing is simply to add \filesPIM to the path and it works. Thanks for the memory jog!!!

As to the auto script, I have worked before with them, but I never used it to check/uncheck boxes, only to tab and press enter. Can you drop me an example of one and I'll modify it accordingly?

No worries, just glad I could help. On the next update to S4X, I'll set it up so PIM.VOL is searched in both locations, the original for compatibility:
(1=original) _Mod_\PIM.VOL
(2=should be the proper location) _Mod_\filesPIM\PIM.VOL

I'll notate in the changelog when I get a chance to make the changes. If there's anything else anyone would like to see added/fixed/modified... now's your chance...


As for the .mscr/.auto automation of PIMBackup, I'll have to check if mine do something with the checkboxes. I may have given up due to the involvement of how much I had to the "send" commands, etc.


I think on the next update, I may do a revamp of a possible .cab installer that will include the last mortscript released (4.3b15).
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    benjamminzIS -

    I've been meaning to post for some time to say thanks for your scripts. Appreciate your efforts thus far and understand how family takes priority.

    Also wanted to ask about how you would normally like to handle any possibly code update submissions from other users... I can offer to help maintain the code.

    I've followed most of the thread since the 1.6 release. I've had some problems with the code for certain things I needed done, and have done the following:

    1. fixed pimRestore sub
    * "sourcPIM" to "sourcePIM" (from some prior posts)

    2. refactored sub tskKill
    * exitSub in MortScript 4.3.0.11 is broken and the taskKill sub terminates prematurely depending on the code path
    * eliminated the need to use exitSub
    * this caused items like dialerCAB to fail when it could not kill cprog.exe (for CDMA ROMs) properly. This is probably causing other items to fail as well and folks likely think it is something else not working.

    3. modified sub restoreCHT
    * fails if your filename is not exactly "chtbackup.cht" (default)
    * if default filename is not found, the sub will check for the most recent .cht file in the "filesCHT" directory and use that
    * no longer relies on the "default" filename if not found
    * changes are only for CHT 1.8.5 so far as I stopped using CHT 2.0.0.0 for now

    4. added MortScriptVersion output string to Init messages so we can debug what versions of MortScript is in use

    5. modified checking of xdauc.mscr so that the script works with Energy ROMs from Nov 2010 onwards

    Note stuff like tskKill failing is something that I've had problems with since I stated using v1.6 on a bunch of TP2s regardless of the custom ROM (Energy/Stock/etc). It took me a while to figure out it was the ExitSub function that is broken in MortScript 4.3b11 itself.

    I can post an updated version of S4X_Auto.mscr (eg call it 1.6.1) if that is fine with you and others... or I can provide the diff/patch code.

    In the works:
    a. CHT 2.0.0.0 settings restore as I play with it on a test TP2 unit I have
    b. reviewing customlinks.ini handling
    c. checking on your TO DO of pimbackup via ini or some other automated method
    2
    I just used the code to flash the latest Energy ROM. I used the Full Minus backup first. Most things worked really well. It even seemed to import a lot of the cookie settings. One thing I noticed is that I was suprised to see that the Compact start menu was already loaded. It is what I normally use to save memory. What I found however was that it seemed to be operating on top of the standard start menu; ie no memory was gained. I still had to select the compact menu to get the memory I was expecting. Is there something in this code that tried to load the Compact menu but did not disable the Standard menu?

    have you done any editing of the regexport.ini??? or did you just leave it as it is in the package? if you haven't edited it at all, then you may need to add the lines necessary to backup the compact start menu reg settings... I personally don't know where they are, and I don't have my winmo phone with me right now so I can't really look... but since you did a full minus file backup, and (probably) used just the default regexport.ini then quick menu is one of the things already in the default regexport.ini as I used it myself... but the compact start menu entries are not... sorry I can't be of more help right now, but either ask around in the energy threads if anyone knows what the reg entries are for CSM or do some digging in the registry and I'm sure you'll find it... you could also always do a hard reset, then do a full regexport, then change the compact start menu settings from the app, then do another full regexport and then compare the two regexports with winDiff or similar program (Notepad++ comes with a nice compare plugin too)
    2
    To help out benjamminzIS and other users, I am providing my updates to the scripts where applicable.

    Please see the initial discussions starting at post 282:
    http://xdaforums.com/showpost.php?p=10091804&postcount=282

    Attached is: (Jan.17.2011)
    1. S4X_SDAuto_1.62_[updateONLY].zip = updates to the 1.6/1.61 S4X_Auto.mscr script and this file contains the updated mscr file itself and a changelog text file. No package just yet - when/if I do I will update this post.

    Attached is: (Dec.27.2010)
    1. S4X_SDAuto_1.61_[updateONLY].zip = updates to the 1.6 S4X_Auto.mscr script and this file only contains the updated mscr file itself. No package just yet - when/if I do I will update this post.

    2. diff-1.6-to-1.6.1.patch.txt = patch/diff file from 1.6 to my changes

    Please see the next post for my changelogs and additional information.

    Feel free to test and let me know if there are any issues or other items you'd like me to check/fix/research. No promises on issue items that I do not specifically use or have the ability to simulate/test.
    2
    Changelog for updates by powinmo:

    110117
    Version 1.62

    1. Eliminated extra ProcExists checks around tskKills due to prior sub refactoring in 1.61

    2. fixed "sub tandem" so that tandem installs like .cab+.reg work now
    * the calls to FileInstallMethods never passed the proper fType and sType values to allow the tandem item to run
    ** eg, xyz.cab and xyz.reg never installs the xyz.reg file because it continued to pass the "CABfiles" fType/sType vs "REGfiles"
    * tested and verified at least a few .cab+.reg tandem installs

    3. fixed "Sub cabInteract" for failing on Manual CAB installations
    * the free space check during a Manual CABfiles install would fail because the SpaceFree check did not have a valid InstallDestination to use
    ** as a result CAB files in the filesCAB\Manual would sometimes fail due to insufficient free space on the target (would read 0 bytes free on bogus target)

    4. modified "Sub autoPhase" to add in second install pass on:
    a. registry
    * \Storage Card\XDA_UC\_Mod_\files2REG (localized as needed)
    Runs after filesCHT is processed
    * Allows for a final set of .reg imports prior to exiting S4X
    b. mscr
    * Location \Storage Card\XDA_UC\_Mod_\files2MSCR (localized as needed)
    * Runs after filesCHT and files2REG is processed
    * Allows for a final set of mscr scripts to run prior to exiting S4X

    eg, allows for something like after a CHT Import, you can import a direct registry tweak to override some CHT settings from a file in files2REGfrom a .reg file in files2REG

    5. Expose free space check multipler to target location during CAB file installations
    * Sashimi (and S4X inherited) defaulted to a value of 4
    ** if your target destination does not have 4 x the size of your CAB file free, the CAB will not install
    * exposed in autosettings.ini:
    ! section: [AutoSettings]
    ! key name: "freeSpaceMultipler"
    ! value: 1 to 99
    * default to 3 x CABsize if not defined in autosettings.ini

    5. Expose WaitFor text window during SDAuto CAB installations
    * Sashimi (and S4X inherited) defaulted to a value of 10 to 20
    ** if your target CAB did not load wceload within the timeout period it may cause the script to hang or skip
    * exposed in autosettings.ini:
    ! section: [AutoSettings]
    ! key name: "txtWindowWaitFor"
    ! value: 1 to 99
    * default to 25 seconds to wait for the wceload text window to become active
    * may need longer depending on how slow your device is and how large the CAB installations are

    9. tweaked pretty tabbing/spacing for a few lines here and there

    Other:
    a. CHTE2.0.0.0 importing still has issues with loading all settings. Known issue based on what I've seen in the CHTE2.0.0.0 threads.
    b. CHTE1.8.5.1 importing works fine.
    c. Running subsquent S4X sessions may "lockup" when trying to install SDAuto CABs. Basically any Text Window operation (WaitFor or WndExists) may crash after the first execution of S4X. This leads to the script just hanging there and will require you to manually kill the mortscript process. This looks like an issue with Mortscript b11 that S4X has packaged in, and not any fault of a custom ROM or S4X itself.



    101227:

    0. bumped version to 1.61 temporary so my updates can be differentiated from original author until they merge changes

    1. fixed/modified pimRestore sub
    * corrected: "sourcPIM" to "sourcePIM"
    * corrected: sType for PIMRestore registry write was missing - subsequent S4X executions would apply or miss PIB/PIM restores
    * added ability to execute an auto type script for PIB automation
    - auto-type scripts must be in the filesPIM directory
    - if "pimbackup.restore.mscr" was found, this script is run each time a PIB file is restored
    - if <filename>.mscr is found for a specific <filename>.PIB file, this script is run only for that PIB and overrides running the "pimbackup.restore.mscr" file

    2. refactored sub taskKill
    * exitSub(0) in MortScript 4.3.0.11 is broken and the taskKill sub terminates prematurely
    * eliminated the need to use exitSub
    * this caused items like dialerCAB to fail when it could not kill cprog.exe (for CDMA ROMs) properly
    ! If you have seen very odd behavior with items that required a taskkill, this MAY fix your problems...

    3. modifed sub chtRestore
    * fails if your filename is not exactly "chtbackup.cht" (default)
    * if default filename is not found, the sub will check for the most recent .cht file in the "filesCHT" directory and use that
    * no longer relies on the default filename
    * tested against CHT Editor 2.0.0.0 final and 1.8.5.1 - both work fine

    4. added MortScriptVersion output string to Init messages so we can debug what versions of MortScript is in use

    5. modified checking of xdauc.mscr so that the script works with Energy ROMs from Nov 2010 onwards

    6. tweaked pretty tabbing/spacing for a few lines here and there
    1
    OK, here's the fix for the newer energy ROMs... find the S4X_Auto.mscr in the XDA_UC\_Mod_\_bin folder and edit it as such:
    Code:
    ######################################################
    # PREPARING TO RUN MOD ###############################
    ######################################################
    
    	@backLightSettings
    [color=red]	If( scriptProcExists( "xdauc.mscr" ) )
    		waitForActive( "Reset", 30 )
    		sendRight( "Reset" )
    		sendCR( "Reset" )
    	EndIf[/color]

    delete only that which is in RED. enjoy =)