|
True. I was thinking back to 2000.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I have written an application that, before it starts doing what it should do, first checks to see if there is a newer version of itself available on our network. It does so by checking the 'Creation Date' timestamp of an msi file.
Thus whenever I make changes I only need to rebuild the app and copy the msi file to the server. I wrote a little batch file that does the copying, using xcopy.
But lo and behold, a couple of days ago, I noticed that the app wasn't offering to update anymore (i.e. it had worked just fine up until then), and when I checked, I noticed that the 'Creation Date' of the copied msi file on the server was not the same as the 'Creation Date' of the original on my workstation. The 'Last Accessed' and 'Last Modified' dates were correct though.
I have tried to first delete the target file before copying the new one, but to no avail. Now obviously, I could change the code to use the 'Last Modified' timestamp but I really don't like the idea of manually updating 50+ installations, before that would start working.
My workstation runs XP pro and (unfortunately) the server still runs NT4 Server.
Can anyone please help me out with this, or at least explain to me how all attributes and timestamps are copied perfectly except the one?
Johan
|
|
|
|
|
Ran into a similar thing myself with log files. When you create a file on NTFS (which the server is probably using), if this involves deleting then recreating the file, the original creation time is cached (don't know how long for). The last accessed/modified are updated as you go, so normally this isn't a problem.
As a workaround, what I did was to use something like GetFileTime to retrieve all three file times, then use SetFileTime to update them so the creation time was set to the last access time. Since I was using native API calls, this wasn't exactly difficult.
Steve S
Developer for hire
|
|
|
|
|
Thanks Steve, you put me on the right track. I just found that moving the old file to an archive folder before copying the new file, seems to work. Apparently the creation time isn't cached if the original file isn't deleted / overwritten.
Johan
|
|
|
|
|
Timestamps are very hard to rely on. Why don't you update the minor version number within the MSI, and then check that version number when you check for updates?
|
|
|
|
|
Although something like that came to mind when I first started to developed an automatic update feature, I really had no idea how (and I still don't ). I was already kind of glad I got this system to work...
If you could put me on the right track though, I would definitely be gratefull!
Johan
|
|
|
|
|
hi
in C++ and other languages, there's a definition named _MAX_PATH. it's usually 260 which indicates the maximum path length including drive letter, folders and file in bytes.
the OS, on the other hand, has limitations too. it doesn't copy files from too nested folders. it generates an error instead. i like to know whether there's a way to overcome this barrier or increase this value. is this something implemented in the built-in OS or it has a way like changing some values in registry etc.
thanx
|
|
|
|
|
The length of a file path is a limitation of the OS. I am not sure WHERE the limitation is (OS code, file system, etc...) but it cant be changed.
|
|
|
|
|
That limit is built into the NTFS filesystem API. There is no way to change it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
You can prepend \\?\ to a path that's passed to a Unicode API, but even then, each component of the path is limited to MAX_PATH chars. That's Just How It Is(tm).
|
|
|
|
|
hi
what do u mean by "each component of the path"? the items between '\\''s? if so, the folders names are not long and are in the range of 0 and MAX_PATH. the problem is that number of folders are high. in such a case using UNC paths may solve the problem?
thx all
|
|
|
|
|
hi,
i want to record the windows(XP) display i.e record wat ever is there on the screen (monitor). can anyone tell me how can i do that.
|
|
|
|
|
hi
there are many software's for that ,like spy agent,ideal administrator,etc
regards,
vimal
|
|
|
|
|
Hi,
Have you tried www.wannakey.com
It's a cool tool
|
|
|
|
|
soft_jo wrote: Have you tried www.wannakey.com
Bugger off
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
Is there any way to determinate which sectors/clusters are
taken(bilong) to/by some file?
|
|
|
|
|
|
Hi,
I've just brought a new computer :
AMD 64 3800
1GB RAM
ASUS AM2 Motherboard
Geforce 7800 GT Graphics Card
2 SATA Hard Drives
DVDRW + CD Rom
And Windows XP 64 Edition.
The problems lies when I install Windows XP 64.
It boots up into Windows, theres some activity then it freezes. You can't click on anything, only move the mouse cursor.
Does anybody know why, or how to solve it?
Am I proberly better off with Windows XP 32
Many thanks in advance
Tom
|
|
|
|
|
hook it up to a debugger to see what is going on.
You need another PC with either null modem or firewore cable. Then run windbg on that PC. Hook it up to your 64 bit box having booted it in debug mode (by editing boot.ini). Look for /debugport in he windbg help.
Truth is the subjection of reality to an individuals perception
|
|
|
|
|
Check your computer documentation whether it support windows xp 64 bit.
|
|
|
|
|
Roath Kanel wrote: Check your computer documentation whether it support windows xp 64 bit.
He said:
AMD 64 3800
so it must support, it is 64 bit processor. If it woudn't support, setup woudn't run.
Does windows freeze in Safe Mode
|
|
|
|
|
The only suggestion is to make sure you have all the updated 64-bit drivers for all of your hardware, especially the motherboard.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
how to eliminate administrator requirements to run legacy softwares by the domain users without adding them to the local administrator group?
In fact the problem is, domain users are unable to debug the any of the .NET programmes unless i add them to local administrators group.
Please help me as early as possible.
raj
|
|
|
|
|
I have debug (developer?) rights on a few relatively locked down systems, IIRC that's a standard option not a custom userclass created by our sysadmin, but I'm not certain. Depending on how the legacy apps were written, unfortunately you might be stuck.
--
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
hi i got problem with windows, i got 2 internal harddisk in my comp, and i got problem after i reformat my comp, in windows i just got 1 harddisk detected , why it can happend and how to solve it?
thanks
|
|
|
|