Creating/writing files on the client.

Jerry Lee jerry.lee at audserv.com
Fri Nov 11 14:22:43 EST 2011


Not true with the UAC enabled and trying to write out a file though omnis on
the webclient. I tried.

-----Original Message-----
From: omnisdev-en-bounces at lists.omnis-dev.com
[mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Stephen Miller
Sent: Friday, November 11, 2011 12:36 PM
To: OmnisDev List - English
Subject: Re: Creating/writing files on the client.

Hi

All users have access to the desktop and 'My Documents'

I hit a similar problem years ago and there is a known path to both.
Shame I can't remember what they are!

Regards

Stephen

On Fri, Nov 11, 2011 at 9:45 AM, Jerry Lee <jerry.lee at audserv.com> wrote:
> Well, I've found out what is causing the problem. It's the UAC 
> (Windows 7 User Access Control). The UAC is preventing the file(access 
> denied) from being written to the local file system. If I turn 
> off/disable the UAC on the client, it creates the file successfully.
>
> While that works, I don't think I can recommend to all users of the 
> application to turn off the UAC on their computer.
>
> At least I now know what it is and can try to figure out a way to deal 
> with it.
>
> Thanks, Jerry.
>
> -----Original Message-----
> From: omnisdev-en-bounces at lists.omnis-dev.com
> [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Andy 
> Hilton
> Sent: Thursday, November 10, 2011 10:53 AM
> To: OmnisDev List - English
> Subject: Re: Creating/writing files on the client.
>
> Jerry
>
> Sounds like if you do get a solution, the 'fix' would be good to know 
> about !
>
> Andy
>
> On Nov 10, 2011, at 11:51 AM, Jerry Lee wrote:
>
>> It does indeed work when pointing it to a network drive or usb memory 
>> stick but that isn't a desirable solution in this case. This is an 
>> external web app and I don't know what drives are available at any 
>> given time for any user. I don't want the user to have to select a 
>> file
> location every time.
>> Just want them to click a "view" button that will download the blob 
>> from the database into a file and open up the file on the client
computer.
>>
>> I'll have to research the Windows 7 permissions further to see if I 
>> can get it to work.
>>
>> Thanks for the help.
>>
>>
>> -----Original Message-----
>> From: omnisdev-en-bounces at lists.omnis-dev.com
>> [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of JR 
>> Wright
>> Sent: Thursday, November 10, 2011 9:27 AM
>> To: OmnisDev List - English
>> Subject: RE: Creating/writing files on the client.
>>
>>
>> Jerry -
>>
>> I have seen that happen with one of our clients running Windows 7.
>> They could not save the file to their own profile, including the 
>> desktop, even though they had full access rights.  It has been a 
>> while, but I think as a work around the client either saved the file 
>> to a mapped network shared drive or to the Public shared documents 
>> folder.  I have other clients using Windows 7 and it works without 
>> any
> errors.
>> ---
>> JR Wright, CTO
>> DirectLine Technologies, Inc.
>> jr_wright at directline-tech.com
>> www.directline-tech.com
>>
>>
>>> Ok, I changed my action and filewriteencoding to match what you are 
>>> using and I added the evFileWrite event and moved my one line of 
>>> code there. And now things are getting strange. When I select a file 
>>> location and file name and save, I get an error saying I don't have 
>>> permissions to save the file to that location (I have full control 
>>> on the location I'm selecting. I can manually create, edit and 
>>> delete files from that location).
>>>
>>> Then it suggest a different location to save the file and I accept 
>>> (my documents). It appears to save the file but when I try to locate 
>>> it, it's not there. Here is the weird part, When I run again and 
>>> browse to my documents (via the formfile control) I see the previous 
>>> file I saved. But it isn't really there. You can actually highlight 
>>> and select the file in that save as dialog, right mouse click on the 
>>> file and try to open it or copy it and then you get the message that 
>>> the file no longer exists and it can't be copied or opened.
>>>
>>> I'm guessing I have some sort of permissions issue but not sure what.
>>>
>>> FYI , I'm running windows 7.
>>>
>>>
>>> -----Original Message-----
>>> From: omnisdev-en-bounces at lists.omnis-dev.com
>>> [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of JR 
>>> Wright Sent: Wednesday, November 09, 2011 6:03 PM To: OmnisDev List
>>> - English Subject: RE: Creating/writing files on the client.
>>>
>>>
>>> I have set the formfiles objects for our forms with the following.
>>> It works really well and it lets me trap the file name prior to 
>>> actually writing the file to the local computer, just in case I want 
>>> to make changes to data being sent.
>>>
>>> $action=kEFWrite
>>> $filewriteoncoding=kUniTypeBinary
>>> $events = kEVFileWrite
>>>
>>> Under the $event method executing on client side On evFileWrite 
>>> ;;event Parameters pFileName Do
>>> $cinst.$objs.FORMFILEOBJ.$writefile(pFileName,vBinary)
>>>
>>>
>>> ---
>>> JR Wright, CTO
>>> DirectLine Technologies, Inc.
>>> jr_wright at directline-tech.com
>>> www.directline-tech.com
>>>
>>>
>>>> kUniTypeBinary and kFFWriteNow. I have tried changing the action to 
>>>> kffWriteEntireFileNow and kffWriteEntireFile with no success.
>>>>
>>>> -----Original Message-----
>>>> From: omnisdev-en-bounces at lists.omnis-dev.com
>>>> [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of JR 
>>>> Wright Sent: Wednesday, November 09, 2011 5:13 PM To: OmnisDev List
>>>> - English Subject: Re: Creating/writing files on the client.
>>>>
>>>>
>>>> Jerry -
>>>>
>>>> What are the Formfile object $action & $filewriteoncoding 
>>>> properties set to? --- JR Wright, CTO DirectLine Technologies, Inc.
>>>> jr_wright at directline-tech.com www.directline-tech.com
>>>>
>>>>
>>>>> I can't seem to figure out how to create and write a file on the 
>>>>> client using a remote form. I can create/write files to the server 
>>>>> no problem.
>>>>>
>>>>>
>>>>> Here are the various ways I have tried:
>>>>>
>>>>>
>>>>> iBinData is binary data retrieved from a database column.
>>>>>
>>>>> My methods are set to run on the client.
>>>>>
>>>>>
>>>>> --this doesn't seem to do anything and returns a successful status 
>>>>> of 0
>>>>>
>>>>> Do $cinst.$objs.FormFile.$writefile(iDest,iBinData) Returns 
>>>>> lnStatus
>>>>>
>>>>>
>>>>> --These work perfect if I set the method to NOT run on the client 
>>>>> but fail when the method is set to run on the client.
>>>>>
>>>>> Do ioFileOps.$createfile(iDest) Returns #F
>>>>>
>>>>> Do ioFileOps.$openfile(iDest) Returns #F
>>>>>
>>>>> Do ioFileOps.$writefile(iBinData) Returns #F
>>>>>
>>>>> Do ioFileOps.$closefile(iDest) Returns #F
>>>>>
>>>>>
>>>>> Any help would be appreciated.
>>>>>
>>>>>
>>>>> Thanks, Jerry.
>>>>>
>>>>>
>>>>> Jerry Lee
>>>>>
>>>>> Lead Programmer
>>>>>
>>>>> AudServ LLC.
>>>>>
>>>>> 612.964.5793
>>>>>
>>>>> <mailto:Jerry.lee at audserv.com> Jerry.lee at audserv.com
>>>>>
>>>>>
>>>>> _____________________________________________________________
>>>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>>
>>>>
>>>> ------------------------------------------------------------------
>>>> -- -------- ------------
>>>> The information contained in this email and any attachments is 
>>>> confidential and may be subject to copyright or other intellectual 
>>>> property protection. If you are not the intended recipient, you are 
>>>> not authorized to use or disclose this information, and we request 
>>>> that you delete the original message from your mail system.
>>>> _____________________________________________________________
>>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>>
>>>> _____________________________________________________________
>>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>
>>>
>>> --------------------------------------------------------------------
>>> -------- ------------
>>> The information contained in this email and any attachments is 
>>> confidential and may be subject to copyright or other intellectual 
>>> property protection. If you are not the intended recipient, you are 
>>> not authorized to use or disclose this information, and we request 
>>> that you delete the original message from your mail system.
>>> _____________________________________________________________
>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>
>>> _____________________________________________________________
>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>
>>
>> ---------------------------------------------------------------------
>> -
>> ------
>> ------------
>> The information contained in this email and any attachments is 
>> confidential and may be subject to copyright or other intellectual
> property protection.
>> If you are not the intended recipient, you are not authorized to use 
>> or disclose this information, and we request that you delete the 
>> original message from your mail system.
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>>
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
>



--
Kind Regards

Stephen Miller

+61 (0)415 968048

Skype: Stephen.Miller.1958

Work Phone: 08 6213 5697

Work E-mail: Stephen.Miller at health.wa.gov.au;
_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com




More information about the omnisdev-en mailing list