Train Store - Do NOT use with Windows XP
Moderator: Moderators
- mikesimpson
- Very Active Forum Member
- Posts: 6361
- Joined: Mon Dec 03, 2001 12:00 am
- Location: Southern Hemisphere Penal Colonies
- Contact:
Train Store - Do NOT use with Windows XP
Tony has alerted me to a problem with Train Store under XP, and I have done some testing of Tony Formoso's new utility Train Store, and although it works fine under Windows 98, it does not work properly with Windows XP - Only parts of routes (Activities/Services) and unused consists/trains are moved to the store.
They can all be copied back OK and nothing is lost, but until Tony gets this sorted out, it might be best not to use the program under XP.
I have however used it under Windows 98se and it appears to work exactly as advertised, and once you read the manual is easy to use.
They can all be copied back OK and nothing is lost, but until Tony gets this sorted out, it might be best not to use the program under XP.
I have however used it under Windows 98se and it appears to work exactly as advertised, and once you read the manual is easy to use.
Mike in OZ - Author of TS-Tools & Route-Riter.
http://www.agenetools.com
I'm not arguing (just explaining why I'm right).
http://www.agenetools.com
I'm not arguing (just explaining why I'm right).
- johndibben
- Bletchley Park:home of first programmable computer
- Posts: 14007
- Joined: Mon Dec 03, 2001 12:00 am
- Location: Bletchley
- alan2
- Peak Rail Route Author
- Posts: 5512
- Joined: Tue Jan 01, 2002 12:00 am
- Location: Secret Routebuilders Castle lost on the way to the toilet!
The compatability mode feature of Win XP is very handy.
Thank's for the alertment Mike, I have used the Tool to store a couple of routes already though.
Will Un-do and check too.
Thank's for the alertment Mike, I have used the Tool to store a couple of routes already though.
Will Un-do and check too.
Alan Heath
Why does DOS never Say Excelent Command or filename ?!!?!??
To Err is human, computers output the errors at higher speed.
Why does DOS never Say Excelent Command or filename ?!!?!??
To Err is human, computers output the errors at higher speed.
RE: MSTS Train Store - Not Working on XP
Once again, thank you to everyone who has assisted for your encouragement and hard work in helping me to solve this XP problem. I do appreciate it, and I hope that there has been no real damage done.
I have done a lot of searches, and read a lot of opinions, and then finally (it should have been first I think!*!* sorry) I went to MSDN and found the following concerning the rename function :-
"The rename function renames the file or directory specified by oldname to the name given by newname. The old name must be the path of an existing file or directory. The new name must not be the name of an existing file or directory. You can use rename to move a file from one directory or device to another by giving a different path in the newname argument. <b>However, you cannot use rename to move a directory. Directories can be renamed, but not moved.</b>" (My emphasis).
Now, it clearly isn't completely true, otherwise Train Store would have moved nothing, but it did move some folders on XP. But, I think that even if we did find some trick move solution, it would be dangerous, and always suspect to fly in the face of such a direct instruction.
I think what has happened is that MS have tightened up the processing on functions like rename to make the usual rename activities doable without huge security checking overheads. On platforms like ME, SE and 98, real security is not really included, so no problems.
This is not good news for Train Store, since its performance relies on the fact that a Route (or folder) could be moved with one instruction (assuming no part of it was needed), so the alternative is going to be slower.
I can change the strategy to fall in with the MS requirement. This is not difficult to do. But this severely impacts the performance (moving a Route takes minutes rather than seconds). So this is not the complete solution.
I am working on some additional ideas that I think will allow Train Store on XP to work as intended, albeit a bit slower.
I will post the results here as soon as I can.
In the mean time, please don't use Train Store on XP. It doesn't work on XP.
Thanks again to everyone for their assistance.
Tony
I have done a lot of searches, and read a lot of opinions, and then finally (it should have been first I think!*!* sorry) I went to MSDN and found the following concerning the rename function :-
"The rename function renames the file or directory specified by oldname to the name given by newname. The old name must be the path of an existing file or directory. The new name must not be the name of an existing file or directory. You can use rename to move a file from one directory or device to another by giving a different path in the newname argument. <b>However, you cannot use rename to move a directory. Directories can be renamed, but not moved.</b>" (My emphasis).
Now, it clearly isn't completely true, otherwise Train Store would have moved nothing, but it did move some folders on XP. But, I think that even if we did find some trick move solution, it would be dangerous, and always suspect to fly in the face of such a direct instruction.
I think what has happened is that MS have tightened up the processing on functions like rename to make the usual rename activities doable without huge security checking overheads. On platforms like ME, SE and 98, real security is not really included, so no problems.
This is not good news for Train Store, since its performance relies on the fact that a Route (or folder) could be moved with one instruction (assuming no part of it was needed), so the alternative is going to be slower.
I can change the strategy to fall in with the MS requirement. This is not difficult to do. But this severely impacts the performance (moving a Route takes minutes rather than seconds). So this is not the complete solution.
I am working on some additional ideas that I think will allow Train Store on XP to work as intended, albeit a bit slower.
I will post the results here as soon as I can.
In the mean time, please don't use Train Store on XP. It doesn't work on XP.
Thanks again to everyone for their assistance.
Tony
MoveFileAPI
Thanks Greg,
I did become aware of that API when I found out about the limitations of rename. But I was cautious about the bit that said it coordinated with the link tracking service on later versions of OS. I was concerned that only being able to build and test on ME, I might generate a parallel set of problems with movefile. Also I was wary that the MS information might not be quite true - after all rename does actually work on folders in some cases. So I felt that folder rename was an area best left alone from my ME perspective.
The problem seemed confined to the actual movement of a folder, so I changed stategy, and instead of moving complete objects (which I originally did because I thought it would be easier for people to understand) I now move only the files that are necessary. This means that folders are created and deleted, but not moved.
I was concerned that this would impact the performance of Train Store, but when I thought it through, I could see that there were also some matching performance benefits.
So that's what I did. The latest version is being tested and so far has passed, apart form one niggling problem with 'Unstore Everything!' which is quite important to me, as I want to be sure that non-technical people can use it and feel safe about un-using it, if you see what I mean.
I hope to be able to release a new version fairly soon working with XP, and with some minor user interface additions that people have kindly suggested.
Thanks for your help
Tony
I did become aware of that API when I found out about the limitations of rename. But I was cautious about the bit that said it coordinated with the link tracking service on later versions of OS. I was concerned that only being able to build and test on ME, I might generate a parallel set of problems with movefile. Also I was wary that the MS information might not be quite true - after all rename does actually work on folders in some cases. So I felt that folder rename was an area best left alone from my ME perspective.
The problem seemed confined to the actual movement of a folder, so I changed stategy, and instead of moving complete objects (which I originally did because I thought it would be easier for people to understand) I now move only the files that are necessary. This means that folders are created and deleted, but not moved.
I was concerned that this would impact the performance of Train Store, but when I thought it through, I could see that there were also some matching performance benefits.
So that's what I did. The latest version is being tested and so far has passed, apart form one niggling problem with 'Unstore Everything!' which is quite important to me, as I want to be sure that non-technical people can use it and feel safe about un-using it, if you see what I mean.
I hope to be able to release a new version fairly soon working with XP, and with some minor user interface additions that people have kindly suggested.
Thanks for your help
Tony
-
BobLatimer
- Very Active Forum Member
- Posts: 2765
- Joined: Mon Jan 07, 2002 12:00 am
- Location: Auckland, New Zealand
-
isambardkingdombrunel
- Very Active Forum Member
- Posts: 2350
- Joined: Thu Dec 06, 2001 12:00 am
- Fodda
- Very Active Forum Member
- Posts: 6157
- Joined: Fri Feb 22, 2002 12:00 am
- Location: Bristol, England
Oh dear... I installed and ran it on my XP Pro machine and it 'stored' all the routes but came up with a 'could not move folder...' warning for all the routes.
I then just unstored one route and sure enough MSTS loaded in about 10 seconds! Amazing I thought... and the route ran nicely and I chuffed up and down the 1930 S&C for an hour or so.
Then I turned off the computer, came to work and wrote beaming emails about it to all and sundry!
Saying it was excellent and a must use utility! Whoooooops or what...
I'll try and restore other routes later and see what happens.
Should have looked here first eh? Never mind...
I then just unstored one route and sure enough MSTS loaded in about 10 seconds! Amazing I thought... and the route ran nicely and I chuffed up and down the 1930 S&C for an hour or so.
Then I turned off the computer, came to work and wrote beaming emails about it to all and sundry!
I'll try and restore other routes later and see what happens.
Should have looked here first eh? Never mind...
-
buster1961
- Established Forum Member
- Posts: 351
- Joined: Wed Nov 27, 2002 3:26 pm
One of the issues we had to deal with was similar to this.gregp wrote:Tony,
Have you looked at the MoveFile API? The MSDN description says it will move directories (also MoveFileEx and MoveFileWithProgress but they are not available on older versions of Windows).
If you are using KillDir() or any similar function, even API calls such as MoveFile(), XP may interfere if it detects a file or sub-folder with a name or extension it recognises, this includes files called .dat, .raw and other names that may have a significant to a system.
MS were not very forthcoming so our solution was:
ChDir(DirectoryToKill)
Kill(*.*)
ChDir(..)
Kill(DirectoryToKill)
Once the directory was empty, XP would let us delete it quite happily.
It does mean that you have to keep a track of the directory structure to know where to go and what to Kill but as its MSTS and its pre-defined it shouldnt be a problem...
Thanks Greg
Thanks for the suggestion. It is appreciated.
That is effectively what this version does, but even that is not guaranteed. I found that when you are recursing (as well as cursing!) through folders, doing bottom to top deletions, it still would fail to delete a folder (usually any folder after the first one or two).
Eventually, as the folder deletions are not necessary for Train Store, I decided that if it doesn't delete, it doesn't matter. Next time Train Store goes that way in a folder deletion mode it will try and delete the empty folders as well. The folders are only in the Train Store Storage folder so thay are really only of interest to Train Store, and the folder deletion is only used in one particular function of Train Store.
I rationailised it as probably XP holding onto the folder to update its notification system, or perhaps the IIS indexer updating the indexes (that's a definite possibility on Win 2000).
Tony
Thanks for the suggestion. It is appreciated.
That is effectively what this version does, but even that is not guaranteed. I found that when you are recursing (as well as cursing!) through folders, doing bottom to top deletions, it still would fail to delete a folder (usually any folder after the first one or two).
Eventually, as the folder deletions are not necessary for Train Store, I decided that if it doesn't delete, it doesn't matter. Next time Train Store goes that way in a folder deletion mode it will try and delete the empty folders as well. The folders are only in the Train Store Storage folder so thay are really only of interest to Train Store, and the folder deletion is only used in one particular function of Train Store.
I rationailised it as probably XP holding onto the folder to update its notification system, or perhaps the IIS indexer updating the indexes (that's a definite possibility on Win 2000).
Tony
-
buster1961
- Established Forum Member
- Posts: 351
- Joined: Wed Nov 27, 2002 3:26 pm
I think you are right, the system has to catch up, also virus checkers get in the way when disk activity occurs, when we back up the ladder, we issue a DoEvents() to allow windows to refresh and also put a loop round the Kill() so that we can attempt 'n' times before giving up. It works well for us but MS need to provide a better solution, an unconditional delete would be nice but not likely.....