locked
App-V client installation + SWIUSERDATA value not working RRS feed

  • Question

  •  

    We deploy the App-V client using SCCM during OSD.

    So far so good, but in a lab environment I want to redirect the App-V user data to the homeshare.

    (We want the user profile to be as light and small as possible)

    We deploy on Windows 7 X86, App-V client 4.6 Sp1.

     

    So the install.cmd in SCCM looks like this:

    "%~dp0setup.exe" /s /v"/norestart /qn SWICACHESIZE=\"12288\" SWIUSERDATA=\"^%HomeDrive^%\App-V User Settings"" (I know the /norestart is not necessary)

    According to

    http://technet.microsoft.com/en-us/library/ee956911.aspx

     

    This will result in a wrong path in sftcmc.msc (\App-V User Settings).

    So the folder is created in the root of the C:\.

    I can't get this to work.

     

    I've tested with a hardcoded path:

    "%~dp0setup.exe" /s /v"/norestart /qn SWICACHESIZE=\"12288\" SWIUSERDATA=\"H:\App-V User Settings""

    And this will result in a non working App-V client because (I think) this H drive is not available during the setup.

    In this last scenario the sftcmc.msc starts up under the user who has a H drive. But when using sftcmc.msc run as administrator the sftcmc.msc crashes.

    I don't have the excact error right now.

     

    What am I doing wrong?

     

     





    • Edited by Alpejan Monday, November 14, 2011 8:59 PM
    Tuesday, November 1, 2011 1:43 PM

Answers

  • Hello,

    Just some side-notes here;

    1. I would use the property CONF_SWIUSERDATA (as its visible in the property table of the MSI, and the docs on those properties are quite often off)
    2. I would never ever redirect any app-v settings onto the network as a failure of the network would cause all virtual applications to fail
    3. Which is probably what you are experiencing when opening the MMC as an admin; the admin does probably not have a correct path, env variable or simply no location setup as a user does.
    4. If using a mapped drive, the MMC will mimic the behavior your are experiencing as an admin - if it goes offline, disconnected, unavailable or something similiar. Also take in consideration that UAC will create a new session which does not necessarily have your previously mapped drive.
    5. I would probably set the value via a GPP / GPO. Easier to change afterwards.

    Its quite easy actually to get this working;
    1. Verify a suitable path - defined in a env variable or simply using a hardcoded path (such as a drive letter unique for the user). It has to exist beforehand.
    2. Test it by setting the registry key and rebooting the computer
    3. If it does work, set it via Group Policy

    If it fails at any given point - its quite easy;
    You don't not have unrestricted,  unique access and to a path that is reachable for the current user (mapped drives are therefore such a horrible idea - since UAC creates a new session as an example).

    Ergo;
    If it crashes - the path isn't accessible or isn't unique

    Usually the storage systems realibility is the least of any organizations problem. I have seen DFS roots go out the window, network outages, name resolution failure, ip-conflict, loopbacks, unmounted drives, misconfiguration on the client - you name it.

    So; Keep it local, keep it working.


    /Znack
    • Edited by znack Monday, November 14, 2011 9:21 PM
    • Proposed as answer by Aaron.ParkerModerator Monday, November 21, 2011 8:45 AM
    • Marked as answer by Alpejan Monday, November 21, 2011 5:32 PM
    • Unmarked as answer by Alpejan Monday, November 21, 2011 5:32 PM
    • Marked as answer by Alpejan Monday, November 21, 2011 5:42 PM
    Monday, November 14, 2011 9:20 PM

All replies

  • Using the ^%HomeDrive^% approach, what is the resultant data in this Registry value: 

    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SoftGrid\4.5\Client\Configuration - UserDataDirectory

    Does the same issue occur if you run the command while logged on as an administrator? Perhaps there's a different when run as the SYSTEM account.

    Alternatively, just run a REG command after SETUP to change the data of the Registry value above.

     



    This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.
    Tuesday, November 1, 2011 1:58 PM
    Moderator
  • When using 

    "%~dp0setup.exe" /s /v"/norestart /qn SWICACHESIZE=\"12288\" SWIUSERDATA=\"^%HomeDrive^%\App-V User Settings\""

    I will get the value \App-V User Settings in the registry

    The result is the same when I use ^%HomeShare^%

    C:\>set ho

     

    HOMEDRIVE=H:

    HOMEPATH=\

    HOMESHARE=\\xxxx.xxx.xx\DFSData\Home\JohnDoe

    A reg key after the installation is an option but not the one I want ;-) And If I use a reg key, what would the value be?

     


    • Edited by Alpejan Tuesday, November 1, 2011 2:55 PM
    Tuesday, November 1, 2011 2:28 PM
  • There's something going on then when running that command under the SYSTEM account - perhaps try wrapping the command in a batch file instead, or use the REG command after. A REG command would look like this:

    REG ADD HKLM\SOFTWARE\Microsoft\SoftGrid\4.5\Client\Configuration /v UserDataDirectory /d "%%HOMEDRIVE%%" /t REG_SZ /f

    Use this method to run a Command Prompt as SYSTEM for testing: http://blogs.technet.com/b/askds/archive/2008/10/22/getting-a-cmd-prompt-as-system-in-windows-vista-and-windows-server-2008.aspx


    There's another similar topic here: http://social.technet.microsoft.com/Forums/en-US/appvclients/thread/99f84adc-7161-40f5-8bc4-60dc3f1aaa16



    This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.
    Tuesday, November 1, 2011 3:07 PM
    Moderator
  • Well, REG ADD HKLM\SOFTWARE\Microsoft\SoftGrid\4.5\Client\Configuration /v UserDataDirectory /d "%%HOMEDRIVE%%" /t REG_SZ /f

    doesn't work. The "%%HOMEDRIVE%% is directly being resolved to "H:" in the registry.

    But I found something else, the %HOMEDRIVE% and %HOMESHARE% has not been set for the Domain Admin, the Local Admin (And I think) the system account. First I have to figure out why.

    Thursday, November 3, 2011 9:25 AM
  • It's normal for those accounts not to have those environment variables set. If you place the above REG command in a batch file, what is the result?

    This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.
    Thursday, November 3, 2011 9:30 AM
    Moderator
  • I did test the command in a batch file, I believe the result was H: in the registry. I will check that as soon as I am at work again.

    But I've put the value "%HOMEDRIVE%\App-V User Settings" directly into the registry, after a reboot or restarting the services the App-V client crahes. I seems to work under the user credentials but when using  "Run As Administrator" --> sftcmc.msc crashes. I will upload the error code tomorrow when I am at work. The App-V client is not working in this scenario. Same thing is happening when I put "H:\App-V User Settings" directly into the registry.

    This H-drive is a DFS location, with (on this folder) offline use enabled in GPO. (Offline Available).

    Thursday, November 3, 2011 3:56 PM
  • It is probably not a good idea to use a user variable for the client deployed under the credentilas of the System Account.

    Is this an MSI or EXE deployment?

    I am curious why %APPDATA% is not being leveraged since it can easily be redirected.

     

     


    Steve Thomas, SSEE, Microsoft
    App-V/MED-V/SCVMM/SCCM/AppCompat
    http://madvirtualizer.wordpress.com/
    The App-V Team blog: http://blogs.technet.com/appv/
    The MED-V Team Blog: http://blogs.technet.com/medv
    The SCVMM Team blog: http://blogs.technet.com/scvmm/

    “This posting is provided "AS IS" with no warranties, and confers no rights. User assumes all risks.”
    Thursday, November 3, 2011 11:52 PM
  • I am curious why %APPDATA% is not being leveraged since it can easily be redirected.


    Noooooo, don't recommend redirecting AppData, that's asking for trouble. http://www.sepago.de/helge/2010/05/31/should-appdata-be-redirected-or-left-in-the-user-profile

    This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.
    Friday, November 4, 2011 12:00 AM
    Moderator
  • That's a very opinionated statement and we have several customer success stories that would be to the contrary. I would also mention that the design of App-V PKG files allows for optimal use of redirected AppData with the TMP PKG files going into %LOCALAPPDATA% during the tenure of the application launch culminating in the transfer of the PKG data to %APPDATA% upon application shutdown.

    Regardless - thats another argument and a potential rabbit hole of a discussion ;)

    The actual subject of this thread has my attention. Do you yield the same results when you simply use SWIUSERDATA=\"^%HomeDrive^%\

    (This should put userdata in a subdirectory called "Softgrid Client.")


    Steve Thomas, SSEE, Microsoft
    App-V/MED-V/SCVMM/SCCM/AppCompat
    http://madvirtualizer.wordpress.com/
    The App-V Team blog: http://blogs.technet.com/appv/
    The MED-V Team Blog: http://blogs.technet.com/medv
    The SCVMM Team blog: http://blogs.technet.com/scvmm/

    “This posting is provided "AS IS" with no warranties, and confers no rights. User assumes all risks.”
    Friday, November 4, 2011 1:48 AM
  • That's a very opinionated statement and we have several customer success stories that would be to the contrary. I would also mention that the design of App-V PKG files allows for optimal use of redirected AppData with the TMP PKG files going into %LOCALAPPDATA% during the tenure of the application launch culminating in the transfer of the PKG data to %APPDATA% upon application shutdown.

    Ping me an email for an offline discussion if you'd like.

    This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.
    Friday, November 4, 2011 9:14 AM
    Moderator
  • Logged on as user

    Open CMD.EXE as Administrator

    launched install.cmd

    Contents install.cmd "%~dp0setup.exe" /s /v"/norestart /qn SWICACHESIZE=\"12288\" SWIUSERDATA=\"H:\App-V User Settings\""

    sftcmc.msc launches as user

    sftcmc.msc crashes as admin with error code 4615186-0FD00D14-00000003

    getting error in the sftlog.txt

    [11/04/2011 13:00:30:856 INTF WRN] {tid=1954:usr=bvo}

    The data directory for this user is already in use by another user with SID

    S-1-5-21-484763869-682003330-725345543-1114. All users must have unique data directories. The UserDataDirectory

    setting in the registry may be configured incorrectly.

     

    The same thing happens when I put the values directly into the registry (%HOMEDRIVE% or H:\)

     

    Uninstalled de App-V Client

    Rebooted

     

    Logged on as user

    Open CMD.EXE as Admnistrator

    launched install.cmd

    Contents install.cmd "%~dp0setup.exe" /s /v"/norestart /qn SWICACHESIZE=\"12288\" SWIUSERDATA=\"^%HomeDrive^%\App-V User Settings\""

    The path is resolved to the (\App-V User Settings\) root C-drive

    (C:\Windows\system32>"D:\x86\setup.exe" /s /v"/norestart /qn SWICACHESIZE=\"12288\" SWIUSERDATA=\"\App-V User Settings\"")

    No Errors

    • Edited by Alpejan Friday, November 4, 2011 12:31 PM
    Friday, November 4, 2011 12:28 PM
  • We decided not to redirect.

    We have been working on it for several hours/days, together with some App-V and SCCM specialists. We can't get a stable situation.

    We lost our trust in this solution.

    Yes we can get the values into the registry. (Reg file, REG ADD or GPP)

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SoftGrid\4.5\Client\Configuration\UserDataDirectory

    %HOMEDRIVE%\App-V User Settings or H:\App-V User Settings

    But the client keeps on crashing when we try to redirect to the %HOMEDRIVE%.


    • Edited by Alpejan Monday, November 7, 2011 3:03 PM
    • Proposed as answer by Aaron.ParkerModerator Monday, November 7, 2011 3:27 PM
    • Marked as answer by Aaron.ParkerModerator Monday, November 14, 2011 6:03 PM
    • Unmarked as answer by Alpejan Monday, November 14, 2011 6:35 PM
    • Unproposed as answer by Alpejan Monday, November 14, 2011 6:35 PM
    Monday, November 7, 2011 3:03 PM
  • I have a problem after successfully setting the App-V SWIUSERDATA Property to %HOMEDRIVE%\Microsoft.  It works as intended - the User's UserDataDirectory registry key is a UNC path to their %HOMEDRIVE%.  I install by running the MSI.

    However after a year of increasing use I've got the following problem with Mobile Users.  Mobile User recieved App-V applications (download and execute via SCCM).  They load fine and work fine.  Sometimes the User disconnects their computer from the network without logging off and then tries to run an App-V application offline - error message "Your Application Virtualization data cannot be accessed" Error code 0000000E.  The reason being that App-V can't find %HOMESHARE% as it's still set to the network sahre.  A workaround of logging off and back on again resolves the issue (though %HOMESHARE% then resolves to C:\ and the User cache is then written into C:\Microsoft).

    I was thinking to change this to %APPDATA% but saw the post above.  Has anyone else come across this problem?  What would be the best solution that keep User settings on the network rather than making everything local.  We don't currently use Roaming profiles.  Thanks.


    Shaun PDX
    Monday, November 14, 2011 5:56 PM
  • Use a third party profile management tool such as Immidio Flex Profiles. Se a comparison of those tools here: http://bit.ly/rUpEy9

    Redirection of user profile components isn't a great solution for mobile users.



    This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.
    Monday, November 14, 2011 6:04 PM
    Moderator
  • Why is redirection of user profile components not a great solution for mobile users? We've looked in Immidio Flexprofiles but decided not to implement it. With smart folder redirection and offline files there's no need to. 90% of our applications will be App-V's. So if there's a problem with an App-V because of the user settings just delete/rename the according App-V folder from the %APPDATA% or wherever the folder resides.

    When you choose Flexprofiles to manager App-V user profile settings you have to determine what the user settings are per application. Depending on the number of applications this can be a time consuming job.

    Why not make this %HOMEDRIVE%\Microsoft location offline available? So this location is always available for the (mobile) users.

    (Nothing bad about Immidio Flexprofiles, great software, but in our situation it doesn't offer that much extra).

    Monday, November 14, 2011 6:56 PM
  • One of the issue ShaunPDX has pointed out and I've seen that issue as well. 

    Additionally once you enable Offline Files for a share, do you want users to have to decide which version of UsrVol_sftfs_v1.pkg they want to keep? How is a user to know what that file does and which version they should keep?

    You can fix this issue with this approach: Configuring an Automatic Resolution Policy for Offline Files in Windows 7

    Placing the App-V User Data Directory on the network isn't as bad as redirecting AppData, but I believe it's a work around not a true solution. You're just moving a problem from one place to another. I see 3rd party profile management products as true solutions to these issues.

    Folder Redirection and Offline Files is a denial of service waiting to happen. See this video for an excellent discussion on the issue: http://www.youtube.com/watch?v=lhixJBCOn7o (most importantly the quote from Shawn Bass).



    This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.
    Monday, November 14, 2011 7:08 PM
    Moderator
  • Thanks for your replies.

    It would be good to have  %HOMEDRIVE%\Microsoft permanently cached somehow, so it's available whether a computer is off or online but we don't have that available now.  We don't use Roaming and offline folders sync only when a User logs on/off (the problem I've had reported is Users just disconnecting without logging off and then trying to continue working later offline).

    I've decided the following probably meets our needs.  Don't enable network App-V User settings caching for Mobile computers - instead use the Default value %APPDATA%.

    So I'm going to change SWIUSERDATA with a Group Policy on Mobile computers and delete the following  key so that it applies to existing Users as well as new ones.  [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SoftGrid\4.5\Client\Configuration] value "UserDataDirectory".  Just testing this further but it seems to work ok.


    Shaun PDX
    Monday, November 14, 2011 7:10 PM
  • Thanks for those links Aaron. But as far as I can understand it (bad audio quality) it depends on your storage environment. If that's solid and robust there won't be any problems. Our most important company applications resides on DFS. And we never had any performance issues. We redirect parts of the user profile (Desktop, Documents, etc) but we don't redirect %APPDATA%. This is according to the Best-Practice of our partner who's done a lot of Win7 Migrations.

    But I'm going a bit off-topic so send me a PM to continue by email.


    • Edited by Alpejan Monday, November 14, 2011 8:31 PM
    Monday, November 14, 2011 8:02 PM
  • Hello,

    Just some side-notes here;

    1. I would use the property CONF_SWIUSERDATA (as its visible in the property table of the MSI, and the docs on those properties are quite often off)
    2. I would never ever redirect any app-v settings onto the network as a failure of the network would cause all virtual applications to fail
    3. Which is probably what you are experiencing when opening the MMC as an admin; the admin does probably not have a correct path, env variable or simply no location setup as a user does.
    4. If using a mapped drive, the MMC will mimic the behavior your are experiencing as an admin - if it goes offline, disconnected, unavailable or something similiar. Also take in consideration that UAC will create a new session which does not necessarily have your previously mapped drive.
    5. I would probably set the value via a GPP / GPO. Easier to change afterwards.

    Its quite easy actually to get this working;
    1. Verify a suitable path - defined in a env variable or simply using a hardcoded path (such as a drive letter unique for the user). It has to exist beforehand.
    2. Test it by setting the registry key and rebooting the computer
    3. If it does work, set it via Group Policy

    If it fails at any given point - its quite easy;
    You don't not have unrestricted,  unique access and to a path that is reachable for the current user (mapped drives are therefore such a horrible idea - since UAC creates a new session as an example).

    Ergo;
    If it crashes - the path isn't accessible or isn't unique

    Usually the storage systems realibility is the least of any organizations problem. I have seen DFS roots go out the window, network outages, name resolution failure, ip-conflict, loopbacks, unmounted drives, misconfiguration on the client - you name it.

    So; Keep it local, keep it working.


    /Znack
    • Edited by znack Monday, November 14, 2011 9:21 PM
    • Proposed as answer by Aaron.ParkerModerator Monday, November 21, 2011 8:45 AM
    • Marked as answer by Alpejan Monday, November 21, 2011 5:32 PM
    • Unmarked as answer by Alpejan Monday, November 21, 2011 5:32 PM
    • Marked as answer by Alpejan Monday, November 21, 2011 5:42 PM
    Monday, November 14, 2011 9:20 PM
  • Znack,

    Great answer, but no real surprises in your post. The problem is indeed that the Admin has no H drive or HOMEDRIVE variable set. I was assuming that the installation will use %APPDATA% if the pad could not be resolved for admin/system. But it doesn't. The information in the according Technet article is not wrong, but it isn't mentioned that there are some "prerequisites". Such as a resolvable variable also for the admin/system user.

    http://technet.microsoft.com/en-us/library/ee956911.aspx

     

    We keep is local, we keep it working ;-) 

    Monday, November 21, 2011 5:41 PM