I would like to attempt to create a "fake file" where when you do a 'dir' or
subsuquent command it shows the file and all the normal information for a
file. I can even open the file in notepad or such but the file must remain
as read-only at all times. The reason is that when someone opens the file
at that point they are reading a snapshot report of status items of their
machine ... like maybe memory and hard drive space and current CPU status.

A "copy" of this file to a new location is not necessary but would be nice.
To get the contents of this file from fake status to real status I would
just say "type fake.file > real.file" and it would be created.

Another possible choice would be to have a notification I guess when the
file is opened and at that point I generate a file in memory and give the
opening application a handle to that file and not the actual file.

I am new to device drivers but not to C++ and I create NT Services all the
time. My current design uses an NT Service to generate this file but it
would be much more effective if I could create this "fake file" for reasons
not entirely outlined above.

The only operating system that I plan on running this on is Windows 2000
Server/Professional or greater.

thanks!!

Re: is it possible (fake file) by Robby

Robby
Mon Sep 20 18:32:18 CDT 2004

The idea has a lot of merit. No device drivers, platform-independence...



"Pavel A." <pavel_a@geeklife.com> wrote in message
news:BFFA0173-F8AF-4E24-AEB2-AA1862D29837@microsoft.com...
> Instead of notepad, can they use a browser?
> then you just create a FTP server (or IIS...) and serve the snapshot data?
:-)
> --PA
>



Re: is it possible (fake file) by beginthreadex

beginthreadex
Tue Sep 21 07:36:54 CDT 2004

Robby Tanner wrote:

> The idea has a lot of merit. No device drivers, platform-independence...
>
>
>
> "Pavel A." <pavel_a@geeklife.com> wrote in message
> news:BFFA0173-F8AF-4E24-AEB2-AA1862D29837@microsoft.com...
>> Instead of notepad, can they use a browser?
>> then you just create a FTP server (or IIS...) and serve the snapshot
>> data?
> :-)
>> --PA
>>

So the answer is no? This is not possible?

Re: is it possible (fake file) by Don

Don
Tue Sep 21 07:50:18 CDT 2004

You can do it, with a file system or file system filter. This is the most
complicated of drivers in the kernel. You will need the IFS kit for around
$1000 US, plus a lot of work (18 months or more).


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply

"beginthreadex" <thomas_remkus@westwoodone.com> wrote in message
news:%23lRxai9nEHA.2808@TK2MSFTNGP10.phx.gbl...
> Robby Tanner wrote:
>
> > The idea has a lot of merit. No device drivers,
platform-independence...
> >
> >
> >
> > "Pavel A." <pavel_a@geeklife.com> wrote in message
> > news:BFFA0173-F8AF-4E24-AEB2-AA1862D29837@microsoft.com...
> >> Instead of notepad, can they use a browser?
> >> then you just create a FTP server (or IIS...) and serve the snapshot
> >> data?
> > :-)
> >> --PA
> >>
>
> So the answer is no? This is not possible?



Re: is it possible (fake file) by beginthreadex

beginthreadex
Tue Sep 21 08:45:53 CDT 2004

OK. Who makes the IFS kit? What does IFS stand for? I need to put this on a
project recomendation if they want this done. Thanks for all the extra
help!!

Don Burn wrote:

> You can do it, with a file system or file system filter. This is the most
> complicated of drivers in the kernel. You will need the IFS kit for
> around $1000 US, plus a lot of work (18 months or more).
>
>


Re: is it possible (fake file) by Don

Don
Tue Sep 21 09:09:20 CDT 2004

The IFS kit is from Microsoft
http://www.microsoft.com/whdc/DevTools/IFSKit/default.mspx. I would highly
recomend taking the OSR file system class
http://www.osr.com/seminars_dfsw2_5dl.shtml so you understand what you are
getting into.

As a consultant I would start the talking in the 6 figure range, so be aware
this is expensive. Also, going back to your original description, if this
is for status data, you may want to look at WMI. This will not do what you
are asking, but is the standard way in current windows to report the type of
data you are describing, and it can be done a lot simpler and cheaper than
what you propose.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply


"beginthreadex" <thomas_remkus@westwoodone.com> wrote in message
news:uFjQ%23I%23nEHA.3628@TK2MSFTNGP09.phx.gbl...
> OK. Who makes the IFS kit? What does IFS stand for? I need to put this on
a
> project recomendation if they want this done. Thanks for all the extra
> help!!
>
> Don Burn wrote:
>
> > You can do it, with a file system or file system filter. This is the
most
> > complicated of drivers in the kernel. You will need the IFS kit for
> > around $1000 US, plus a lot of work (18 months or more).
> >
> >
>



Re: is it possible (fake file) by Robby

Robby
Tue Sep 21 13:06:19 CDT 2004

"beginthreadex" <thomas_remkus@westwoodone.com> wrote in message
news:%23lRxai9nEHA.2808@TK2MSFTNGP10.phx.gbl...

>
> So the answer is no? This is not possible?

The answer is of course you can and it probably isn't worth the trouble and
expense when a viable, platform-agnostic, open-source (or proprietary,
whatever suits you) solution is just around the corner. You need to take a
really good look at the cost and benefits of accomplishing what you want and
contrast them to alternatives. Such as the one presented here.

Everything you require could be accomplished via a server side script. Many
sys admin tasks are being handled over HTML and other internet-enabled
technologies and services. With a little extra work, you can secure the
data. If all you want is some text information what does opening
"C:\Whateverdir\fake.file" in notepad have over opening
"http://systemname/fake.htm" (or fake.php or fake.asp or whatever) in
Internet Explorer? All I can see is that you don't have to go to great
effort, it is automatically remote and it is all done more-or-less in user
space. The data is readonly and is a snapshot (HTML is stateless).

> just say "type fake.file > real.file" and it would be created.

To save a copy, simply add a button to your form to open a "Save As..."
dialog

> I need to put this on a
> project recomendation if they want this done.

I don't know all the details of why you are leaning toward this solution of
course, but I personally would not put my name on this recommendation.
Whatever that's worth.

Cheers,
Rob



Re: is it possible (fake file) by Ray

Ray
Tue Sep 21 17:53:57 CDT 2004

What he said... Also:

Files in Windows don't work that way. If you introduce a "file" like
this, you are going to confuse users who expect files to be fixed
entities sitting on disk.

Shattering the user interface paradigm for (extremely) marginal features
is generally considered a "bad idea". It usually leads to numerous
unintended consequences.

Here's one example "unintended consequence": if you implemented
something like this, you would also have to be very careful not to open
up any security holes just because someone shares their disk on the
network. Being able to see the status of J. Random Driver on someone
elses machine just by opening a file strikes me as a very unnecessary
risk. And if you have any bugs in your driver's handling of this file,
you've now created a network vulnerability rather than just a local one.

How about a program called "SeeStatus.exe" instead? The user can double
click on it or type it in Start->Run just as easily, and get a result
that works the same way as all the other things on their machine.

Also, think about this: what if everyone did it? Do you really want 2
dozen file system filter drivers sitting around introducing bugs into
your *entire filesystem* just so someone could (hypothetically) type
"notepad filename" into a command prompt and have some status
information appear?

Robby Tanner wrote:
> "beginthreadex" <thomas_remkus@westwoodone.com> wrote in message
> news:%23lRxai9nEHA.2808@TK2MSFTNGP10.phx.gbl...
>
>
>>So the answer is no? This is not possible?
>
>
> The answer is of course you can and it probably isn't worth the trouble and
> expense when a viable, platform-agnostic, open-source (or proprietary,
> whatever suits you) solution is just around the corner. You need to take a
> really good look at the cost and benefits of accomplishing what you want and
> contrast them to alternatives. Such as the one presented here.
>
> Everything you require could be accomplished via a server side script. Many
> sys admin tasks are being handled over HTML and other internet-enabled
> technologies and services. With a little extra work, you can secure the
> data. If all you want is some text information what does opening
> "C:\Whateverdir\fake.file" in notepad have over opening
> "http://systemname/fake.htm" (or fake.php or fake.asp or whatever) in
> Internet Explorer? All I can see is that you don't have to go to great
> effort, it is automatically remote and it is all done more-or-less in user
> space. The data is readonly and is a snapshot (HTML is stateless).
>
>
>>just say "type fake.file > real.file" and it would be created.
>
>
> To save a copy, simply add a button to your form to open a "Save As..."
> dialog
>
>
>>I need to put this on a
>>project recomendation if they want this done.
>
>
> I don't know all the details of why you are leaning toward this solution of
> course, but I personally would not put my name on this recommendation.
> Whatever that's worth.
>
> Cheers,
> Rob
>
>

--
../ray\..

Please remove ".spamblock" from my email address if you need to contact
me outside the newsgroup.

Re: is it possible (fake file) by Maxim

Maxim
Tue Sep 21 19:06:26 CDT 2004

> I would like to attempt to create a "fake file" where when you do a 'dir' or

WMI is the way to go.

What you want is a UNIX-style /proc in Windows. There is no such thing. You can
write one with a tremendous effort using the IFS Kit, but it is by far simpler
to go the suggested way, and the suggested way for /proc or sysctl()
functionality in Windows is WMI.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com



RE: is it possible (fake file) by pavel_a

pavel_a
Mon Sep 20 12:55:01 CDT 2004

Instead of notepad, can they use a browser?
then you just create a FTP server (or IIS...) and serve the snapshot data? :-)
--PA


"beginthreadex" wrote:
> I would like to attempt to create a "fake file" where when you do a 'dir' or
> subsuquent command it shows the file and all the normal information for a
> file. I can even open the file in notepad or such but the file must remain
> as read-only at all times. The reason is that when someone opens the file
> at that point they are reading a snapshot report of status items of their
> machine ... like maybe memory and hard drive space and current CPU status.
>
> A "copy" of this file to a new location is not necessary but would be nice.
> To get the contents of this file from fake status to real status I would
> just say "type fake.file > real.file" and it would be created.
>
> Another possible choice would be to have a notification I guess when the
> file is opened and at that point I generate a file in memory and give the
> opening application a handle to that file and not the actual file.
>
> I am new to device drivers but not to C++ and I create NT Services all the
> time. My current design uses an NT Service to generate this file but it
> would be much more effective if I could create this "fake file" for reasons
> not entirely outlined above.
>
> The only operating system that I plan on running this on is Windows 2000
> Server/Professional or greater.
>
> thanks!!
>
>