I am not sure if there is any utility which monitors hard drive for any new files getting created.
I am using one application that creates many files on my hard drive but I am not sure how can I monitor those newly created files.
BTW I am using Windows VISTA x64 machine.
Thanks in advance !
In native code, use a directory change notification.
If you prefer .net, then use FileSystemWatcher.
If you are a programmer and know Python, you should check https://fascinator.usq.edu.au/trac/wiki/Watcher
It monitors folders/directory for file changes i.e. created, deletion, modification.
If you are a Java Programmer, you should check WatchService in JDK 7. http://download.oracle.com/javase/tutorial/essential/io/notification.html
Check out the FileSystemWatcher class. It will help you by notifying you when something in a particular directory has changed.
Related
I am writing a program for Microsoft refurbishers, and I would like to include a feature for creating a system recovery partition once all the necessary drivers are installed. The problem that I am running into is that it won't let me create the .wim file while the disk is mounted. When I try it gives me the error "The process cannot access the file because it is being used by another process". I have seen guides that say to boot to a windows installer, but that seems inefficient. Is it possible to create a backup of a running machine without booting to another drive? Any help is appreciated.
This can be done by creating a shadow copy of the drive. A free project using this approach was presented by the german c't magazine as a command script.
The project can be found and the scripts downloaded here:
c't WIMage.
Unfortunately this page is in german, but the script files may show you how it works.
I'm writing a Java class to pull the version # of Windows from the registry, and then using this number to determine whether or not I need to create registry values to create a local dump. If not I need to know where to look for the dump files. Which versions of windows already have this feature through Watson or anything else?
Thanks
Vista was the first OS to fully embrace the WER system. With that, several registry settings were made available to configure how Windows Error Reporting would work. The one(s) you're interested in are the "LocalDumps" keys. It's an easy task to write a utility program to set these flags including the target folder for the dump files.
While I realize Adobe discourages use of the application directory for reading/writing, I have been able to successfully write data there on OSX, so long as the user selected the file.
However, this same application is giving me trouble in Windows 7. Even a browseForSave() doesn't seem to allow the FileStream to write to the file.
Is there a workaround for this?
Or at least can anyone confirm that it DOES work for them? If you know a way to accomplish this, example code would be appreciated. I've tried a few different methods to no avail. This is for an internal development tool, and for our purposes it makes more sense to have the file in the application directory rather than app storage at the moment.
Windows 7 manages an application's access to it's own data. Put simply, it won't let you. As such AIR currently prevents you from doing it on any system for consistency's sake. See the linked thread for suggested alternatives from Adobe's Chris Campbell.
While this is a really cheesy work around, you can copy the file from app storage to the app directory after writing to the file. You would still have to write the file in the applicaiton storage directory though.
var theFile:File = new File(File.applicationStorageDirectory.nativePath).resolvePath('myfile.xml');
var theCopy:File = new File(File.applicationDirectory.nativePath).resolvePath(theFile.name);
theFile.copyTo(theCopy,true);
Then you can delete the storage file if you wish.
theFile.deleteFile();
We have an app that currently installs itself into 'program files\our app', and it puts the internal data files into the common Application Data folder. This means the program is available to any user on that particular PC.
Now we want to make a multi-user version of this program, multiple PCs accessing the program at the same time across the network.
In the bad old days, under XP, we'd just have the user who installed the app 'share' the app directory and off we'd go. In principle, is this still the 'right' way to do it under Vista/Windows 7?
We'd like to do this 'properly' and be as compliant as possible! Is there a recommended 'Microsoft' approach for doing this, or is it largely down to whatever we can get away with and subsequently support (hah!). I've tried researching this on the MS websites but not found anything too helpful at all - it'd be really useful to have a 'if you're trying to install this kind of thing, put it here' type guide for developers!
I think the recommended way to deal with this is one of the following:
Package the application as an MSI and distribute it via group policies to all machines on the domain. Yes, this will install it on every machine but that's usually how it should be done.
Install the application once on a server with terminal services and push a shortcut for running the program on that server to every client machine. You can transparently use single applications on a terminal server. Afaik you can even associate file types with those on the client machines.
Reading between the lines from other resources, and trying to make sense of it all, I've decided that the 'right' place to put the program data for this stuff really will be in the AppData (Roaming) folder, and the right place to put the program binary files themselves really will be the Program Files folder of the host computer, which I can then share out.
I re-image one of my machines regularly; and have a script that I run after the OS install completes to configure my machine; such that it works how I like.
I happen to have my data on another drive...and I'd like to add code to my script to change the location of the Documents directory from "C:\Users\bryansh\Documents" to "D:\Users\bryansh\Documents".
Does anybody have any insight, before I fire up regmon and really roll up my sleeves?
I use reparse points http://www.hanselman.com/blog/MoreOnVistaReparsePoints.aspx to redirect My Documents.
SHSetFolderPath Function should help, since this article mentions its use for folder redirection by the Group Policy API.