Petit cas d’ecole classic sous Metaframe:
- Hypothese:
										
- Mon disque systeme est M:
 
- Mon disque data est N:
 
- Les HomeDirectory sont sur \srvhomehome
 
- Les HomeDirectory sont mapper sur K:
 
- Mon RootDrive est c:
 
- Je remappe par Citrix les disques locaux. c$ –> v: …
 
- J’ai une application HardCoded qui va chercher sa conf dans: {c:monapplimonappli.ini}
 
- Sous W2K SP3 tous va bien.
 
 
- Test:
										
- je lance mon appli
 - crt+F3
 - new task
 - cmd.exe
 
 
Microsoft Windows 2000 [Version 5.00.2195]
 (C) Copyright 1985-2000 Microsoft
												Corp.
 K:>subst
 C:: => K:
 K:>dir c:
 The filename, directory name, or volume label syntax
												is incorrect.
 K:>net use
 New connections will be remembered.
Status Local Remote Network
 ——————————————————————————-
												OK           K:        \srvhomehomechavers  Microsoft Windows
												Network
              V:        \ClientC$               Client
												Network
              Y:        \ClientC$               Client
												Network
The command completed successfully.
 K:>dir c:
 The filename, directory name, or volume label syntax
												is incorrect.
 K:>subst c: /d
 Access denied – C:
 K:>set h
 HOMEDRIVE=K:
 HOMEPATH=
												HOMESHARE=\srvhomehomechavers
K:>subst e: %HOMEDRIVE%%HOMEPATH%
 K:>dir e:
  Volume in drive E is Home
  Volume Serial
												Number is C81C-08FD
Directory of E:
 28/07/2005  16:27       <DIR>          .
 28/07/2005  16:27       <DIR>          ..
 29/09/2004  21:16       <DIR>          bonus
 27/05/2003  17:44               45
												056 client.exe
 27/08/2004  12:20                  105
												clntnfo.ini
 (…)
 12/07/2005  10:41       <DIR>
												         WINDOWS
               12
												File(s)        335 268 bytes
    
												           8 Dir(s)     520 622 080 bytes free
										
- Constat:
										
- Mon rootdrive est bien monté.
 - Je n’y est pas acces.
 - Mes connections réseaux sont bonnes.
 - Je ne peux pas démonter mon RootDrive.
 - J’ai un %HOMESHARE%.
 - Si je recré un subst, il fonctionne.
 
 
Bref c’est pas tres logique, ca sent le bug! Le probleme c’est que ca continue à fonctionner pour les utilisateurs qui n’ons pas de HomeDrive réseaux ex: l’admin local.
-   Solution (c’est la mienne, si vous avez mieux il y a le Forum)
										
- Editer le usrlogon.cmd pour vérifier la présence de la variable HOMESHARE et effectuer un net use a la place du subst.
 
 
@Echo Off
 Call “%SystemRoot%Application Compatibility
												ScriptsSetPaths.Cmd”
 echo 0
 If “%_SETPATHS%” == “FAIL” Goto Done
												echo 1
												Rem
 Rem This is for
													those scripts that don’t need the RootDrive.
												Rem
											
 If
												Not Exist “%SystemRoot%System32Usrlogn1.cmd” Goto cont0
												Cd
												/d “%SystemRoot%Application Compatibility
												ScriptsLogon”
 Call “%SystemRoot%System32Usrlogn1.cmd”
 echo 2
												:cont0
											
 Rem
 Rem Determine the
													user’s home directory drive letter.  If this
													isn’t
 Rem set,
													exit.
 Rem
 Cd
												/d %SystemRoot%”Application Compatibility
												Scripts”
 Call RootDrv.Cmd
 If “A%RootDrive%A” == “AA”
												End.Cmd
 echo 3
												Rem
 Rem Map the
													User’s Home Directory to a Drive Letter
 Rem
											
 IF
												NOT “A%HOMESHARE%A” == “AA” goto HOMESHARE
 Net Use %RootDrive% /D >NUL: 2>&1
 Subst
												%RootDrive% “%HomeDrive%%HomePath%”
 if ERRORLEVEL 1 goto SubstErr
 goto AfterSubst
 echo 4
												:SubstErr
 Subst %RootDrive% /d >NUL: 2>&1
 Subst
												%RootDrive% “%HomeDrive%%HomePath%”
 :AfterSubst
 GOTO ENDHOMESHARE
 echo 5
											
 :HOMESHARE
   Net Use %RootDrive% /D >NUL: 2>&1
  
												Subst %RootDrive% /d >NUL: 2>&1
   net
												use %RootDrive% %HOMESHARE%
 :ENDHOMESHARE
 Rem
 Rem Invoke each
													Application Script.  Application Scripts are
													automatically
 Rem added to
													UsrLogn2.Cmd when the Installation script is run.
 Rem
 If
												Not Exist %SystemRoot%System32UsrLogn2.Cmd Goto Cont1
												echo 6
 Cd Logon
 Call %SystemRoot%System32UsrLogn2.Cmd
											
:Cont1
:Done