This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to Catch Access is denied Error
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Jan 21, 2009
09:32 AM
How to Catch Access is denied Error
During my install I am copying an Adobe file *.joboptions
To C:\Documents and Settings\All Users\Application Data\Adobe\Adobe PDF\Settings
But the directory is set to Read Only.
The odd thing is I get the error message:
Feature: Adobe Acrobat 9.0
Component: Adobe Acrobat 9.0joboptions
File: C:\Documents and Settings\All Users\Application Data\Adobe\Adobe PDF\Settings\MYFILE.joboptions
Error: Access is denied
I get this message twice then the install exits but the funny thing is, that it manages to copy the file.
So do I:
1. Just try to catch this error?
2. Tell install in some way to ignore read only?
3. Set the directory attribute before copying then set it back?
And how do I do this?
To C:\Documents and Settings\All Users\Application Data\Adobe\Adobe PDF\Settings
But the directory is set to Read Only.
The odd thing is I get the error message:
Feature: Adobe Acrobat 9.0
Component: Adobe Acrobat 9.0joboptions
File: C:\Documents and Settings\All Users\Application Data\Adobe\Adobe PDF\Settings\MYFILE.joboptions
Error: Access is denied
I get this message twice then the install exits but the funny thing is, that it manages to copy the file.
So do I:
1. Just try to catch this error?
2. Tell install in some way to ignore read only?
3. Set the directory attribute before copying then set it back?
And how do I do this?
(6) Replies
‎Jan 23, 2009
10:34 AM
Wow I discovered the fix for
Feature: Adobe Acrobat 9.0
Component: Adobe Acrobat 9.0joboptions
File: C:\Documents and Settings\All Users\Application Data\Adobe\Adobe PDF\Settings\MYFILE.joboptions
Error: Access is denied
I had to set the "Potentially Locked property " to yes
I sure wish it had given a better error message.
Feature: Adobe Acrobat 9.0
Component: Adobe Acrobat 9.0joboptions
File: C:\Documents and Settings\All Users\Application Data\Adobe\Adobe PDF\Settings\MYFILE.joboptions
Error: Access is denied
I had to set the "Potentially Locked property " to yes
I sure wish it had given a better error message.
‎Mar 11, 2009
01:03 PM
That did not fix the problem.
What I find is before it errors it has already copied the file.
Then it errors again.
So then I abort and reinstall and the file is already present and it installs
with out error.
I have not been able to --
1. Catch this error?
2. Tell install in some way to ignore read only?
The only fix I can think of is to Xcopy the file on my own.
What I find is before it errors it has already copied the file.
Then it errors again.
So then I abort and reinstall and the file is already present and it installs
with out error.
I have not been able to --
1. Catch this error?
2. Tell install in some way to ignore read only?
The only fix I can think of is to Xcopy the file on my own.
‎Mar 12, 2009
02:05 PM
Have you tried overriding the OnFileError and OnFileReadOnly events in your script? These events should allow you to catch access denied or other errors encountered during file transfer.
‎Mar 13, 2009
08:46 AM
Yes I have both OnFileError and OnFileReadOnly events overridden in my script, with MessageBox to let me know if they are hit. Nether get called.
I have the file set for potentially locked.
As I said the first install even though it gives me the
---------
Feature transfer error
Feature: Adobe Acrobat 9.0
Component: Adobe Acrobat 9.0joboptions
File: C:\Documents and Settings\All Users\Application Data\Adobe\Adobe PDF\Settings\MYFILE.joboptions
Error: Access is denied
------
twice. But it still copies the file. So the second time it installs fine.
My only solution I can think of is to simply copy the file with
CopyFile. I will try that to see if I get errors.
I have the file set for potentially locked.
As I said the first install even though it gives me the
---------
Feature transfer error
Feature: Adobe Acrobat 9.0
Component: Adobe Acrobat 9.0joboptions
File: C:\Documents and Settings\All Users\Application Data\Adobe\Adobe PDF\Settings\MYFILE.joboptions
Error: Access is denied
------
twice. But it still copies the file. So the second time it installs fine.
My only solution I can think of is to simply copy the file with
CopyFile. I will try that to see if I get errors.
‎Mar 13, 2009
06:22 PM
You may try using CopyFile or XCopyFile, but since these functions share code with the standard file transfer functionality, they may also encounter errors copying the file.
Is there any way you can provide a way to reproduce this behavior?
Is there any way you can provide a way to reproduce this behavior?
‎Mar 18, 2009
09:35 AM
joshstechnij wrote:
You may try using CopyFile or XCopyFile, but since these functions share code with the standard file transfer functionality, they may also encounter errors copying the file.
Is there any way you can provide a way to reproduce this behavior?
I used XCopyFile and even though it returned the error it copied the file.
This is what I was seeing with "Feature transfer", but I can ignore the error and complete the install. I was not happy with this.
Even though I have administrative rights. The directory "C:\Documents and Settings\All Users\Application Data\Adobe\Adobe PDF" is set to "Read & Execute" , "List Folder Contents" , and "Read". The "Write" is turned off.
The directory I am trying to write too is C:\Documents and Settings\All Users\Application Data\Adobe\Adobe PDF\Settings\
I don't know if this is why I am getting the false errors or why it copies anyhow.
So I had two options change the permissions, then write the file, then change the permissions back, or simply change my application to specify where the .joboptions file is located. It was safer and easier to change the application, and copy the .joboptions file to my