I want to apply NTFS-Search to our project.
Our project have to find the files which we specified.(fast and exactly!)
But I'm not sure the program(NTFS-Search) works well.
What if the specified file is system file?
What if the file is being opened by a process with NO_READ_SHARE_MODE?
Do you think NTFS-Search can find any files?
I don't know about NTFS filesystem well.
So I can't find the answer myself.
Is there anyone who knows that?
I tried to find their email address, but I couldn't find.
Thanks in advance.
According to the description of that project it just scans the MFT for a specified file name. This means that neither the file attributes nor its share flags for open files should make any difference.
You can contact the developer on their user page at sf.net, by the way.
Related
I need to add version info and retrieve it from the CHM file to make it possible to make an alert message to a user about a new CHM-file version available and downloaded.
It means, that I should compare versions of CHM on different machines (Server and clients).
The other way is date and time checking, but I should remember about time zones, so this is complicated, because also one should remember about different file systems, according to Windows SDK help about SetFileTime function and FILETIME structure.
If someone knows the trick - please share.
.chm files don't have version information. You will need to find some alternative way to mark the file version.
One way that occurs to me is to include a topic in the help file that contains the version. I imagine that this topic would be hidden, that is not linked by any other topic, not in the table of contents, etc.
All that remains is for your application to be able to read that topic from the help file. I'm sure that can be done with a .chm file parser, if you can obtain one. Perhaps more easily you can get the platform browser to read the topic for you. You can use IHTMLDocument2 to read a URI like this:
mk:#MSITStore:C:\somedir\somefile.chm::/html/SomeTopic.html
I am working on a windows VSS application, I want some help regarding it.
After creating snapshot, how can I copy the files or files' blocks(sectors), preferably files' blocks, from volume snapshot using C/C++. Can someone guide me on this or can direct me to any samples or documentation doing the same.
Thanks in advance.
You can access VSS snapshot items using regular functions
CreateFile() to open a file
ReadFile() or BackupRead() to read/backup its data
Only the root path to the items will change
(for example, \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopyX\ instead of C:\ )
What do you want to know exactly?
I am trying to test out MVVMLight but the DLLs that come with it are BLOCKED. I have read about it and I am told to click the UNBLOCK in the file property.. but that doesnt exist for me.. Then I found out of a program called STREAMS that is suppose to unblock.. that didnt work... any other idea how to fix this?
Error 7
Could not load the assembly
file:///C:\MIX10-MVVM-Samples\Mix10.MvvmDemo2 -
End\Mix10.MvvmDemo2\Bin\Debug\GalaSoft.MvvmLight.Extras.SL4.dll
. This assembly may have been downloaded from the Web. If an assembly has been downloaded from the Web, it is flagged by Windows as being a Web file, even if it resides on the local computer. This may prevent it from being used in your project. You can change this designation by changing the file properties. Only unblock assemblies that you trust. See http://go.microsoft.com/fwlink/?LinkId=179545 for more information. Mix10.MvvmDemo2
The file contains an alternate data stream that indicates that the content was retrieved from the Internet and is not secure. This is a feature of the NTFS file system, one that's unfortunately well hidden because Explorer has no support for showing their content. You can see them from the command prompt with the DIR /R command option. And type their content with TYPE filename:streamname. And delete them with DELETE filename:streamname
Other tricks is to copy the file to a file system that doesn't support alternate data streams, that slices them off the file. A flash drive for example. Or a zip utility.
Later versions of Windows, I think starting with Win7, has built-in support for this in Explorer. Right-click the file, Properties and click "Unblock".
SysInternals has a great command line utility called Streams. This proved very useful for me.
Streams v1.56 - Enumerate alternate NTFS data streams Copyright (C) 1999-2007 Mark Russinovich Sysinternals - www.sysinternals.com
usage: streams [-s] [-d] <file or directory>
-s Recurse subdirectories
-d Delete streams
Execute the following command in the directory you wish to remove streams from (same effect as copying to USB/FAT32 drive)
streams.exe -d -s *.*
Unblock the zip file first, and then extract the dll's. Actually that's what they instruct to do here.
Only for general understanding. NTFS supports streams (see http://msdn.microsoft.com/en-us/library/aa364404%28VS.85%29.aspx). The full name of a stream is filename:stream_name:stream_type. So one can easy write some additional information about a file in an additional stream of file. If you download a file from the internet Internet Explorer write some simple information in a stream with the name Zone.Identifier. If you have a file test.dll downloaded from the internet you can use
more < test.dll:Zone.Identifier
to see information from the stream. You will see something like
[ZoneTransfer]
ZoneId=3
Unblocking is not much more as deleting of this stream. I recommend you to read http://weblogs.asp.net/dixin/archive/2009/03/14/understanding-the-internet-file-blocking-and-unblocking.aspx for more detaild information
I simply opened the dll file in notepad++ and saved it with a different name.
If it helps anyone, I pulled down two blocked DLLs from TFS.
My solution:
Inside of Windows Explorer, delete the two blocked DLLs.
Inside of TFS, do a 'Get Specific Version' operation on the folder, and make sure that 'Overwrite all files even if the local version matches the specified version' is checked so that you will pull down fresh copies of the deleted DLLs.
Rebuild your solution.
I have a homepage application, it was used to launch individual applications, and the CHM of homepage has a brief description of individual applications and links to launch other CHM help file. How can I archive it? Is there any API in CHM what I can use? Thanks in advance.
You must install the second CHM file in the same directory as the first. Then, you can create a link with href="name-of-other.chm" (i.e. just put the name of the other file into the href attribute).
If they are not in the same directories, try absolute paths and pray that users always put the files in the same place.
Besides the link Aaron mentioned, there is also something like master/slave chms, which is a deeper integration of CHMs:
http://www.helpware.net/htmlhelp/how_to_merge_ctx2.htm
http://www.helpware.net/htmlhelp/how_to_merge.htm
I would like to know who is locking a file (win32). I know about WhoLockMe, but I would like a command-line tool which does more or less the same thing.
I also looked at this question, but it seems only applicable for files opened remotely.
Handle should do the trick.
Ever wondered which program has a particular file or directory open?
Now you can find out. Handle is a utility that displays information
about open handles for any process in the system. You can use it to
see the programs that have a file open, or to see the object types and
names of all the handles of a program.
handle.exe
http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx
THis has helped me sooooo many times....
Download Handle.
https://technet.microsoft.com/en-us/sysinternals/bb896655.aspx
If you want to find what program has a handle on a certain file, run this from the directory that Handle.exe is extracted to. Unless you've added Handle.exe to the PATH environment variable. And the file path is C:\path\path\file.txt", run this:
handle "C:\path\path\file.txt"
This will tell you what process(es) have the file (or folder) locked.
In my case Handle.exe did not help.
Simple program from official Microsoft called Process Explorer was useful.
Just open as administrator and press Ctrl+f, type part of file name it will show process using file.
Handle didn't find that WhatsApp is holding lock on a file .tmp.node in temp folder.
ProcessExplorer - Find works better
Look at this answer https://superuser.com/a/399660
Computer Management->Shared Folders->Open Files
I have used Unlocker for years and really like it. It not only will identify programs and offer to unlock the folder\file, it will allow you to kill the processing that has the lock as well.
Additionally, it offers actions to do to the locked file in question such as deleting it.
Unlocker helps delete locked files with error messages including "cannot delete file," and "access is denied." Video tutorial available.
Some errors you might get that Unlocker can help with include:
Cannot delete file: Access is denied.
There has been a sharing violation.
The source or destination file may be in use.
The file is in use by another program or user.
Make sure the disk is not full or write-protected and that the file is not currently in use.