How to create a filesystem where I can write files to?

11 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Wolfgang Kaml

ungelesen,
26.07.2002, 18:47:4026.07.02
an
I have built several WinCE .Net OS images so far and moved the NK.bin file
to a Compact Flash which is connected to a Single Board Computer. When ever
I make changes in the registry (like turn the Autohide feature for the
taskbar on) on the WinCE powered device, they get lost as soon as I turn the
device off.

I am sure I am lacking some basic info for WinCE based devices, but is there
a way to write files to the file system which will be persistent through a
power off/on cycle?

Is a power off/on cycle on a WinCE based Single Boad Computer x86 pretty
much the same like a hard reset on a battery powered Palm/Pocket PC Device?

Thanks,
Wolfgang


Paul G. Tobey

ungelesen,
26.07.2002, 18:48:3926.07.02
an
Search for 'persistent registry' and/or 'hive based registry' in the old
newsgroup messages. This is a commonly-asked question...

Paul T.

"Wolfgang Kaml" <wk...@phacor.removespam.com> wrote in message
news:OEcMKYPNCHA.2028@tkmsftngp10...

Wolfgang Kaml

ungelesen,
26.07.2002, 19:14:0726.07.02
an
I tried to understand those articles before, I guess I have to read them a
couple more times. I have setup a hive based registry at this point.

Still the one question remains: If I have WinCE (NK.bin) on a Compact Flash
device and use the Command line window to create a simple text file on the
file system, should that file last through a power off/on cycle?

Thanks,
Wolfgang

"Paul G. Tobey" <nos...@nospam.com> wrote in message
news:eCrW7aPNCHA.2488@tkmsftngp12...

Steve Maillet (eMVP)

ungelesen,
26.07.2002, 23:34:1426.07.02
an
If you create it in the "\Storage card" folder.

--
Steve Maillet (eMVP - Windows CE)
Entelechy Consulting
smaillet_EntelechyConsulting_Com

"Wolfgang Kaml" <wk...@phacor.removespam.com> wrote in message

news:emFu7mPNCHA.2104@tkmsftngp08...

Tim Clacy

ungelesen,
29.07.2002, 05:21:0929.07.02
an
Wolfgang,

In addition to the other replies, I think you'll also find that it's not
possible to set the task bar to 'auto hide' following cold-start just by
using the registry settings. I'm fairly sure this was true for CE 3.0, but
don't know whether it has been fixed since.

"Wolfgang Kaml" <wk...@phacor.removespam.com> wrote in message
news:OEcMKYPNCHA.2028@tkmsftngp10...

Wolfgang Kaml

ungelesen,
29.07.2002, 12:25:0229.07.02
an
I just got the right hint from somebody as a response to a different
posting.


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\AutoHide]
"Default"=dword:1


That works perfect for WinCE .Net - I just tested that.
Wolfgang

"Tim Clacy" <t...@phaseone.dk> wrote in message
news:3d450a14$0$10683$4d4e...@news.dk.uu.net...

Wolfgang Kaml

ungelesen,
30.07.2002, 11:31:4130.07.02
an
I'm missing some basics here and I cannot find the answer in any docu.

The situation is the following: I am using a Compact Flash directly
connected to my IDE cable. The CF is formated with FAT and boots Win98,
which loads NK.BIN.

My question is: If I want to install a read/write files system with Windows
CE, do I have to FDisk the CF before in Dos mode and create 2 partitions, or
is WinCE internally writing data back into NK.bin?
In other words, does the CF need to have two physical Dos partitions, to use
one as the primary WinCE drive, the second partition as a mounted read/write
file system, or is that all done on one partition?


Also, if I want to use a read/write file system so my app can store some
data which stay persistent throughout a power off/on cycle, is a hive based
registry mandatory?

I'd really appreciate some clarification! Thanks!!!
Wolfgang


"Steve Maillet (eMVP)" <nos...@EntelechyConsulting.com> wrote in message
news:OFYvk5RNCHA.2456@tkmsftngp13...

Steve Maillet (eMVP)

ungelesen,
30.07.2002, 12:26:1830.07.02
an
HIVE is only for the registry. You don't need 2 partitions Windows CE
can read FAT partitions just fine. It does not write back to the
NK.BIN file. If you are using a CF in TRUE-IDE mode then you need the
ATAPI driver, FATFS and the storage manager installed in your system.
You may need to set up the registry for the PCI enumeration to
recognize your systems IDE controller.

--
Steve Maillet (eMVP - Windows CE)
Entelechy Consulting
smaillet_EntelechyConsulting_Com

"Wolfgang Kaml" <wk...@phacor.removespam.com> wrote in message

news:eAVeF39NCHA.2528@tkmsftngp10...

Wolfgang Kaml

ungelesen,
30.07.2002, 12:56:5430.07.02
an
Thanks so much Steve. That is some direction I have now and I will try and
work it out. I only used the 'Compact Flash/PC Card Storage (ATADISK)' so
far. It looks like that I have to change that and use ATAPI instead.
Probably the CF BSP has been designed for read-only and for CF durability
reasons, which in fact is a good idea.

I did quiet a bit of experiments with Windows XP embedded before, and if you
are using CF, WinXP embedded sees the removable bit and cannot use the
Enhanced Write Filter (EWF). Now that I got the said software from SanDisk
which I read in another Newsgroup about, which allows to remove the
removable bit (flag), it might be a whole different story.

Back to WinCE .NET: In case the ATAPI driver might now work, maybe it might
be the flag on the CF which causes similar troubles. I can try and check
that out. Hopefully I will have success with the ATAPI driver, like you
suggested.

Yes, I know HIVE is for the registry, and I believe I am correct to say -
after reading your message - that is has no constraints to a persistent file
system. Now, if I make changes in the registry on a hive-based registry
device, those changes should stay persistent through a power off/on cycle as
well, true? - I would be glad if somebody could answer that in plain
English.

Now, how does WinCE .Net write to the file system, since it cannot change
NK.BIN (which includes the basic WinCE mounted file system with /Windows,
/Program Files, etc.? In Dos I see a bunch of Win98 boot files plus NK.BIN,
how about files which have been written in WinCE .Net mode? Will I be able
to see those files on that device if it has been booted in Dos?

The original task I have to accomplish is, to write some proprietary
application settings to a file and move them with some storage device to a
different WinCE device, where they can be loaded. A simple data exchange, so
to speak. Can that be accomplished with a second CF, or how would I do that,
since it comes apparent in this newsgroup, that default floppy drivers are
not available and only WinCE and programming wizards are able to create such
drivers.

Thanks for all your help - Steve! I really appreciate your support in this
Newsgroup!!!!
Wolfgang

"Steve Maillet (eMVP)" <nos...@EntelechyConsulting.com> wrote in message

news:#rLF5W#NCHA.1792@tkmsftngp08...

Paul G. Tobey

ungelesen,
30.07.2002, 15:24:0730.07.02
an
Don't forget that the registry is not 'automatically' written anywhere. If
you want the hive-based registry to be flushed, you have to call
RegFlushKey()...

Paul T.

"Wolfgang Kaml" <wk...@phacor.removespam.com> wrote in message

news:#uKro2$NCHA.2488@tkmsftngp09...
> YES !!!! It work! Thank's again folks for all your help and postings!
> Specially THANKS to Markus Pietrek <mpietre...@fsforth.de> who posted
> his settings in the news with the subject "Re: Missed something about CF
> card ?".
>
> At this point I still have one two issues left:
> 1) I cannot remote connect from the Dev PC to the device PC and make some
> use of Remote Registry Editor. I will spend some more time with the KITL
> issue... let's leave that open for a different trouble shooting task.
>
> Most important at this point -
> 2) Registry changes.
> I have been using a Hive-Based registry and if I make some changes on the
> system, they do not stay persistent through a power off/on cycle. That
> means, that the registry changes do not get physically written to the
> Compact Flash.
>
> Do I have to make some certain changes in the PB build configuration, to
> allow for registry changes? Can anybody point me in the right direction?
>
> Thanks,
> Wolfgang
>
>
> PS: For other folks who are interested in Compact Flash and read/write
> operations:
>
> 1) If you want to read/write to a Compact Flash device in true IDE mode,
do
> not use the "Compact Flash / PC Card Storage (ATADISK)" BSP. Instead, use
> the "ATAPI PCI/IDE Storage Block Driver" BSP and make sure you have added
> the settings suggested by Markus Pietrek to your platform.reg file.
> 2) You will see an additional folder within Explorer, "/Hard Drive"
opposed
> to as if you were using the "Compact Flash..." BSP, in which case that
> folder does not exist.
> 3) If you have a second FAT partition created in DOS, the Explorer will
> automatically show "/Hard Drive2". Only files added/changed in those
"/Hard
> Drive(x)" folders will make it persistent through a power off/on cycle.
> 4) An additional /Release folder has been added. I have not figured out
yet
> what it might be used for since I could not write anything to that folder.


>
>
>
> "Wolfgang Kaml" <wk...@phacor.removespam.com> wrote in message

> news:#b5Ttm#NCHA.2656@tkmsftngp09...

Wolfgang Kaml

ungelesen,
30.07.2002, 16:40:4330.07.02
an
Paul,

In other words, I cannot configure the PB's device configuration in such
way, that if an application changes a registry key, that this change will
automatically be written to disk?
So, what you are saying is, that - I guess - the Win OS function
RegFlushKey() has to be called to make the write to disk, correct?

Well, if that's the case, then I had a wrong understanding of hive-based
registry so far. I thought it would make it possible for any apps to write
registry changes directly back to disk.

The new idea seems to involve more efforts to get registry changes
permanent, but it seems safer, too.

Wolfgang

"Paul G. Tobey" <nos...@nospam.com> wrote in message

news:ehWKN6$NCHA.2680@tkmsftngp13...

Steve Maillet (eMVP)

ungelesen,
30.07.2002, 19:59:0830.07.02
an
Forget about the NK.BIN file for the moment.
Windows CE is just like all the other Operating systems with regard to
external files and storage. Applications call CreateFile() to open a
file and WriteFile etc.. to manipulate the file. The OS has a
Filesystem driver for the file system on the disk. (Usually FATFSD)
and a block device driver for the actual disk. The primary difference
is that Windows CE uses a singly rooted fille system instead of driver
letters. This really only effects how you construct paths or think
about filenames. So an external card appears as "\Storage card"
instead of "C:" Therefore, you can just open files in that "folder"
and they will be on the card as long as the card is functioning. (No
guarantees if you run it over with a steam roller ;^) )

Windows CE is designed to operate directly from ROM. (In terms of the
desktop PC it's kinda like merging the OS and the BIOS together in ROM
or FLASH) NK.BIN is a special file that contains the contents of such
a FLASH/ROM. On a PC architecture with a BIOS the BIOS starts up and
loads some type of loader that reads NK.BIN and places it into memory
and then jumps to it. On other devices the processor, on reset, will
jump directly to the Windows CE code already in ROM/FLASH.

The ROM contains some files in a ROM filesystem that is merged into
the single rooted file system under the \Windows folder. (e.g. ALL ROM
files appear under \Windows). Because these files are in ROM they are
not writeable. Windows CE also contains a RAM file system that is
merged into the Root of the file system so a file I create \Foo.bar is
in the RAM system. Unless your system is designed to retain the RAM
across power cycles then \Foo.bar is not persisted as the memory is
wiped when it loses power.

What you need to do is include support for the CF card in TRUE IDE
mode (at least according to the information you have provided) that
uses ATAPI.dll (ATAdisk is if you are using the CF card with a
CF/PCMCIA controller supporting hot plug etc... [Although I believe
ATAPI can handle PCMCIA as well])

The HIVE based registry takes the registry out of RAM and puts it into
a file (just like the desktop systems) so as long as the Hive file is
located on an external storage device the registry settings are
persisted across power cycles.


--
Steve Maillet (eMVP - Windows CE)
Entelechy Consulting
smaillet_EntelechyConsulting_Com

"Wolfgang Kaml" <wk...@phacor.removespam.com> wrote in message

news:#b5Ttm#NCHA.2656@tkmsftngp09...

Paul G. Tobey

ungelesen,
31.07.2002, 13:43:4631.07.02
an
You are absolutely correct. You cannot make all applications somehow know
when they are done changing the registry and have the system write it.

I would guess that the reasoning in the Windows CE development halls was
that, since writing the registry can be a lengthy process, you don't want,
in a real-time system, to be doing it randomly behind the running
application's back (and you *certainly* don't want to be doing it after
every registry call!)

Paul T.

"Wolfgang Kaml" <wk...@phacor.removespam.com> wrote in message

news:uN#QxjAOCHA.2604@tkmsftngp11...

Wolfgang Kaml

ungelesen,
31.07.2002, 20:34:3431.07.02
an
Steve,

Thank you so much for the elaborate explanation. I know that many folks here
will benefit from it, as a matter of fact, I forwarded it already to
somebody else to help out.

Question though: I changed my build, took out the Compact Flash component
and pluged in the ATAPI component. At that point, I was able to see a new
read-write mount point called "\Hard Disk".
As you mentioned, if I want to make changes to the registry persistent, I
have to change the registry to that location.

I tried to do that, by changing

; @CESYSGEN IF FILESYS_FSREGHIVE
; HIVE BOOT SECTION
[HKEY_LOCAL_MACHINE\init\BootVars]
"SYSTEMHIVE"="Documents and Settings\\system.hv"
"PROFILEDIR"="Documents and Settings"
"Start DevMgr"=dword:0
; @CESYSGEN ENDIF FILESYS_FSREGHIVE

to

; @CESYSGEN IF FILESYS_FSREGHIVE
; HIVE BOOT SECTION
;***** changed by Wolfgang Kaml, 31. July 2002 *****
[HKEY_LOCAL_MACHINE\init\BootVars]
"SYSTEMHIVE"="Hard Disk\\Reg\\system.hv"
"PROFILEDIR"="Hard Disk\\Reg"
"Start DevMgr"=dword:0
; @CESYSGEN ENDIF FILESYS_FSREGHIVE

But now, WinCE made my original "\Hard Disk" mount point which I had before
changing this setting become "\Hard Disk2" and created a new mount point
(within the NK.bin file system) "\Hard Disk".

So, I am stuck again. How can I change the folder for the hive files, so
that they will not be created in the NK.bin file system, but so that they
will be truely relocated to the read/write able area of my CF device?

Thanks,
Wolfgang


"Steve Maillet (eMVP)" <nos...@EntelechyConsulting.com> wrote in message

news:uM#37TCOCHA.1728@tkmsftngp09...

Steve Maillet (eMVP)

ungelesen,
31.07.2002, 21:20:5331.07.02
an
GO back over the old posts and search for HIVE based registry. There's
a lot of discussion and explanation - especially from Susan Dey at
Microsoft on setting that up. Basically the issue is making sure your
driver (ATAPI) is set up to boot before the HIVE is read but not be
loaded again later at the second stage of intitialization.

--
Steve Maillet (eMVP - Windows CE)
Entelechy Consulting
smaillet_EntelechyConsulting_Com

"Wolfgang Kaml" <wk...@phacor.removespam.com> wrote in message

news:OoNvELPOCHA.2628@tkmsftngp11...

Lloyd Sargent

ungelesen,
01.08.2002, 19:57:4101.08.02
an
You COULD start up a process at boot that periodically does a
RegFlushKey() - I think the documentation even hints at that.

I wrote a little app called Flusher that does the same thing (from the user
i/f). But that is the quick and dirty (i.e. for development only).

Cheers,

Lloyd

"Paul G. Tobey" <nos...@nospam.com> wrote in message

news:#16owmLOCHA.2524@tkmsftngp10...

Allen antworten
Dem Autor antworten
Weiterleiten
0 neue Nachrichten