www.cendio.com
Bug 5758 - All SeamlessRDP files disappear from server after upgrade
: All SeamlessRDP files disappear from server after upgrade
Status: CLOSED FIXED
: ThinLinc
| WTS Tools (deprecated)
: 4.5.0
: PC Unknown
: P2 Normal
: 4.6.0
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2015-12-18 11:27 by
Modified: 2016-04-12 12:26 (History)
Acceptance Criteria:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From cendio 2015-12-18 11:27:33
Server: Windows 2012R2.
WTS-Tools: ~ 4.5.0post-4976

I've reproduced this two times now - first by accident and later intentional.

If SeamlessRDP is not in use, everything seems to be present after reboot. 

If SeamlessRDP is being used, updating WTS Tools will result in SeamlessRDP
files missing after reboot, (as the installer tells us to do). The files (plus
the temp files) were present before the reboot.
------- Comment #1 From cendio 2016-02-22 14:39:02 -------
We're having a hard time reproducing this now. The only way we've managed so
far is to install wts-tools a second time before rebooting.

NSIS seems to use the MoveFileEx Windows API, which handles moving files on
reboot. The file renames are present in a registry entry, in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\PendingFileRenameOperations
------- Comment #2 From cendio 2016-02-22 15:42:43 -------
(In reply to comment #1)

The way we install files is by a helper macro in NSIS that installs /file/ to
/file.tmp/, deletes /file/ on disk, and finally renames /file.tmp/ to /file/.
The latter two operations are combined with a /REBOOTOK flag, meaning that if
there is an error deleting and/or renaming the file, it will be done on next
reboot.

Installing tl-wts-tools twice when, for example, seamlessrdp32.dll is being
used will lead to the following operations being scheduled after next reboot:

 1. delete seamlessrdp32.dll
 2. rename seamlessrdp32.dll.tmp to seamlessrdp32.dll
 3. delete seamlessrdp32.dll
 4. rename seamlessrdp32.dll.tmp to seamlessrdp32.dll

Here, step four will fail because the tmp file has already been erased by step
two, leading to the scenario described in the description.

A way around this problem would be to start generate and use a unique temporary
file name for each file to be installed.
------- Comment #5 From cendio 2016-03-02 13:06:52 -------
Works fine. Tested double installation with a locked file for:

 - wts tools
 - ThinLinc client
 - Custom installer built by customizer

In all three cases I saw a whole bunch of temp files, and after reboot it was
only the proper files left with nothing missing.

Tested on 2012R2.