Installer Problem Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
Wolfgang
I live to help wx-kind
I live to help wx-kind
Posts: 174
Joined: Mon Jan 28, 2019 8:22 am

Installer Problem

Post by Wolfgang » Mon Nov 25, 2019 3:42 pm

Hello I now encountered a problem making a working installer.

I have already splittet for 32 bit and 64 bit windows, and it calls seperate setups, this is working.

Then I created with Visual C++ the installer file.
But after it runs the setup, the rights of the folder are not set correctly, meaning I cannot open a file, and therefore get mistakes. And that should not be problem.

The setup of the directory structure is, that everything goes into the Program Files/Appfolder. And this appfolder, and the files below this have the wrong rights. If I change it manually it works.

Then I tried to set it from the setup programm. But somehow there is a mistake.

Code: Select all

   string wnow,wnow2,wnow3;
            string mcommand;
            wnow2 = "C:/windows/system32/icacls.exe ";
        wnow="C:/Program Files/Hadevarim";
        wnow3 = "  /grant  Jeder:(CI)(OI)(F) ";
        mcommand = wnow2+'"'+wnow+'"'+wnow3;
        system(mcommand.c_str());
Error Handle is not valid.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2512
Joined: Sun Jan 03, 2010 5:45 pm

Re: Installer Problem

Post by PB » Mon Nov 25, 2019 4:44 pm

Wolfgang wrote:
Mon Nov 25, 2019 3:42 pm
I have already splittet for 32 bit and 64 bit windows, and it calls seperate setups, this is working.

Then I created with Visual C++ the installer file.
What kind of installer is that? Do you really need separate 32- and 64-bit applications, wouldn't just 32-bit one suffice and make things easier?

FWIW, I use InnoSetup + Inno Script Studio. It is free, very simple to use yet quite powerful and I have never had to care about folder permissions, it just works.

User avatar
doublemax
Moderator
Moderator
Posts: 15068
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Installer Problem

Post by doublemax » Mon Nov 25, 2019 4:57 pm

+1 for using Inno Setup.

However: AFAIK the Programme/Program Files directories are special and normally an application can not even write into its own program directory. (Which it shouldn't do anyway). Try using one of the paths from wxStandardPaths, e.g. wxStandardPaths::GetLocalDataDir
https://docs.wxwidgets.org/trunk/classw ... 8b66d5b808
Use the source, Luke!

Wolfgang
I live to help wx-kind
I live to help wx-kind
Posts: 174
Joined: Mon Jan 28, 2019 8:22 am

Re: Installer Problem

Post by Wolfgang » Mon Nov 25, 2019 7:04 pm

Thanks for the inno Setup tip, with that it is possible to set the correct user rights. My approach could have worked as well, but only if started as administrator.

For Doublemax, i use that only for those stupid enough to put a datadirectory directly into the programm folder, in the end only the init folder with the settings is needed there the rest can be put everywhere.
I guess it could even work over the network, if put on a network drive.
Still have to check that.

Post Reply