importINI not working

Hello Forum,

i’d like to deploy DeskApp (tryed with Version 1.3.0 and v1.3.3 community) and it seems the “–importINI=’<path>’” funktion gets ignored.
(or i’m doing it completely wrong :) )

Installed DeskApp 1.3.3 x64
created deskapp.ini in “%appdata%\Kopano\DeskApp\deskapp.ini”:

forceImport=true

[general]
defaultProfile=profile_1
hideOnMinimize=true
autoLogin=true

[profiles.profile_1]
id=profile_1
name=profile_${USERNAME}	
rememberPassword=true
authType=webapp
url=https://webapp.domain.de/webapp/index.php?logon
username=${USERNAME}

[downloads]
openOnCompleted=true
showSaveAs=true

and start deskapp with:

deskapp --importini="%appdata%\Kopano\DeskApp\deskapp.ini"

DeskApp starts and asks me if i want to create a profile.
in “%localappdata%/Kopano/DeskApp/” the folder “User Data” will be created.

In my opinion the deskapp should create the profile “profile_kopano” and asks the user for password.

Second Question at this point:
Can i configure the Deskapp so the profile wont be created in “%localappdata%” but in “%appdata%”
(roaming profiles etc.)

Coffee_is_life

CentOS 7.4.1708
Mariadb-5.5.56-2
KC 8.5.1.0-8.1
Webapp 3.4.5.1202-47.1 (external Server - TCP-Socket)
Z-Push 2.3.9+0-90.1
PHP-MAPI: 8.5.1.0-8.1
DeskApp 1.5.0
DeskApp Devel 1.5.0
Outlook 2016(64bit) with KOE 1.6.244
Outlook 2010 - MAPI Zarafa Client 7.2.6

Hi,

did you try using the full path instead of %appdata% in the parameter?
Do you see any error in the devtools console (F12) when using the DeskApp devel version?

“%localappdata%/Kopano/DeskApp/” can be changed by GPO or commandline parameter. But it can be dangerous if you can’t ensure every deskapp that accesses the user data dir has exactly the same version at all times.
See https://jira.kopano.io/browse/KD-189 for more details.

The profile in the user data dir, and a DeskApp are two completely different things. So, changing the file path where the user data is saved is not possible by the ini.
Maybe we should rename the deskapp profiles to account…

-Björn

Sooo, after some try and errors im back here again :)

if i change the default user DataDir (https://jira.kopano.io/browse/KD-189) to “H:\Kopano\Deskapp” (mapped home-drive) the UserDataDir gets created here - ok thats what i want.

the docu said, deskapp will search for deskapp.ini in the default datadir. - It gets ignored in H:\Kopano\Deskapp.
If i dont change the location it will search at the default place.

Another problem i ran into:

I’ve got an automatic installation server which uses powershell scripts and “winexesrv” to start these.
Install is working, but i cant create a HKCU-Key in registry to define the “Deskapp.ini” for the user - the script is called with admin profile.
The user got no admin rights so an startup-script wont work either to import the reg file.

import.reg:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Kopano\Kopano DeskApp]
"askForDefaultApp"=dword:00000001
"importINI"="H:\\Kopano\\DeskApp\\deskapp.ini"

chromium defaultdata.reg:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Chromium]
"UserDataDir"="H:\\Kopano\\DeskApp"

any suggestions?

Coffee_is_life

CentOS 7.4.1708
Mariadb-5.5.56-2
KC 8.5.1.0-8.1
Webapp 3.4.5.1202-47.1 (external Server - TCP-Socket)
Z-Push 2.3.9+0-90.1
PHP-MAPI: 8.5.1.0-8.1
DeskApp 1.5.0
DeskApp Devel 1.5.0
Outlook 2016(64bit) with KOE 1.6.244
Outlook 2010 - MAPI Zarafa Client 7.2.6

Hi,

sorry for the late reply, but I was on vacation.

You need to place the ini file in “H:\Kopano\DeskApp\Default”.
You can always check the effective path using the DeskApp devel versions, open devtools (F12), and execute ‘nw.App.dataPath’ in the console.

Yes to write to HKLM the user needs admin permissions. Maybe we should extend that to also check HKCU.

Cheers,
Björn

Hello again,

i would like to know the status of this Problem… Checking the HKCU…

Another Problem i ran into:

i’ve uninstalled and installed Kopano Deskapp, imported a regfile:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Kopano\Kopano DeskApp]
"askForDefaultApp"=dword:00000001
"importINI"="\\\\<serverpath>\\kopano-deskapp\\deskapp.ini"

And changed the default data dir to H:\Kopano\DeskApp - this worked…

nw.App.dataPath
"H:\Kopano\DeskApp\Default"

But now i start the devel version, check the console aaaand:

importINI.js:62 Uncaught TypeError: Cannot read property 'hasOwnProperty' of undefined
    at importINI (importINI.js:62)
    at checkForINI (importINI.js:150)
    at main.js:31
importINI	@	importINI.js:62
checkForINI	@	importINI.js:150
(anonymous)	@	main.js:31

Ini-File:

forceImport=true
[general]
defaultProfile=profile_kopano
hideOnMinimize=true

[profiles.profile_kopano]
id=profile_kopano
name=Kopano-${USERNAME}
rememberPassword=true
authType=webapp
url=https://<serveraddress>/webapp/index.php?logon
username=${USERNAME}

any ideas?

// EDIT: OK the INI without Download-Section did work in the past, now i need to add this:

[downloads]
openOnCompleted=true
showSaveAs=false
defaultDownloadLocation=${TEMP}

working now -.- (seems so)

Coffee_is_life

CentOS 7.4.1708
Mariadb-5.5.56-2
KC 8.5.1.0-8.1
Webapp 3.4.5.1202-47.1 (external Server - TCP-Socket)
Z-Push 2.3.9+0-90.1
PHP-MAPI: 8.5.1.0-8.1
DeskApp 1.5.0
DeskApp Devel 1.5.0
Outlook 2016(64bit) with KOE 1.6.244
Outlook 2010 - MAPI Zarafa Client 7.2.6

Hi,

there is no update on also checking HKCU, yet. (https://jira.kopano.io/browse/KD-294)

The download section shouldn’t be mandatory. (https://jira.kopano.io/browse/KD-295)

Additionally you shouldn’t use profile_kopano, but profile_1, profile_2 and so on.

Cheers

@bjoernneumann said in importINI not working:

The download section shouldn’t be mandatory. (https://jira.kopano.io/browse/KD-295)

i know, but without it, the start fails with this error… after i added this section, it worked fine

this ini-file is general for all users on one store. Every User has only one Profile, stored on his own mapped home-drive

Coffee_is_life

CentOS 7.4.1708
Mariadb-5.5.56-2
KC 8.5.1.0-8.1
Webapp 3.4.5.1202-47.1 (external Server - TCP-Socket)
Z-Push 2.3.9+0-90.1
PHP-MAPI: 8.5.1.0-8.1
DeskApp 1.5.0
DeskApp Devel 1.5.0
Outlook 2016(64bit) with KOE 1.6.244
Outlook 2010 - MAPI Zarafa Client 7.2.6

Update:

IF i run Deskapp, it asks me to create a profile, second start aswell and all next ones…

if i run deskapp-devel once, it asks me for the password - how it should be.
if i run deskapp afterwards it asks me for the password aswell…

But i cant install devel everywhere for the initial ini-import -.-

cant open a console in normal version so i dont know why its not working there.

Any ideas why the normal version ignores the initial import?

(btw oi changed the default_profile to profile_1, and renamed the section to profiles.profile_1 and the id to profile_1 - to check if this is the erro why its recommended)

//Update:
If i start with normal exe, the data dir got this size: 5.876.919
if i start with devel, the data dir has this size: 28.798.299

something is wrong!!!

Coffee_is_life

CentOS 7.4.1708
Mariadb-5.5.56-2
KC 8.5.1.0-8.1
Webapp 3.4.5.1202-47.1 (external Server - TCP-Socket)
Z-Push 2.3.9+0-90.1
PHP-MAPI: 8.5.1.0-8.1
DeskApp 1.5.0
DeskApp Devel 1.5.0
Outlook 2016(64bit) with KOE 1.6.244
Outlook 2010 - MAPI Zarafa Client 7.2.6

@Coffee_is_life
There is no difference in the javascript code between devel and non-devel versions, if the same versions are used. So this is very strange.

You can also run deskapp from the commandline with deskapp.exe --enable-logging=stderr.
This should also print errors to the terminal.

You also have forceImport=true, so your profile will always be overwritten and thus the password is always blank.

Which version of DeskApp are you using?

All versions i use from kopano and its components are in my signature :)

thought the version-difference 1.3.0 to 1.3.22 isnt important - comes out, with deskapp 1.3.22 it worked :sweat_smile:

Coffee_is_life

CentOS 7.4.1708
Mariadb-5.5.56-2
KC 8.5.1.0-8.1
Webapp 3.4.5.1202-47.1 (external Server - TCP-Socket)
Z-Push 2.3.9+0-90.1
PHP-MAPI: 8.5.1.0-8.1
DeskApp 1.5.0
DeskApp Devel 1.5.0
Outlook 2016(64bit) with KOE 1.6.244
Outlook 2010 - MAPI Zarafa Client 7.2.6

Log in to reply

Looks like your connection to Kopano Community Forum was lost, please wait while we try to reconnect.