Our clients are frequently reporting issue that they are getting "Access Denied" exception when they used to run application that has been installed with downloaded setup file. Our installer, installs executable on 'Program Files' and creates configuration files at C:\ProgramData. Once installation is done, our application automatically run first time. Whenever user going to run it next time, it throws Access is denied as program can not able to access configuration files at C:\ProgramData.
Yes.. "Run as Administrator" is the solution but we can not ask our all paid users to do such. I have searched option at can set privileges by some alternative way then manually run executable as "Run as Administrator".
I have found that help page but that's not working for me. My application is java desktop application so I have created .exe.manifest file and put that manifest file into executable where images and other product's properties files resides.
Manifest does not work for me and I am still getting "Access Denied" issue.
This is content of manifest file -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="<product_name>"
type="win32"/>
<description>Description of your application</description>
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="true"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
How I can attach the application manifest to the executable as I have only copied that manifest where images and other product's properties files resides ?
Is there any thing need to update in manifest file as I have copied as-is content except ?
Exception --
java.io.FileNotFoundException: C:\ProgramData\.<poduct_name>\config\<Product_Name>.xml (Access is denied) stacktrace javax.xml.transform.TransformerException: java.io.FileNotFoundException: C:\ProgramData\.<Product_Name>\config\<Product_Name>.xml (Access is denied) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(Unknown Source) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source) at com.<Product_Name>.main.dr.a(Unknown Source) at com.<Product_Name>.main.dr.a(Unknown Source) at com.<Product_Name>.main.dr.a(Unknown Source) at com.<Product_Name>.main.h.k(Unknown Source) at com.<Product_Name>.main.ay.run(Unknown Source) Caused by: java.io.FileNotFoundException: C:\ProgramData\.<Product_Name>\config\<Product_Name>.xml (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream. (Unknown Source) at java.io.FileOutputStream. (Unknown Source) ... 7 more --------- java.io.FileNotFoundException: C:\ProgramData\.<Product_Name>\config\<Product_Name>.xml (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream. (Unknown Source) at java.io.FileOutputStream. (Unknown Source) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(Unknown Source) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source) at com.<Product_Name>.main.dr.a(Unknown Source) at com.<Product_Name>.main.dr.a(Unknown Source) at com.<Product_Name>.main.dr.a(Unknown Source) at com.<Product_Name>.main.h.k(Unknown Source) at com.<Product_Name>.main.ay.run(Unknown Source) and the cause isjava.io.FileNotFoundException: C:\ProgramData\.<Product_Name>\config\<Product_Name>.xml (Access is denied)