Posted by stephen harris in Coffee Lounge on Aug 25 2008, 11:24 am

I have wrapped my app in Inno and tested it on my computer.
I have Vista and when I am logged on as administrator I cannot launch the program unless I run it as administrator.
When I log on as guest I can launch it simply by double clicking.

Is there a solution to this problem?
I have tried the setting PrivilegesRequired=none but that doesn't work.

I notice that if I create a shortcut myself to the application in Program Files then it does work.
If I right click on properties I notice the difference is that the short cut I created myself says Start in C:\\Program Files\etc whereas the desktop shortcut created by Inno has this blank


Posted by northcode in Coffee Lounge on Aug 25 2008, 03:09 pm

When you create the shortcut in your Inno Setup script, make sure you set the working directory (to the same location you're installing the app) then it will work on Vista. I thought we had something in the FAQs about this but I didn't see it. I'll make sure it gets in there.


Posted by stephen harris in Coffee Lounge on Aug 25 2008, 07:11 pm

Thanks for that, Tim.
Actually, I did find that advice somewhere else on this forum but I don't know what it means in practice to "set the working directory to the same location you're installing the app".
I mean, what is the "working directory"?

If the application destination base folder (to quote Innos) is Program Files then is that not the working directory?
And is it not also the location I'm installing the app?


Posted by northcode in Coffee Lounge on Aug 25 2008, 08:58 pm

You need to specify a Workingdir for then entry in the cons] section of your ISS file. Something like this:

Name: "{group}\SWF Studio"; Filename: "{app}\studio.exe"; Workingdir: "{app}";


Posted by stephen harris in Coffee Lounge on Aug 26 2008, 04:37 am

Thanks for that. It works perfectly now.
Is it possible in simple language to explain why it works?


Posted by northcode in Coffee Lounge on Aug 26 2008, 09:18 am

There's a problem in the virtualization layer that only kicks in on Vista. If the working directory is not set properly, the application can't find itself to extract the files it needs to start up. Basically it assumes that the working directory is right, even when it's not there.