Feature #2246
RCP: 0.7.8beta, unavailable user directory
Statut: | Closed | Début: | 18/11/2016 | |
---|---|---|---|---|
Priorité: | High | Echéance: | ||
Assigné à: | - | % réalisé: | 100% |
|
Catégorie: | Setup | Temps passé: | - | |
Version cible: | TXM 0.7.9 |
Description
The TXM Windows launcher builds the TXM user directory path using the HOMEDRIVE and HOMEPATH environment variables. See #1931 ticket.
If the user unplugs the network (cable/wifi) then the HOMESHARE=HOMEDRIVE+HOMEPATH directory does not exist (IF EXIST) and TXM can't start.
Solution 1¶
A solution is to test the directory existence in the TXM.bat script and try the USERPROFILE path instead.
If the USERPROFILE path does not exist also, abort TXM launch.
set installdir=%~dp0 set DEBUG=0 set USERHOME=%HOMEDRIVE%%HOMEPATH% echo "USERHOME=%USERHOME%" IF EXIST %USERHOME% GOTO USERHOMEOK set USERHOME=%USERPROFILE%\ IF EXIST %USERHOME% GOTO USERHOMEOK2 echo "HOMEDRIVE+HOMEPATH = %HOMEDRIVE%%HOMEPATH% and USERPROFILE = %USERPROFILE% do not exist. Unable to find TXM configuration, aborting TXM launch." exit :USERHOMEOK2 echo "HOMEDRIVE+HOMEPATH = %HOMEDRIVE%%HOMEPATH% does not exist, using USERPROFILE = %USERPROFILE% value instead." :USERHOMEOK
cons: this solution is ambiguous and the user&admin don't know where the TXM files are stored.
Solution 2¶
Windows environment variables:- HOMEDRIVE%HOMEPATH% : any pc (first launch, next launches), connected, always access to the same distant drive TXM HOME directory
- USERPROFILE : same pc (first launch, next launches), connected or not, always access to the same local drive (C:\) TXM HOME directory
Add a new NSIS install option "roaming profile" with 2 values: false (default) and true
if "roaming profile" is set, the TXM.bat script will always try to use the HOMEDRIVE%HOMEPATH% (the script aborts if not available and show a dialog "TXM could not starts TXM using HOMEDRIVE%HOMEPATH% directory, please contact your admin or install TXM without the 'roaming profile' option")
if not it will always use the USERPROFILE directory (the script aborts if not available and show a dialog "TXM could not starts TXM using USERPROFILE directory")
cons: is HOMEDRIVE%HOMEPATH% always pointing to the roaming account files ?
Solution 3¶
Drive TXM user home directory using a specific environment variable called TXMHOME the home directory path to use.
TXM.bat algorithm to set the user home directory is:- if TXMHOME is set
- if TXMHOME exists
- then run TXM
- else abort and show a dialog "TXM could not starts TXM using TXMHOME=%TXMHOME% directory"
- if TXMHOME exists
- else use USERPROFILE
- if USERPROFILE exists
- then run TXM
- else abort TXM launch and show a dialog "TXM could not starts TXM using USERPROFILE=%USERPROFILE% directory"
- if USERPROFILE exists
cons: admins must set the TXMHOME if they have roaming account
Solution 4 (to finalize)¶
Drive TXM user home directory using 2 specific environment variables:- TXMSHAREDHOME: the distant home directory to use
- TXMHOME: the local home directory to use
- to use TXMSHAREDHOME
- if TXMSHAREDHOME is not reachable to use TXMHOME
- if TXMHOME is not reachable to use USERPROFILE
- if USERPROFILE is not reachable abort TXM launch and show a dialog "TXM could not starts TXM using USERPROFILE directory"
cons: admins must set the TXMSHAREDHOME if they have roaming account and TXMHOME
Historique
#1 Mis à jour par Matthieu Decorde il y a environ 8 ans
- Version cible changé de TXM 0.8.0a (split/restructuration) à TXM 0.7.8
#2 Mis à jour par Matthieu Decorde il y a environ 8 ans
- Description mis à jour (diff)
#3 Mis à jour par Matthieu Decorde il y a environ 8 ans
- Description mis à jour (diff)
#4 Mis à jour par Matthieu Decorde il y a environ 8 ans
- Description mis à jour (diff)
#5 Mis à jour par Matthieu Decorde il y a environ 8 ans
- Description mis à jour (diff)
#6 Mis à jour par Matthieu Decorde il y a environ 8 ans
- Description mis à jour (diff)
#7 Mis à jour par Matthieu Decorde il y a environ 8 ans
- Description mis à jour (diff)
#8 Mis à jour par Matthieu Decorde il y a environ 8 ans
- Description mis à jour (diff)
#9 Mis à jour par Matthieu Decorde il y a environ 8 ans
- Description mis à jour (diff)
#10 Mis à jour par Matthieu Decorde il y a environ 8 ans
- Description mis à jour (diff)
#11 Mis à jour par Matthieu Decorde il y a environ 8 ans
- Description mis à jour (diff)
#12 Mis à jour par Matthieu Decorde il y a presque 8 ans
- Version cible changé de TXM 0.7.8 à TXM 0.7.9
#13 Mis à jour par Matthieu Decorde il y a presque 8 ans
- % réalisé changé de 0 à 80
#14 Mis à jour par Matthieu Decorde il y a plus de 4 ans
- Statut changé de New à Closed
#15 Mis à jour par Sebastien Jacquot il y a plus d'un an
- % réalisé changé de 80 à 100