cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
duddelar
Level 4

Unable to start application when files are installed to default installation folder.

Hi All,

I am new to install shield and created an application .I have files installed to default install location that is C:\Program Files (x86)\\\
But when I launch application on the desktop or from startmenu application is closing due to unable to access one of the xml file in the installation folder.
The same is working when I change the install location path and install to different location.
What can i do for application to work from the default install location.

Please help me in this regard.Appreciate your help.

Thanks & Rgds,
Ravi.
Labels (1)
0 Kudos

(11) Replies
chad_petersen
Level 9

One folder versus another should not matter. Any folder name should be fine for the installers own purposes as long as you have read/write access.

I suspect something else - like perhaps your program can't access something if there are spaces in the path? Something like that. There is nothing inside of an installer, generally, that you have to set to make it work in a default location.

The question to ask, in my mind anyway, is why can't your application access the particular XML file when you choose your default location?

You'd said "is closing due to unable to access one of the xml file in the installation folder." - this sounds like the problem to debug - could be space in the path is affecting your application - could be something else - but I highly doubt the installer itself is the issue. I think it is simply "exposing" the issue.

Chad
0 Kudos
rguggisberg
Level 13

Sounds like a permissions issue. Does user have proper permission to C:\Program Files (x86)\\\ ?
You did not say what you used for a "different location", but I bet it was something other than C:\Program Files (x86)\...
I would bet that a location of C:\Program Files (x86)\\\ would not work either.
0 Kudos
Stefan_M
Level 5

Solutions
1: Start your application with admin rights. (not a good idea)
2. Change your program. Files like XML the application have to change should be stored in something like c:\programdata\\
0 Kudos
duddelar
Level 4

chad.petersen wrote:
One folder versus another should not matter. Any folder name should be fine for the installers own purposes as long as you have read/write access.

I suspect something else - like perhaps your program can't access something if there are spaces in the path? Something like that. There is nothing inside of an installer, generally, that you have to set to make it work in a default location.

The question to ask, in my mind anyway, is why can't your application access the particular XML file when you choose your default location?

You'd said "is closing due to unable to access one of the xml file in the installation folder." - this sounds like the problem to debug - could be space in the path is affecting your application - could be something else - but I highly doubt the installer itself is the issue. I think it is simply "exposing" the issue.

Chad


Hi peterson,

Thanks you for your reply.I have created same folder structure in 😧 as D:\Program Files\Compname\Productname\ and installed and when i launch from desktop it works properly.
Only in the case of c:\Program Files\Compname\Productname\ it gives an exception System.UnauthorisedAcessException: Access to the path 'c:\Program Files\compname\productname\resources\xyz.xml' is denied.
Iam using installshield 2016 premier trial version.
Thank You
0 Kudos
duddelar
Level 4

chad.petersen wrote:
One folder versus another should not matter. Any folder name should be fine for the installers own purposes as long as you have read/write access.

I suspect something else - like perhaps your program can't access something if there are spaces in the path? Something like that. There is nothing inside of an installer, generally, that you have to set to make it work in a default location.

The question to ask, in my mind anyway, is why can't your application access the particular XML file when you choose your default location?

You'd said "is closing due to unable to access one of the xml file in the installation folder." - this sounds like the problem to debug - could be space in the path is affecting your application - could be something else - but I highly doubt the installer itself is the issue. I think it is simply "exposing" the issue.

Chad


Hi Peterson.
Same folder I have created in 😧 drive and it works fine.I guss it is a permission issue.But the user has all admin permissions.
Iam using trail version of installshield 2016 premier.So is that a problem.
0 Kudos
chad_petersen
Level 9

You can't use the Trial version to distribute the installer to the public - but it should be fine if you are just testing things to see how it works.

I would still recommend having someone who can debug your application look when it is installed to C:\Program......whatever path you find is not working - and debug the issue - Installers themselves don't control the application once it is installed.

Chad
0 Kudos
duddelar
Level 4

rguggisberg wrote:
Sounds like a permissions issue. Does user have proper permission to C:\Program Files (x86)\\\ ?
You did not say what you used for a "different location", but I bet it was something other than C:\Program Files (x86)\...
I would bet that a location of C:\Program Files (x86)\\\ would not work either.


Hi guggisberg,
Thanks for your reply.
Yes i was using d: folder for installation and it works fine.
But I guess if the installer is built for all users it should work where ever it is.
Pls correct me and tell me if anything needs to be done.

Thanks & Rgds,
Ravi.
0 Kudos
duddelar
Level 4

chad.petersen wrote:
You can't use the Trial version to distribute the installer to the public - but it should be fine if you are just testing things to see how it works.

I would still recommend having someone who can debug your application look when it is installed to C:\Program......whatever path you find is not working - and debug the issue - Installers themselves don't control the application once it is installed.

Chad


Hi Chad,
Thank you. I vll convey the same with developers.Iam using evaluation for testing.
Will soon have licensed one for our work.
0 Kudos
duddelar
Level 4

Stefan_M wrote:
Solutions
1: Start your application with admin rights. (not a good idea)
2. Change your program. Files like XML the application have to change should be stored in something like c:\programdata\\


Hi Stefan

Thanks for the reply.
You mean installation folder for placing xml files shud be different?

Thanks & Rgds,
Ravi.
0 Kudos
rguggisberg
Level 13

duddelar wrote:
Hi guggisberg,
Thanks for your reply.
Yes i was using d: folder for installation and it works fine.
But I guess if the installer is built for all users it should work where ever it is.
Pls correct me and tell me if anything needs to be done.

Thanks & Rgds,
Ravi.


Yes, it CAN work as you want, but you will have to do one of 3 things:
1. Do as Stephan_M suggested and "Change your program. Files like XML the application have to change should be stored in something like c:\programdata\\"
2. Go to the Releases view , select the Setup.exe tab and set the 'Required Execution Level' to "Administrator"
3. Have users specify 'Run as Administrator" when running your installer
0 Kudos
Stefan_M
Level 5

duddelar wrote:
Hi Stefan

Thanks for the reply.
You mean installation folder for placing xml files shud be different?

Thanks & Rgds,
Ravi.


Short information: The directories 'C:\Program Files' and 'C:\Program Files (x86)' are protected from the operating system. Only Setups with elevated rights are allowed to copy or change files in this two directories.

If your XML file has to be changed from your program then it schould be placed in c:\programdata\\" or if it depends on the the user context you should use C:\Users\%Username%\\
0 Kudos