Profil Ctx_SmaUser

"chavers" wrote:
@jolebarjo

dans Regedt32 quand tu charge la ruche du ctx_smauser, c'est bien son ntuser.dat que tu prend, et c'est bien son HKU qui est monté ??? ou est le probleme.
Je pense que l'on parle de la même chose.

Pour suivre ce sujet, voici une petit coupe cmd/vbs pour lister la conf et l’utilisation du registre.



créer deux fichier rsl.cmd et rsl.vbs sur un serveur Metaframe ([private joke] [sub:cjdcmhsu]et oui Thin, moi j’ai le droit de dire Metaframe[/sub:cjdcmhsu] ;D [sub:cjdcmhsu]Metaframe, Metaframe, Metaframe, Metaframe, Metaframe [sup:cjdcmhsu]que c’est bon[/sup:cjdcmhsu][/sub:cjdcmhsu] ^^ [/private joke]) et copier les code ci-dessous. Enfin lancer le cmd dans une fenêtre dos.



@echo off
for /f "tokens=1 skip=3" %i in ('qfarm /load') do cscript //nologo rsl.vbs %i


on error resume next



strComputer = WScript.Arguments(0)



Set objWMIService=GetObject("winmgmts:{impersonationLevel=impersonate}!\"& strComputer & "rootcimv2")

Set colItems = objWMIService.ExecQuery("Select * from Win32_Registry")



For Each objItem in colItems

Wscript.Echo strComputer & vbtab &"Current Size: " & objItem.CurrentSize & vbtab & "Maximum Size: " & objItem.MaximumSize

Next




voila le résultat pour moi:

for /f "tokens=1 skip=3" %i in ('qfarm /load') do cscript //nologo N:toolget_registry_string.vbs %i

FSM10 Current Size: 89 Maximum Size: 153

FSM11 Current Size: 74 Maximum Size: 153

FSM12 Current Size: 87 Maximum Size: 153

FSM14 Current Size: 36 Maximum Size: 153

FSM15 Current Size: 30 Maximum Size: 153

FSM16 Current Size: 32 Maximum Size: 153

FSM17 Current Size: 28 Maximum Size: 153

FSM18 Current Size: 29 Maximum Size: 153

FSM19 Current Size: 46 Maximum Size: 153

FSM21 Current Size: 28 Maximum Size: 153

FSM24 Current Size: 27 Maximum Size: 153

FSM25 Current Size: 28 Maximum Size: 153

FSM26 Current Size: 43 Maximum Size: 153

FSM27 Current Size: 67 Maximum Size: 153

FSM28 Current Size: 28 Maximum Size: 153

FSM29 Current Size: 32 Maximum Size: 153

FSM30 Current Size: 68 Maximum Size: 153

FSM41 Current Size: 69 Maximum Size: 153

PIXID01 Current Size: 27 Maximum Size: 153


j'ajoute ce poste a la section script.
"chavers" wrote:
sur un serveur Metaframe ([private joke] [sub:26fu5mpj]et oui Thin, moi j'ai le droit de dire Metaframe[/sub:26fu5mpj] ;D [sub:26fu5mpj]Metaframe, Metaframe, Metaframe, Metaframe, Metaframe [sup:26fu5mpj]que c'est bon[/sup:26fu5mpj][/sub:26fu5mpj] ^^ [/private joke])

ah? j'ai employé ce mot en public ? :o :P :P

un :angel: passe.

[glow=red,2,300]Metaframe[/glow] [glow=green,2,300]Metaframe[/glow] [glow=yellow,2,300]Metaframe[/glow] [glow=blue,2,300]Metaframe[/glow] ;D

Tous mes voeux à tout le monde et encore merci pour toutes ces réponses.



chavers : ton script est intéressant, mais il me semble qu’il manque un % pour %i, chez moi si je ne rajoute pas sa ne marche pas.

exacte ! j’ai fais un copy/past depuis mon dos. Dans un fichier CMD les % doivent être doublé.

Encore merci…

Nous avons implémenté la suppression du profil ctx_smauser au reboot des serveurs via un script.

Tout fonctionne parfaitement, nous n’avons plus de problème.

Je colle le script ici des fois que sa puisse aider…



Le choix a été prix d’utiliser ce script dans le planificateur Windows en utilisant l’option d’exécution au redémarrage.

(ne pas oublier PSKILL.EXE et sleep.exe dans le répertoire ou ce trouve le script)


SET LOGFILE=N:toolsLogFilesResultSave.log

ECHO Attente...fin de boot du serveur Citrix >> %LOGFILE%
sleep 180 >> %LOGFILE%

ECHO. >> %LOGFILE%
ECHO ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: >> %LOGFILE%
ECHO. >> %LOGFILE%
ECHO Script Executed at: %Date% %Time% >> %LOGFILE%
sleep 10 >> %LOGFILE%
ECHO arret du service impression citrix >> %LOGFILE%
net stop "cpsvc" >> %LOGFILE%
sleep 10 >> %LOGFILE%
ECHO arret du service SMA citrix >> %LOGFILE%
net stop "Citrix SMA Service" >> %LOGFILE%
sleep 10 >> %LOGFILE%
ECHO kill des process de ctx_smauser >> %LOGFILE%
for /f "skip=1 tokens=4" %%i in ('qprocess ctx_smauser') do pskill -t %%i >> %LOGFILE%
sleep 10 >> %LOGFILE%
ECHO suppression du profil de ctx_smauser dans M >> %LOGFILE%
for /f "tokens=1" %%i in ('dir /b m:docume~1ctx_smauser*') do rmdir /Q /s "m:docume~1%%i" >> %LOGFILE%
sleep 10 >> %LOGFILE%
ECHO suppression du profil de ctx_smauser dans N >> %LOGFILE%
for /f "tokens=1" %%i in ('dir /b n:docume~1ctx_smauser*') do rmdir /Q /s "n:docume~1%%i" >> %LOGFILE%
sleep 10 >> %LOGFILE%
ECHO relance du service impression citrix >> %LOGFILE%
net start "cpsvc" >> %LOGFILE%
sleep 10 >> %LOGFILE%
ECHO relance du service SMA citrix >> %LOGFILE%
net start "Citrix SMA Service" >> %LOGFILE%
ECHO. >> %LOGFILE%
ECHO Script Ended at: %Date% %Time% >> %LOGFILE%
ECHO ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: >> %LOGFILE%
ECHO. >> %LOGFILE%
EXIT