Page 1 of 1

Installer Problem

Posted: Mon Nov 25, 2019 3:42 pm
by Wolfgang
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.

Re: Installer Problem

Posted: Mon Nov 25, 2019 4:44 pm
by PB
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.

Re: Installer Problem

Posted: Mon Nov 25, 2019 4:57 pm
by doublemax
+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

Re: Installer Problem

Posted: Mon Nov 25, 2019 7:04 pm
by Wolfgang
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.