Setting the property SOFIE CLIENT HOME :Change the file *.muf and the other one, in %USERPROFILE%\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\muffin
Setting the javaws.exe :
Change the file deployment.properties like that :
#deployment.properties
#Thu Jun 19 14:45:04 CEST 2014
deployment.user.cachedir=C\:\\Users\\%USERNAME%\\AppData\\LocalLow\\Sun\\Java\\Deployment\\cache
deployment.javaws.autodownload=NEVER
deployment.expiration.decision.suppression.10.51.2=true
deployment.javaws.splash.index=C\:\\Users\\%USERNAME%\\AppData\\LocalLow\\Sun\\Java\\Deployment\\cache\\6.0\\splash\\splash.xml
deployment.version=7.21
deployment.javaws.appicon.index=C\:\\Users\\%USERNAME%\\AppData\\LocalLow\\Sun\\Java\\Deployment\\cache\\6.0\\appIcon\\appIcon.xml
deployment.browser.path=C\:\\Program Files (x86)\\Internet Explorer\\iexplore.exe
deployment.security.mixcode=HIDE_RUN
deployment.expiration.decision.10.51.2=later
deployment.modified.timestamp=1403181904754
deployment.expiration.decision.timestamp.10.51.2=1403181873
#Java Deployment jre's
#Thu Jun 19 14:45:04 CEST 2014
deployment.javaws.jre.0.registered=false
deployment.javaws.jre.0.platform=1.7
deployment.javaws.jre.0.osname=Windows
deployment.javaws.jre.0.path=C\:\\Program Files\\Cetrel\\jre\\bin\\javaw.exe
deployment.javaws.jre.0.product=1.7.0_51
deployment.javaws.jre.0.osarch=amd64
deployment.javaws.jre.0.location=http\://java.sun.com/products/autodl/j2se
deployment.javaws.jre.0.enabled=true
deployment.javaws.jre.0.args=
You need a custom action to check the %USERNAME% variable . Get this value in the hive :
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Volatile Environment]
"HOMEDRIVE"=""
"LOGONSERVER"=""
"USERDNSDOMAIN"=""
"USERDOMAIN"=""
"USERNAME"="current_username"
"USERPROFILE"=""
"HOMEPATH"=""
"HOMESHARE"=""
"APPDATA"=""
"LOCALAPPDATA"=""