Shop OBEX P1 Docs P2 Docs Learn Events
Poor Choice for default file save location by the Basic Stamp Editor — Parallax Forums

Poor Choice for default file save location by the Basic Stamp Editor

RDL2004RDL2004 Posts: 2,554
edited 2014-10-05 08:53 in General Discussion
This is very weird.

I wanted to see where the Basic Stamp Editor saved files by default on the 64 bit version of Windows 7. I downloaded and installed the Basic Stamp Editor on a fairly clean and recent installation of Win 7 64 bit, then created a test file in the editor. When I went to save the file, it wanted to put it in C:\Windows\System 32 Huh? What's up with that? So I let it.

Then I went and looked, but the file is not there!

I closed and reopened the Editor and reloaded that same file. It opened fine and the path is right there in the title bar, C:\Windows\System32\ThisIsJustATest.bs2 - but that's not where the file actually is.

I had to search the entire C drive to find where it really was. I finally found it in SysWOW64 (C:Users\Rick\AppData\Local\VirtualStore\Windows)

Okay guys, what is the logic there? Why such and strange and unsual place to save files by default. In 5 years of using Windows 7 I've never seen a program do anything like this. It is very out of the ordinary and confusing.

Is this just some Windows thing or is it the intended operation of the program?

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-10-03 09:51
    I suppose you could consider this a Microsoft security feature ;-)
  • RDL2004RDL2004 Posts: 2,554
    edited 2014-10-03 10:06
    I can understand if Windows re-directed the file elsewhere. Programs should not be writing to system folders. But I'm not sure this is a Microsoft thing. That folder did not exist until I ran the Editor program. Something the program did instigated the creation of that folder. Why did that location even come up by default anyway?
    1024 x 578 - 89K
    1024 x 454 - 42K
    903 x 608 - 69K
  • RDL2004RDL2004 Posts: 2,554
    edited 2014-10-03 12:08
    Okay, a little research later finds that the virtual store folder is indeed Windows re-directing files. It happens when a program tries to save/access data in a location where it has no rights. It first appeared in Vista and was intended as a sort of compatibility feature for older software.

    This is not something the Basic Stamp Editor should be doing.
  • xanaduxanadu Posts: 3,347
    edited 2014-10-03 15:47
    I can confirm the default save location resorting to 'system32'. I thought it was because the "documents and settings" path is not available on Win Vista and higher.

    Supposed I could manually create it and find out lol...
  • xanaduxanadu Posts: 3,347
    edited 2014-10-03 16:01
    Apparently Windows has a built in symbolic link for the documents and settings folder pointed at the user folder in Vista and higher. Must be something else.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-10-03 20:53
    I noticed today in the class I was teaching that the Prop Tool does the same thing when first run: defaults to where the .exe file is. A student asked me how to save his file, and I said just to do a Save As. I was a bit nonplussed when the default directory choice was the program's own installl directory. I told the student, "Noooo. Don't put it there!" and guided him to a proper Documents directory.

    -Phil
  • CuriousOneCuriousOne Posts: 931
    edited 2014-10-03 21:18
    This is well known problem. Just run the editor in compatibility mode and it will save and revert to proper location.
  • RDL2004RDL2004 Posts: 2,554
    edited 2014-10-04 05:56
    Phil,

    I actually tried the Prop Tool also and noticed the same thing. Then I remembered that I hadn't actually installed it, but just copied the folder from another computer. I thought that might have had something to do with it. At any rate, Windows just created the virtual store folder and re-directed the saved file to there.

    I understand why Microsoft wouldn't want applications writing to the Windows folder, but why did they choose such an off the wall location to re-direct to? The AppData folder is hidden by default and the user has to jump through hoops just to find their file. It also doesn't make a lot of sense that applications are prevented from writing to "Programs Files", but if it's installed to "Program Files (x86)" there is no restriction.

    I'm pretty sure this is basically the same problem that the person in this thread is having:

    http://forums.parallax.com/showthread.php/157640-BS2-File-Problem
  • xanaduxanadu Posts: 3,347
    edited 2014-10-04 13:14
    I had always thought it was because my My Documents folder was redirected. I could understand keeping the demo code in the program directory, but the user written code should be stored in the My Documents folder so it can be backed up easily.

    Ideally you would want two locations to support non admin and admin users on one desktop -

    Demo code - c:\users\public\public documents\Basic Stamp Programs

    User code - c:\users\user\my documents\Basic Stamp Programs
  • GadgetmanGadgetman Posts: 2,436
    edited 2014-10-05 03:39
    A program that is run by someone with 'user' level access should NEVER be allowed to write to the application folder.
    Or any other folder containing executables.

    This is to stop trojans from installing its payload, user programs from destroying the OS and quite a few other issues.
  • RDL2004RDL2004 Posts: 2,554
    edited 2014-10-05 08:53
    Gadgetman wrote: »
    A program that is run by someone with 'user' level access should NEVER be allowed to write to the application folder. Or any other folder containing executables.

    Correct. And Microsoft has done a pretty good job, though flawed, of preventing this from happening.

    The real problem here is that, when first run, by default, both the Propeller Tool and Basic Stamp Editor software offer to save the user's files to locations where they have no permission to write.
Sign In or Register to comment.