yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Software Development] pedefede:
YESSSSS found a solution !!!!

1. make a mortscript-file (like kopi.mscr) with xcopy-command:

XCopy( "\Storage Card\CABS\spb-skin\*.*", "\Program Files\Spb Mobile Shell", TRUE, TRUE )

2. and put it somewhere on storagecard (like \Storage Card\CABS\spb-skin\kopi.mscr)

3. in SDConfig.txt first copy the script to a foldername

without spaces.

. Then EXEC from there. Like:

CPY1:\Storage Card\CABS\spb-skin\kopi.mscr
CPY2:\Temp\kopi.mscr
EXEC:\Temp\kopi.mscr

:D :D :D
[Windows Mobile Software Development] l3v5y:
Congrats! One idea, would:

EXEC:"\Storage Card\hello.exe"

work?

Not tried it my self...
[Windows Mobile Software Development] pedefede:
No, EXEC cant handle spaces in filepaths
[Windows Mobile Software Development] Ameet:
any help around here guys? :)
[Windows Mobile Software Development] l3v5y:
The "" make programs assume it is a full statement. What is between the "" is a single parameter. With the EXEC command (and launching any program) the spaces/white space is assumed to be a break between parameters.

LOCK:Enabled
SHOW:\Storage Card\5.bmp
CAB: \Storage Card\On Card\Advanced_Config.CAB
CPY1:\Storage Card\On Card\dcinobar.lnk
CPY2:\Windows\Startup\dcinobar.lnk
CPY1:\Storage Card\On Card\GlossyBlackBars.lnk
CPY2:\Windows\Startup\GlossyBlackBars.lnk
LOCK:Disabled
RST: Reset

The "SHOW" command shows the BMP whilst other operations are taking place. If you put it at the front (see above) it should run better.
[Windows Mobile Software Development] mousio:
mousio's AutoRun

Please take a look at my AutoRun stuff, it uses the same approach to copy files/folders, but does more than that:

now I rarely need to change my SDConfig file anymore and I just drop all of my AutoRun stuff (cab/mscr/zip/reg/xml files and also regular files and folders) in a dedicated folder, it's that easy! :eek:
[Windows Mobile Software Development] Ameet:
confirming that even this solution doesnt work :( maybe its purely my bad luck :(
[Windows Mobile Software Development] hammermedia:
Email2

When I create a CAB and run the CAB file it won't add the email account. I used RapiConfig to get the settings and hand keyed one too. I renamed the XML to _setup.xml and created the CAB.

Will a CAB run interactively from File Explorer add an account? I thought that tmail.exe may have the email settings locked up. Has anyone run a CAB with their email settings and had the account get added correctly?

I just tried the example in Post #3 and it doesn't work either. I did a copy paste.

Everything else works fine, 20 CABs, 9 XML registry files.
[Windows Mobile Software Development] studentjunk:
I have 2 email accounts that have been working well since I started trying to back them up. I also use rapiconfig to obtain the settings:

<characteristic-query type="EMAIL2" recursive="true"/>

From there I copy the rapiconfig output into my xml (I don't even know how to make a cab) and run the xml. All my email settings are saved. I still need to redownload the messages and type in my password, but everything else is there, even the message download size settings and the download schedule.
[Windows Mobile Software Development] stan23:
Not everything, folder settings (which subfolders should be sync'd) and signatures are gone ;)
[Windows Mobile Software Development] hammermedia:
email xml

I got email working using another template but I still don't know why. I checked for extra spaces and wierd stuff but I guess I need I to check with a hex editor.

I did 'Email2 with recursive' and retrieved the settings but it didn't work once I renamed the xml and put it in my sdconfig. Odd.

More strange is that even though I have a schedule set it's not automatically downloading email.
[Windows Mobile Software Development] robpet2:
its good that theres a way to easily install cabs on the device...
[Windows Mobile Software Development] l3v5y:
Weird... My XML/Cab for email works fine... If it's an XML, a hex editor won't help as they are just plain text files. Try making a cab from the XML and seeing if the settings are applied differently...
[Windows Mobile Software Development] alraune:
Copy Dir

Is there anyway to copy an entire directory from storage card to main memory. Tried to copy each file into a folder that doesnt exist and it doesnt work..
[Windows Mobile Software Development] pvs:
Admittedly, I am a newbie at this stuff, but I've been having better luck when I delete the 'recursive=true' string from my RapidConfig output. I am not sure this makes a difference, but I think it might.

If I'm wrong on this, somebody who knows PLEASE chime in.

-pvs
[Windows Mobile Software Development] pvs:
Read back a few pages. There's a mortscript solution to your dilemma. Outside of that, if you read the entire thread, you will see members who sought solutions to your issue ... leading up to the mortscript resolution.

-pvs
[Windows Mobile Software Development] l3v5y:
If I have some spare time, I may attempt a C++ solution...
[Windows Mobile Software Development] pvs:
I was gonna try that too, considering that I recently purchased MS Visual Studio 2008. I figured it would be a good way to break the ice (and the rust), with a simple XCOPY command. But the key words have been "If I have some spare time", which I really don't. :o

So I'll be watching, in case YOU have some :D

Good luck, and THANKS!

-pvs
[Windows Mobile Software Development] l3v5y:
"If I have some spare time" Famous last words!

I have an exam tomorrow, but thursday off... Lets see if I know any C++ at all :D
[Windows Mobile Software Development] robpet2:
I used sdconfig tool .7, it was faster than me typing all 20 - 30 cabs in a list, and it installed flawlessly... check it out or try sashimi ( havent fully tried that one yet ).
[Windows Mobile Software Development] l3v5y:
What we are trying to achieve is the copying of a folder, rather than a cab install, or a single file copy...
[Windows Mobile Software Development] robpet2:
sorry bout the confusion... but you can plug the device up to the pc and do it that way...

you can try pocket mechanic - it has that feature of moving a folder.

resco file explorer works also

or you can just click on the folder and hold down in file explorer and choose copy !!!...
[Windows Mobile Software Development] l3v5y:
What I (maybe we?) ideally want is a way to automate the procedure... No more messing about with file explorer!

That way it can be done using SDAutoRun
[Windows Mobile Software Development] pvs:
Good luck on the exam!

-pvs
[Windows Mobile Software Development] l3v5y:
It's a 45 minute chemistry paper... Nothing too strenuous... :D
[Windows Mobile Software Development] studentjunk:
try mortscript. If it's not built into your ROM, make sure the mortscript cab is installed prior to any scripts.

Below is my script for setting up my start menu the way I want (and deleting battery icon in S2U2 when charging). You can also use the xcopy command (see mortscript manual or earlier in this thread).

Delete("\Program Files\S2U2\gfx\battery*.*")
Rename("\Windows\Start Menu\ALC.2008 Strong.lnk", "\Windows\Start Menu\Programs\ALC.2008 Strong.lnk")
Rename("\Windows\Start Menu\RealOne Player.lnk", "\Windows\Start Menu\Programs\RealOne Player.lnk")
MkDir( "\Windows\Start Menu\Programs\Office Mobile")
move( "\Windows\Start Menu\Office Mobile\*.lnk", "\Windows\Start Menu\Programs\Office Mobile")
RmDir( "\Windows\Start Menu\Office Mobile")
Rename("\Windows\Start Menu\Programs\psShutXP.lnk", "\Windows\Start Menu\psShutXP.lnk")
Rename("\Windows\Start Menu\Programs\notes.lnk", "\Windows\Start Menu\notes.lnk")
[Windows Mobile Software Development] l3v5y:
That can be achieved via an XML file (doesn't need mortscript), but XMLs and the "CPY1:" & "CPY2" commands can't copy an entire folder... Ideally, with C++, there would be no external dependencies, so it would be less memory intensive (storage wise) way to achieve the goal...
[Windows Mobile Software Development] robpet2:
check out sashimi auto installer.. i has a feature that auto installs all files to sdcard...
[Windows Mobile Software Development] DaveShaw:
I found this. Looks like a promising start. http://www.codeproject.com/KB/files/alexfileoperations.aspx

I am a C#/Delphi developer so I am not 100% if it is what you need.

The problem I am having is with CFileFind MFC class.

Quote from MSDN:http://msdn.microsoft.com/en-us/library/f33e1618(VS.80).aspx

Ta

Dave
[Windows Mobile Software Development] Dreamcatch:
I don't know if this is the right thread to ask this, but would it be possible for my to flash my touch from WM6 to 6.1 and then get all my programs and settings back by restoring a backup from spb backup or maybe sprite backup?

Thanks for your input
[Windows Mobile Software Development] DaveShaw:
No, wrong thread completely.

No, you should only use spb/sprite backup on the same ROM. Never backup on ROM A and Restore on ROM B. That's a one way ticket to bricksville.

This is only for installing programs and settings.

Ta

Dave
[Windows Mobile Software Development] l3v5y:
Not quite bricksville... It'll only get you half way to "Hard Reset City"...

This can be used for installing cabs you have onto your new ROM, but you need to set it up, and have the cabs...
[Windows Mobile Software Development] DaveShaw:
What was I thinking? UR right, nothing a HR won't cure.

Dave
[Windows Mobile Software Development] l3v5y:
I know more C# than C++, but that looks the kind of thing... I'll try something soon... Have a rehearsal tonight, and an exam on Friday (last one! :D :D :D) though...
[Windows Mobile Software Development] DaveShaw:
Speaking with a work mate FindFile and FileFileEx API calls should still be there, but the helper class CFileFind is missing from CE.

Ta

Dave
[Windows Mobile Software Development] l3v5y:
I think it may be possible to do something like this in C#, but that may require .NET which not all ROMs have...
[Windows Mobile Software Development] DaveShaw:
And most C# programs only make it to 0-01, then 0-02 is "re-written in C++ for speed".

Ta

Dave
[Windows Mobile Software Development] l3v5y:
That's more for graphic functions and the UI... And, with the file operation stuff it'll take some time anyway. Also, the UC concept is to automate, and any non-manual (programmatic system) will be preferable to using a file explorer in that respect...
[Windows Mobile Software Development] DaveShaw:
True, if this is done as part of the UC process no-one will care if it takes a second or so extra to start up the copy file program.

So if it's in C# it should be done in no time :p

Ta

Dave
[Windows Mobile Software Development] l3v5y:
You almost certainly know more C# than me, so you can try a C# version, and I'll try and learn C++ :p
[Windows Mobile Software Development] DaveShaw:
I'll see if I can find time. What are the requirements on this? I've a very busy home life and I normally only contribute whilst at work.

Also, I suggest we move this somewhere other than the UC thread, what u reckon mod?? :p

Dave
[Windows Mobile Software Development] l3v5y:
I was thinking the exe could be run with a line like:

EXEC:\Windows\UCFileOp.exe "\Storage Card\UC\My Documents"

The app would then copy the files and folders from the "\Storage Card\UC\My Documents" folder, to "\My Documents" (removes the "\Storage Card\UC" part of the parameter, to mean only one parm is passed.)

I think it should also be able to copy files and subfolders.

Maybe I'll finish first then! :D

I think this thread isn't a bad place for this, as it is directly related to UC :p
[Windows Mobile Software Development] DaveShaw:
I have it working with 2 params (Source Dir and Dest Dir) in C#.

Off home now. Will update you later tonight or tomorrow morning. :D

Dave
[Windows Mobile Software Development] l3v5y:
Probably far more useful, but I'm not sure if AutoRun can pass two parameters... I'll give it a try though!
[Windows Mobile Software Development] Dreamcatch:
Thanks a lot for your input and sorry for posting in the wrong thread...
[Windows Mobile Software Development] robpet2:
actually with the new spb backup you can restore to a different rom without bricking your device. Ive dont it before recently, since there is now a rom upgrade option when you do a restore. however when you run the restore it overwrites the settings of the new rom with what was in the rom thats on the device. you can try it and see how it works, worst comes to worst hard reset, use the backup to restore emails, messages, and calls only and contacts... then use the sdconfig app which works good because it searches for all cab files and you can select which ones to install. or make your own sdconfig.txt and use the UC feature that way...
[Windows Mobile Software Development] l3v5y:
Better than posting a new thread! The post above this one has some things you may find of interest though...
[Windows Mobile Software Development] DaveShaw:
Doesn't look like it supports 2 params.

2 options now:

1) Use a special path like you suggested before.

2) Use a config file for my app, which lists all sources and dests.

Personally I like option 2, what's your feelings?

Ta

Dave
[Windows Mobile Software Development] l3v5y:
I like 2 as well... One though, (though a little more complicated) would be to use the Registry!!! That way, you could have an XML doc that sets up the registry as you want it, and then have a line at the end of the XML with "EXEC:\wherever\whatever.exe"
[Windows Mobile Software Development] DaveShaw:
Maybe, but that could make a bit of a mess of the registry. I supose we could delete all the keys at the end using the copy app...?

Are we still planning on porting to C++ :p this might make it more complicated.

Also, you could get UC to install .Net framework before the copy app is executed (if required).

Ta

Dave
[Windows Mobile Software Development] l3v5y:
In the Diamond ROMs, HTC has a utility that copies single files (much like the initflashfiles do in conventional ROMs)

<wap-provisioningdoc>
<characteristic type="Registry">
<characteristic type="HKLM\SOFTWARE\HTC\AutoShortcut">
<parm name="\Windows\Start Menu\Programs\QuickGPS.lnk" value="\Windows\QuickGPS.lnk" datatype="string" translation="install"/>

That uses the key name as the destination, and the key value for the source.

Although a config file may be far simpler...

I'm not sure about the C++... I'm trying to learn bits of it as I go along, but this is not that simple...

That's a good point on the .NET front, and, WM6 (and 6.1) contain .NET CF 2.0 by default... I think it would be wise to target CF2 rather than a later version for greater compatibility...
[Windows Mobile Software Development] DaveShaw:
I'll start with a Config file and go from there. It could always support both in the future.

Ta

Dave
[Windows Mobile Software Development] l3v5y:
The config setup you currently have is probably easier to use than the registry settings...
[Windows Mobile Software Development] DaveShaw:
I think I have it working fully now.

Just a little more testing with UC to ensure I'm happy with it.

I'm having trouble with ProvXML in UC. Unrelated to the app, I just want to save on setup time after HR. I might have to post about it tomorrow.

Ta

Dave
[Windows Mobile Software Development] l3v5y:
What exactly is wrong with your XML confgi files?

Remember, the extension must be "*.XML" not "*.provxml".

Release it release it! :D
[Windows Mobile Software Development] ebb:
Have searched but have not found an answer:

Is there a way to deal with cabs that require a soft reset to continue installation? For example, SPB Pocket Plus- it installs, but then UC stalls waiting for the soft reset OK. If I press the d-pad to soft reset, the device resets, but the remainder of the UC commands are not executed.
[Windows Mobile Software Development] l3v5y:
You'll need to use "HIDE:ENABLED" and "LOCK:DISABLED" before that cab, and then the reverse after that cab. Say no to the restart of the cab as UC will restart after it's finished.
[Windows Mobile Software Development] ebb:
Thank you sir!
[Windows Mobile Software Development] bengalih:
Actually...just to clarify that statement.

SASHIMI will auto install/copy all files from a specified directories on the sdcard to main device memory. I believe this is what the original poster was wanting to do.

The current version will do that and much more... the next version to be out very soon will have a few more enhancements.
[Windows Mobile Software Development] DaveShaw:
xcopyce v0-02

18 Aug 08: DEVELOPMENT has moved to

http://xdaforums.com/showthread.php?p=2537886#post2537886

Thanks

Dave

Right, I am happy with the current product so here goes.

Slueth (or l3v5y now your a mod) feel free to add to the OP.

If there is enough intrest I will create a seperate thread for this app.

xcopyce v0-02

This is an application idea l3v5y came up with and somehow conned me into writing :p.

Purpose

To copy folders folders as part of the UC process.

Requirements

* .Net CF 2.0

* UC (Of course).

Usage

*Download the Zip file and extract xcopyce.exe onto your storage card.

*Add the following lines to your UC File

CPY1:\Storage Card\xcopyce.exe
CPY2:\Temp\xcopyce.exe
EXEC:\Temp\xcopyce.exe

Replace folder paths where necessary, remeber that EXEC: does not support spaces (hence why I'm copying to \Temp).

Config

Create a file on your storage card called xcopyce.txt.

The format of the file is "source" "destination". Comments begin with a # symbol.

Example:

#Test Config File
"\Storage Card\Temp" \Temp
\Temp "\Temp2"

Double Quotes can surround either the source or destination, but must surround paths with spaces in. This is the same as when using the xcopy command line. If in doubt surround both sides with quotes. :)

Change Log

0v01

- Initial Development.

0v02

- No longer requires the storage card to be called "\Storage Card".

Credits

l3v5y for the idea.

Sleuth255 for his UC work in the first place.

Download

Here

Thanks

Dave
[Windows Mobile Software Development] pvs:
Thanks SO MUCH, Dave and I3v5y. Dave ... Geez, you are fast! I guess you really DO have time while you're at work ;) I've DL'd but I don't think I'm going to get to play with it very soon. But I will definitely be adding this to my UC process the next time I get to play.

@I3v5y - Hope you did well on your tests. It was a great idea having Dave pull this off. I agree, I started trying to teach myself C++ a couple of months ago, and it is quite strange starting out. There are some great tutorial sites on the web, but it's a lot different from the languages I've used before. Alas, someday I'll be able to get back to it.

Anyway, thanks again, to both of you for pulling this off.

-pvs
[Windows Mobile Software Development] l3v5y:
I did not con you! You chose to do it :p

Thanks! Any changes since the previous build?

I wonder if Sleuth would mind me editing his post...
[Windows Mobile Software Development] DaveShaw:
Mod vs Mod? You could PM him, incase he isn't keeping up with this anymore :)

Only changes are back end stuff; I changed the code so that you could pass in a list of files from other sources, not just the txt file, but I didn't implement any oter methods yet. The log file is also a little easier to read.

Ta

Dave
[Windows Mobile Software Development] l3v5y:
He's been a mod for longer than me! And he has more posts... Sent him a PM though...

From my tests of the beta build, the speed is great.

One question (haven't tried it yet, in the middle of flashing two different ROMs...) What happens if no text file is there, or if the file is empty?
[Windows Mobile Software Development] DaveShaw:
If the config file isn't found then:

this.Log("ERROR[USER-3]: Config file not found [" + _configFile + "]");

If the file is empty, it just does nothing, blank log file with start and end time :)

Ta

Dave
[Windows Mobile Software Development] l3v5y:
A cunning plan!

What if there is a folder referenced in the config that doesn't exist? (as a source, if it's as a destination, it's created...
[Windows Mobile Software Development] DaveShaw:
this.Log("ERROR[USER-1]:Cannot find source directory [" + action.Src + "]");

Shall I make this open source? :p JK, not worth my effort.

Dave
[Windows Mobile Software Development] l3v5y:
I'm just making sure it won't crash on me when I'm away from a PC in the middle of no where with a semi-bricked phone! :D
[Windows Mobile Software Development] DaveShaw:
Shouldn't do.

Off home for the day.

Ta

Dave
[Windows Mobile Software Development] l3v5y:
Excellent! I'll give it a try when I next flash a ROM (going away next week, so if it fails... ;))
[Windows Mobile Software Development] Sleuth255:
Utility added to post 1. Nicely done DaveShaw I guess the gauntlet's been thrown: I promised this application a while back written in <ahem> native code... ;) :)

I apologize for the time away... I've been out of touch and buried with projects.

IIRC, I was planning on the following syntax:

foldercpy <folder1> <folder2>

create <folder2> if it doesn't exist. Use it with EXEC: in UC. To get around spaces issues I'd specify special characters like "!" to represent spaces. I'll have to play with it.

Another way would be to create a new sdconfig.txt command:

FCPY: <folder1> <folder2>

SDAutoRun.exe processes this itself. It could go into the next release along with some of I3v5y's suggestions.
[Windows Mobile Software Development] l3v5y:
I'm not sure if AutoRun itself can pass two parameters...

The "space" issue can be got round with "" around parameters and paths (for the EXEC: command at least).

I think SDAutoRun with FCPY would be great, but one advantage of a stand alone app is that it could be used for non-UC operations (I'm using XCopyCE for this :D)
[Windows Mobile Software Development] DaveShaw:
Well I'm happy to help out where I can, gimme a shout if you need owt Sleuth.

@l3v5y (or Sleuth), How exactly does EXEC support spaces. I tried to no end to get my app working from \Storage Card\xcopyce.exe. But nothing worked. Hence why I copy it to \Temp first. A snip from a SDConfig.txt would be nice :)

I'll have a look at porting the code to C++ when I can, but it may take a while longer. Me and l3v5y decided that UC isnt really a fast process and no one would mind waiting for a .net assemly to load. Once loaded the speed is as fast as native code, and as for missing Framework, you can use UC to install it :p

In the mean time I'll support any requests/bugs when I can.

Ta

Dave
[Windows Mobile Software Development] a2k:
Help Deleting PIE Favorites

... SNIP ...

I found a solution!
[Windows Mobile Software Development] totaliser:
Just what I have been looking for, unfortunately my "storage Card" is "SD Card". Any chances of incorporating SD Card into your program?
[Windows Mobile Software Development] TraderStav:
Is there a way I can test the provisioning XML on the device without having to do a hard reset? Is it by creating the cab? I am trying to get my Gmail settings right (very unsuccessfully despite the very helpful OP) and would love a quick testing environment.

Thanks for this great tool! Once the email settings are set I've got it all working!
[Windows Mobile Software Development] l3v5y:
You can create a cab, or, you can get AutoRun to rerun if you edit/remove the "AutoRunFlag" and "SDAutoRunFlag" under HKLM\\Comm
[Windows Mobile Software Development] j.vd.spank:
AdvancedConfig by schaps is capable of importing/testing provxml files.
[Windows Mobile Software Development] TraderStav:
Great, thanks! The cab worked on the first try! I may just have it run the cab in the SDConfig.txt!

This whole UC has gotten me so giddy. Great work
[Windows Mobile Software Development] DaveShaw:
I'll look into this as soon as I can.

Ta

Dave