Re: ADOStream Write Causes Permission Denied Error

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Dan Sikorsky (dsikor_at_gte.net)
Date: 05/06/04


Date: Thu, 6 May 2004 18:48:13 -0400

I thought that might be the case with Windows XP Pro.

My app is packaged using the Package and Deployment Wizard, then run and
installed to a separate folder to simulate a remote client doing an
installation. Included in the EXE app is a Live Update feature which
downloads a DLL from my website to the installation folder to overwrite the
prior version DLL.

It seems that I can rename the DLL prior to downloading the newer DLL with
the same name, and all is well ... the DLL downloads fine, but I end up with
a .dll.old file as well as the newer .dll file. Without renaming the .dll to
.dll.old I get the permission denied error.

Do you think getting rid of the dll and have an Update EXE and the actual
app EXE, and Shell to the Update EXE from the app EXE (and unloading the app
EXE), do the update, and shell back to the app EXE after unloading the
Update EXE?

--
Thank you kindly,
Dan Sikorsky MSCS, BSCE, BAB
"Paul Clement" <UseAdddressAtEndofMessage@swspectrum.com> wrote in message
news:8elk90tp3t8deal3b2uht8bcqu4rqdmqtl@4ax.com...
> On Thu, 6 May 2004 09:09:57 -0400, "Dan Sikorsky" <dsikor@gte.net> wrote:
>
> ¤ Environment: Windows XP Pro, IE 6
> ¤
> ¤ When downloading a file (a DLL needing to be updated), whose filename
> ¤ already exists, from a website using an HTTP response, I get a
Permission
> ¤ Denied error when executing the objADOStream.SaveToFile sFilePath,
> ¤ adSaveCreateOverWrite line below:
> ¤
> ¤         Set objADOStream = New ADODB.Stream
> ¤         objADOStream.Type = adTypeBinary
> ¤         objADOStream.Open
> ¤         objADOStream.Write objHTTP.responseBody
> ¤         objADOStream.SaveToFile sFilePath, adSaveCreateOverWrite
> ¤         objADOStream.Close
>
> There are two possibilities that are likely affecting your ability to
perform this operation. The
> first is that the file is open by the application or another process.
Second, the account under
> which this application is running does not have sufficient permissions to
write the file.
>
> If this is an ASP application, and authentication is Anonymous (no
authentication), I sincerely
> doubt that the IUSR or IWAM accounts have the appropriated permissions to
write to the file system.
> If you are using Basic authentication or higher, which requires
authentication, then the
> authenticated account must have sufficient permissions for the resource.
>
>
> Paul ~~~ pclement@ameritech.net
> Microsoft MVP (Visual Basic)


Relevant Pages

  • Re: Class termination
    ... It has everything to do with forms in the dll. ... The need to make the exe into an ActiveX. ... If your exe needs to reference a dll that is referencing it then ... you've got some *huge* problems in the design of your app. ...
    (microsoft.public.vb.general.discussion)
  • Re: file packer
    ... > c++ compiled program, some dll and some text files for my shaders, and I ... > want to pack all that in a single exe. ... it on the end of the exe, or put it in one of the COFF sections. ... files and linked with the app, this way, the data is allready in memory at ...
    (comp.compression)
  • Re: assembly and reuse
    ... library with extension dll. ... I just wonder if I have an exe file with a method called Foo is it ... It's darn easy to show forms from app2 in app one, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to prevent creating a big exe file.
    ... When "all is said and done" I think Refox or KonXise (not sure if Konxise ... Can I create an exe with the readonly tables in other .DLL file? ... you can split a project into separate "libraries" as .APP files. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Editors
    ... some strip them on exe files by default. ... "preferred base address" and, yup, relocations are completely ... DLL files, though, aren't loaded into their own address space but are ... EXE's "entry-point", though, is not "special" in that it's just an ...
    (alt.lang.asm)