Can't open file for writing (Vista)

Hello,

Under Windows Vista I can't seem to open a file for writing - even when I run breve "as administrator" - yet my File object is being returned with no errors. I have taken the same breve code and run it under Windows XP with no problem.

Any ideas?

Thank you,
Marisano

Re: Can't open file for writing (Vista)

I have found that the file is being created. It's just being written into the C:\Windows\System32 directory for some unknown reason. Since I also open files for reading, and they are read from the current directory when no location is specified, under Vista, breve must be handling files open for writing differently than it handles files open for reading. It appears that the directory it is using is the first one found in the Path system variable (itself found in the Environment Variables list of the "System" Control Panel, Advanced system settings). This is not good. Can the expected behavior - i.e. using the current directory - that is found in earlier versions of Windows be easily restored under Vista and preserved in said previous versions??

Suggestions welcome.

Marisano

Good Question

The environment variable path in my mind is an assumption, unless you have tested it, by changing the environment variable. Try looking at file.tz
rewite it if you have to. Also read the breve source or search for read write commands.

Can you find any clues? I am sure there is a system level hook or escape in there somewhere. Jon has mentioned using system level C methods, hey try the pointer object and check the plug-in documentation. You can figure it out, System Admin.

I have not failed! I have only tried 100,000 ways that will not work. —Thomas Edison

Yes, I have tried it. I

Yes, I have tried it. I believe the real problem is that breve creates a new process, but that process does not have the same privileges, or at least not the same state, as the breve process itself (opened with administrator privileges). I do not know how to correct this.

Code Please

Actually I really need to see your code to know what the real issue we are look at is, and stop thinking like a system administrator, I don't know if it's vista, breve, your script or something else all together.

Trust me not that you code is not extremely personal or valuable. I have better research to attend to than gain from a read write in breve, I have robots in breve with lots, lots of moving parts. Breve is a piece of cake in its function (No offense intended Jon, the syntax is perfect). Send me the object function and maybe I can give you a straight answer.

When I get a chance I can contact someone to test Breve on Vista that is a real system admin and works on a few hundred PCs, you name it.

Be Specific

You said you tried it, what are you referring to specifically?
Can you see a process traced to breve or is this just an assumption?

Just for fun now since you are the administrator, change the write privileges for the directory where your user can save her work. Then put Breve in that directory, let me know what happens?

Are you saying that any program has absolute indiscriminate control of your machine? If you don't know then how can you know it's Breve and not something else?

Carry On,

I tried what you wrote about

I tried what you wrote about in your first response, altering the path variable. I also already know that the issue is with Vista because I have run the same code under Windows 2000 and XP with the expected results. I also "know" that breve has to launch a separate process in which the simulation runs, that is why when a simulation crashes, the IDE itself need not.

Really I was only wondering if anyone has already encountered the problem and solved it; otherwise I can return to it at a later time. It is not yet imperative as I am the only one in our group running Vista. If I do not solve it then, I can post example source. But there *is* nothing special about the source, that is precisely why I didn't post it.

Hooked It.

Running some simulations and encountered to my surprise an error like yours. Look for the org.spiderland.breve.plist well windows might not have such a type, when you do find the preference file/preference list whatever, for Breve, the root node has 32 key/value pairs, including a defaultPath.

I have not failed! I have only tried 100,000 ways that will not work. —Thomas Edison

Sorting it all out

I hope you solve the issue. You shouldn't be concerned with breve specifically, 2000 and XP work, there may not be a solution.

You indicated that breve can open a file for writing from the system defined path, changing this variable has no effect on your system. It doesn't exclude the system as the cause. Vista may be more secure, from a unix perspective I have alternative user accounts for normal operation, even with administrative privileges the user still has to bypass specific systems in order to install, read, or write from other parts of the system. This is a standard security measure.

I like Microsoft's OS redundancy it's fairly simple to make a change to a gateway or remote print spool directory, many on the commands are apparent, in many cases multiple changes need to be made in order to change the operation of the system, especially in networking. There may be another system variable file or administrative application to access before the write directory of your choosing can be altered.

I have tools that can interface on the system level, but more specifically it requires root access, not just administrative access to make a change. You may want to find out how to make this change not just for breve but for your own access to your system.

I have not failed! I have only tried 100,000 ways that will not work. —Thomas Edison

pretty sure

Yes, I am pretty sure that the problem is Vista's "fault" and not breve's. However, I was hoping that a fix that works as expected on all (Windows?) systems could be effected from within breve. [Sorry for the confusion.]

I probably won't come back to this in force for another month while I fix up the rest of the software, but then I might seek you out. Thanks for your input. I guess that you used one of the tools you mentioned to solve your similar issue?

Re: BrevePath

I realize it can be a real pain solving these inconsistencies between systems. A .plist is a stand Apple OS X preference file, the included developer tools apps opens it. The fact we learn so much about our systems makes it in many ways more difficult we're checking permissions, and running background process traces, when an average user would say "It might be a preference or some system plugin". Good luck coding.

I have not failed! I have only tried 100,000 ways that will not work. —Thomas Edison

Hello ... I have the same

Hello ... I have the same problem and I can't resolve. Ehere can I find some tutorial or info to resolve the problem ? Thanks and please help me

Bye

______________________
Submited by : Dietas

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.