outlookcaldavsynchronizer icon indicating copy to clipboard operation
outlookcaldavsynchronizer copied to clipboard

Can't install on a virtual machine (no admin rights)

Open Ard625514 opened this issue 6 years ago • 13 comments

Many company's use "Bring Your Own Device" and provide access to their office environment through a VDI (Citrix or Mircosoft Remote Desktop). In order to sync my calendar events and contacts i would like to use OutlookCalDavSynchroniser (OCDS) in this environment. I tried to install OCDS at 2 clients and in both situations i got a "No admin rights" error. Would it be possible to make a non-install version (Portable)?

Ard625514 avatar Apr 20 '18 07:04 Ard625514

Not sure if portable Outlook Addins are possible or if that would need a standalone application. Not our focus atm.

aluxnimm avatar Apr 29 '18 13:04 aluxnimm

Portable is not the goal, installing without admin rights is what i need. Would that be possible?

Ard625514 avatar May 01 '18 21:05 Ard625514

install without Admin rights would be great.

Offerel avatar Jul 09 '18 07:07 Offerel

I agree, install without Admin rights would be great!

tobyX avatar Feb 19 '19 10:02 tobyX

Yeah, I need this feature, too.

rdoering avatar Sep 05 '19 04:09 rdoering

Is there a workaround, currently?

rdoering avatar Sep 05 '19 04:09 rdoering

You can extract all files manually either with 7Zip or by command line with msiexec /a drive:\filepath\to\MSI\file /qb TARGETDIR=drive:\filepath\to\target\folder. Thats enough for a update. For a fresh install, you must setup some registry keys to register the path to the plugin in Outlook. But i cant remember what key exactly it was.

Found it:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\Addins\CalDavSynchronizer.1]
"FriendlyName"="CalDavSynchronizer"
"LoadBehavior"=dword:00000003
"Description"="CalDavSynchronizer"
"Manifest"="file:///C:\\Path\\To\\CalDavSynchronizer\\CalDavSynchronizer.vsto|vstolocal"

Offerel avatar Sep 05 '19 04:09 Offerel

That's funny, I discovered this solution also and would like to describe it here. Thanks for pointing out the registration key.

What are you thinking about adding an batch file? IMHO it's unnecessary, because MSI is also able to handle this,but the currently configured one unfortunately not.

rdoering avatar Sep 05 '19 06:09 rdoering

A *.bat or *.cmd would be a good idea. Maybe interactive, so that you can specify if thats a update or new install. Or read the registry to decide, if it is update (if the key already exists). I don't know, if it is possible to read the registry via *.cmd

Offerel avatar Sep 05 '19 06:09 Offerel

Unfortunately I am not allowed to run powershell scripts on this maschine.

Thats why I could only set correct entry for me :-(

New-Item -Path $calDavSyncPath
  New-ItemProperty -Path $calDavSyncPath -Name "FriendlyName" -Value "CalDavSynchronizer" 
  New-ItemProperty -Path $calDavSyncPath -Name "LoadBehavior" -Value 3 -PropertyType dword
  New-ItemProperty -Path $calDavSyncPath -Name "Description" -Value "CalDavSynchronizer" 
  New-ItemProperty -Path $calDavSyncPath -Name "Manifest" -Value "file:///C:\\Tools\\CalDavSynchronizer\\CalDavSynchronizer.vsto|vstolocal" 

A better solution should looks like

$addinPath = "Registry::HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\Addins"
$isOutlookAddinAvailable = Test-Path -Path $addinPath

$calDavSyncPath = "$addinPath\CalDavSynchronizer.1"
$isCalDavSyncInstalled = Test-Path -Path $calDavSyncPath
if ($isCalDavSyncInstalled) {
  Write-Output 'update'
  Write-Output 'NIY'
} else {
  Write-Output 'install'

  New-Item -Path $calDavSyncPath
  New-ItemProperty -Path $calDavSyncPath -Name "FriendlyName" -Value "CalDavSynchronizer" 
  New-ItemProperty -Path $calDavSyncPath -Name "LoadBehavior" -Value 3 -PropertyType dword
  New-ItemProperty -Path $calDavSyncPath -Name "Description" -Value "CalDavSynchronizer" 
  New-ItemProperty -Path $calDavSyncPath -Name "Manifest" -Value "file:///C:\\Tools\\CalDavSynchronizer\\CalDavSynchronizer.vsto|vstolocal" 
}

rdoering avatar Sep 05 '19 07:09 rdoering

Oh... you are faster then me... i came up with a much like similar approach but as a *.bat file. I have put it here as CDS.bat.txt and also the source for it. It should work as expected. Maybe Alex can pack it in the release *.zip files as well.

@aluxnimm feel free to change my source and include it where you want. Maybe its helpfull to others as well.

CDS.bat.txt

@ECHO OFF
SET cdspath=
SET mode=2
SET regpath=HKCU\Software\Microsoft\Office\Outlook\Addins\CalDavSynchronizer.1
FOR /F "tokens=* USEBACKQ" %%g IN (`REG QUERY %regpath% /v Manifest 2^> nul`) do (SET cdspath=%%g)
SET cdspath="%cdspath:~30%"
SET cdspath=%cdspath:~1,-35%
IF "%cdspath%"=="" SET mode=1

IF "%mode%"=="1" (
	ECHO This will INSTALL CalDavSynchronizer, since i could not find it's path in the registry
	SET /P ipath=Please type in the path: 
	SET manifest=file:///%ipath%\CalDavSynchronizer.vsto^|vstolocal
	reg add %regpath% /v Manifest /t REG_SZ /d "%manifest%" > nul 2>&1
	reg add %regpath% /v LoadBehavior /t REG_DWORD /d 3 > nul 2>&1
	reg add %regpath% /v FriendlyName /t REG_SZ /d CalDavSynchronizer > nul 2>&1
	reg add %regpath% /v Description /t REG_SZ /d CalDavSynchronizer > nul 2>&1
	SET cdspath=%ipath%
) ELSE (
	ECHO This will UPDATE CalDavSynchronizer to the path: %cdspath%
)

SET extract=msiexec /a CalDavSynchronizer.Setup.msi /qb TARGETDIR=%cdspath%
%extract%
PAUSE

Offerel avatar Sep 06 '19 06:09 Offerel

I tried to do this today and did not work. Can someone confirm that it still works this way on his installation (or not)?

Nuube avatar Jun 03 '22 14:06 Nuube

I applied https://github.com/aluxnimm/outlookcaldavsynchronizer/issues/227#issuecomment-528194361 today. It works with an Outlook Version of 2016. Thanks for that.

mausquirk avatar Oct 31 '23 16:10 mausquirk