locked
Possible to force installation in "per-user" mode? RRS feed

  • Question

  • We have an old application which does not work well in Terminal Services (RDP) environment -- only one instance of the program can be run inside one computer.

    But we would like to consolidate computers and we're looking for a way to install the application in "by user" context inside Windows Server 2008 R2 so that it appears to be running one time.  Is this possible?

    For information: the installer is .exe but I found that it actually creates two .msi files and three .ini files.

    We are looking to remove some old hardwares so I'd appreciate a lot if someone could tell me if that's feasible.

    • Moved by Yagmoth555MVP Monday, April 28, 2014 6:20 PM Moving from WinServGeneral. More appropriate in the App-V's forum
    Monday, April 7, 2014 8:24 PM

Answers

  • You mean App-V is NOT the answer to my question either?  I knew it! LOL

    About changing the software, well.... yes, in a year or two.  It's a mission-critical application and it's hard to migrate data.

    About having one VM per user, well... that means we have to have one more O/S license and one more Office license for everyone instead of one single O/S and Office license (more expensive when compared in 1 to 1, but not the case for more users -- which is why we want to deploy it in server!)

    Anyway, I have no time to do research to see if there's any hack to "redirect" files and registry access to elsewhere, because that's the way to achieve "software isolation".

    Too bad, my idea is too avant-garde :D  It might be possible in 10 years or more LOL

    • Marked as answer by Horinius Monday, April 28, 2014 10:55 AM
    Tuesday, April 15, 2014 8:28 PM

All replies

  • Hi,

    It actually depends on the application but not the way you configured - if it does not support to work in more than 1 instance, you need to get a new version which supported. 


    If you have any feedback on our support, please send to tnfsl@microsoft.com.

    Wednesday, April 9, 2014 2:24 AM
  • The application is *old*, so we can skip the discussion about getting a new version.

    I remember that when a simple user tries to install an application without admin right, the application would be installed differently.  For example, the files are copies inside C:\users\username\..... instead of the usual C:\program files.  That's why I asked for a "per user" workaround for my problem.  And I remember that the big WinSXS folder in new versions of Windows was designed to provide some sort of isolation.  Doesn't some kind of "user context isolation" exist which would be able to create a special context for an application to run in a special context, something like WinXP compatibility mode?  Such isolation mode should also be able to provide a registry context to the application to make it think it's accessing HKLM\... part of the registry.

    Wednesday, April 9, 2014 9:44 AM
  • Hiya,

    What you describe is usually the problem. An application that is not suited for terminal services , usually installs in a user folder and uses the Current User registry hive. Usually the later is the one that really controls everything.

    Try and find the registry keys created by your application and see if there are any points your can change. Secondly you need to move this part to Local Machine hive and not a User hive.

    The above MUST be done in test/dev first, as you might break the application/server.

    Wednesday, April 9, 2014 12:18 PM
  • Hi

    It exist some path;

    1- I did that one for a small .exe; Make the user launch with a .bat the application, but inside the .bat you copy the .exe to a subfolder for the user with the variable %username% and launch the application from there. Myself it was a exe that connected to a DB, so the location of the .exe was not important. For sure if it need to write in HKLM, isolate what key, and give your user the right to modify them. If it write in a .INI, with the latest Windows version you can redirect the file, thus if a file like that in exemple c:\windows\app.ini keep trace of the application choice for the user, then use mklink, and redirect it to the home folder of your user. mklink \\srv\homefolder\app.ini app.ini. So the .INI is different for each user.

    2- Check if you can give parameter in your installation to tell him where to install it.

    -- path that need other licence; --

    3- Publish it with App-V

    4- Publish it with XenApp, but in Offline/Streamed mode. That mode create a downloadable file from your file server, that run in the workstation. So, you control the application centrally, but the package got cached and run on the workstation.


    Regards, Philippe

    Don't forget to mark as answer or vote as helpful to help identify good information. ( linkedin endorsement never hurt too :o) )

    Answer an interesting question ? Create a wiki article about it!



    Thursday, April 10, 2014 4:21 PM
  • How are things going? Please let us know if there is any progress.

    If you have any feedback on our support, please send to tnfsl@microsoft.com.

    Monday, April 14, 2014 4:23 AM
  • Yes, I understand that it's controlled by the way how the application was designed, but this is in the OLD O/S architecture, more than 10 to 15 years ago.  In the new O/S, isn't there a way to workaround this?

    Workaround, that's exactly what I was asking for.

    Suppose a program tries to access a file in

    C:\Program Files\ABC\efg

    Is there a way to redirect this to another file such that

    * when executed by user1, it's redirected to c:\users\user1\myfile\efg but the program still thinks it's accessing C:\Program Files\ABC\efg

    * when executed by user2, it's redirected to c:\users\user2\myfile\efg but the program still thinks it's accessing C:\Program Files\ABC\efg

    The same question for access to HKLM registry hive.  Is there anyway to redirect certain access to current user registry hive?

    I have found at least one file the program is trying to access in order to determine if it's being run by another user so I'm trying to trick the program in thinking that it has exclusive access.

    I also found quite a lot of registry keys created by the program.  But they are "scattered" here and there, and it would take me ages to replicates them inside user hive.  That's why I would like to have some program which would do this "dirty" job for me.  Well, afterall, computer programs are made to do repeating jobs for human, no?

    Monday, April 14, 2014 11:19 AM
  • Hiya,

    yeah - and computer programs are only as good as their makers :) - the later being your challenge. I have not heard of any programs that could correct other programs misconfiguration. It would always be a per application case, meaning that it would not make sense to develop such a program, unless you had a lot of clients using this program.The problem is the program will do exactly what you tell it to do, and trying to find out what the developers of another application was thinking while they made it, is not a trivial task.

    The registry architecture has not changed for a long time. It's still the same. It is simply a poorly created application that your trying to patch together to get it to work.

    To answer your question: If there is a registry path that points to "C:\Program Files\ABC\efg" you might be able to change that to c:\users\%USERNAME%\myfile\efg - However the application might not even be able to handle that it is run with multiple users at the same time.

    To my best professional opinion there are two options:

    1: Don't waste more time on this. It's a dead end. Find another application to replace it.

    2: Create a virtual desktop infrastructure to support your non TS applications.

    Monday, April 14, 2014 1:55 PM
  • Hi,

    For the point 1; use mklink /d

    Like, mklink /d C:\Program Files\ABC\efg U:\

    Where U:\ is mapped differently for each user. Under c:\users\user1\myfile\efg for user1 and so on.

     

    For point 2; If you can I would look into App-V (newer RDS CAL include it), as it remove limitation like that. (The server stream the application to the workstation, wich in turn run it) Usually in such product it isolate the HKLM, the application write to it and it's saved in the user cache.


    Regards, Philippe

    Don't forget to mark as answer or vote as helpful to help identify good information. ( linkedin endorsement never hurt too :o) )

    Answer an interesting question ? Create a wiki article about it!

    Monday, April 14, 2014 6:31 PM
  • Hi,

    For the point 1; use mklink /d

    Like, mklink /d C:\Program Files\ABC\efg U:\

    Where U:\ is mapped differently for each user. Under c:\users\user1\myfile\efg for user1 and so on.

    Quick reply: this does not work because mklink is system-wide!

    For App-V, it won't work for our software all the time either because the software needs a server in the same network address to work (which is not always the case).  Furthermore, moving the software to a server was also because we wanted to have a better response.  But I may have a look nevertheless.

    Monday, April 14, 2014 7:53 PM
  • For App-V, it won't work for our software all the time either because the software needs a server in the same network address to work (which is not always the case). 

    What about App-V for RDS? That way, it still executes upon your RDSH, but can leverage the filesystem and registry virtualisation features of App-V ?

    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

    Monday, April 14, 2014 9:27 PM
  • You mean App-V is NOT the answer to my question either?  I knew it! LOL

    About changing the software, well.... yes, in a year or two.  It's a mission-critical application and it's hard to migrate data.

    About having one VM per user, well... that means we have to have one more O/S license and one more Office license for everyone instead of one single O/S and Office license (more expensive when compared in 1 to 1, but not the case for more users -- which is why we want to deploy it in server!)

    Anyway, I have no time to do research to see if there's any hack to "redirect" files and registry access to elsewhere, because that's the way to achieve "software isolation".

    Too bad, my idea is too avant-garde :D  It might be possible in 10 years or more LOL

    • Marked as answer by Horinius Monday, April 28, 2014 10:55 AM
    Tuesday, April 15, 2014 8:28 PM
  • Hi,

    Sorry for the long time reply.

    However as we discussed above, it is the app causes this issue. Could you simply install the app onto all your client computers instead of on server system? That will make it working on each client system...


    If you have any feedback on our support, please send to tnfsl@microsoft.com.

    Monday, April 28, 2014 5:44 AM
  • Sorry, I cannot accept the reply of Jesper Arnecke as answer.  He just told me to "try" some hypothetical procedure without the certainty that it's going to work.

    It's like in the following situation:

    In an exam paper, a teacher asks his students to find the length of a side on a triangle with two known sides.

    A student replies: try to go to Internet and find some theories linking the three sides of a triangle and try to apply such theory.

    Do you accept such reply as answer?  NO, I don't.  I would give such student a ZERO if I'm the teacher :D

    Monday, April 28, 2014 10:55 AM
  • The root problem here is that your application was created limiting is usage. It was not created using common understand nor frameworks that would make it possible.Now your trying to force this application into other applications, which has been developed using common frameworks. And yet you decide that it's an limitation in the standard applications, rather than your stand-alone application.

    Secondly you dismiss the workaround available due to cost(licensing). In other words, a technical solution is offered however you decide that it is not economically viable. - Again based on the nature of your stand alone application.

    Third licensing could happen like this: VM's are covered by host O/S license(if using HyperV with enterprise or Data center edition), Office licenses should be covered using per User CAL's and not per Device, meaning there are no additional cost based on licensing. Obviously there is a cost associated with the management of this type of solution.

    Monday, April 28, 2014 11:19 AM
  • Secondly you dismiss the workaround available due to cost(licensing). In other words, a technical solution is offered however you decide that it is not economically viable. - Again based on the nature of your stand alone application.

    Since there have been a lot of fuzzy and inaccurate answers to this discussion, I might have missed the "workaround" you're referring.  Tell me again what it was, please.

    But my point is: the answer to my question, unless otherwise proven, is "impossible".  That's it!

    Monday, April 28, 2014 2:27 PM
  • What about App-V for RDS? That way, it still executes upon your RDSH, but can leverage the filesystem and registry virtualisation features of App-V ?

    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

    Did you tested it ?

    In XenApp (the competitor of App-V), I easily done what you ask. Streaming to the server side. As Jesper mention, you need other license for this scenario. I know less App-V, but it's free license for you now I think, Microsoft changed the App-V licensing.

    edit: I will move that thread in the App-V's forum to have more users to help you there.


    Regards, Philippe

    Don't forget to mark as answer or vote as helpful to help identify good information. ( linkedin endorsement never hurt too :o) )

    Answer an interesting question ? Create a wiki article about it!


    Monday, April 28, 2014 3:47 PM
  • So, after that conversation went into the App-V forum

    - A SHIM could help do redirect that one file access to a user specific location

    - MKLINK _could_ help, if you can redirect to a user specific, but consitent location. If all your users have a (separate) drive U: (or whateever: HomeDrive), you could create an MKLINK to that.

    - App-V could help in both, the per-user and/or per-machine installation. Either way it would redirect requests (if required): When a user _changes_ a file in C:\Program Files\ABC\efg, App-V would take care about redirecting this to user-specific locations [This is a slightly simplified answer, as there is a 'permissions' discussion going on along App-V). That fact that your app requires a service is not per-se a limiting factor for App-V (this depends on the way the service behaves). You can use App-V on an RDSH/Terminal Server. In fact App-V is used for exactly this use-case in many organizations.

    - Citrix Streaming is... depricated by Citrix. They recommend using App-V.

    I'm not saying that App-V will solve all your problems (if you want that, get a Dr. Pepper ;-) ) but I'd consider it as a path worth exploring.


    Falko

    Twitter @kirk_tn   |   Blog kirxblog   |   Web kirx.org   |   Fireside appvbook.com

    Tuesday, April 29, 2014 1:22 PM
    Moderator
  • - MKLINK _could_ help, if you can redirect to a user specific, but consitent location. If all your users have a (separate) drive U: (or whateever: HomeDrive), you could create an MKLINK to that.

    Wow, to my greatest astonishment, mklink pointing (ie targeting) a network share DOES work!  And if the network share of each user is distinct/specific from others, mklink does not complain and thus achieving the "separation" I wanted.

    I can't find any documentation telling me that it's a supported feature, nor can I find any doc telling me it's a forbidden usage.  So, is this supposed to be a supported feature of mklink?  Or is it a pure fluke that I'm working on a bug which might be fixed in the future?

    Suppose it's a supported feature, my second step will be to try to install the app to this symbolic link to see if it's working as expected, before I have to go to "explore" App-V which I have absolutely no idea what it is.

    Thanks

    PS: Oh, just in case, where can I find SHIM?  Is it a package of several files that I need to install or what?  Google doesn't give much hint on this.
    • Edited by Horinius Sunday, May 11, 2014 9:23 PM
    Sunday, May 11, 2014 9:20 PM
  • looking for 'application compatibility shim' should return some good starting point.

    Basically, this is a technology by Microsoft that is part of every OS already. If you ever modfied an application's Compatibility Settings (tell the app that it is running on Win95 or so), you used a shim.

    http://technet.microsoft.com/en-us/library/dd837644(v=ws.10).aspx gives an overview, as well as 

    http://blogs.technet.com/b/askperf/archive/2011/06/17/demystifying-shims-or-using-the-app-compat-toolkit-to-make-your-old-stuff-work-with-your-new-stuff.aspx

    http://blogs.msdn.com/b/cjacks/ doesn't talk about anythin else at all (well.. in fact he does ;-) )

    http://en.wikipedia.org/wiki/Shim_(computing) has some nice articles in the References section, 

    http://blogs.msdn.com/b/7/archive/2010/01/22/creating-an-application-compatibility-shim.aspx may help. too. 

    I'm not exactly sure whether 'dynamic mklinking' is officilly supported, but sometimes MS guys use it in their own blogs. 

    Note that you may have to enable remote access to redirected locations on your client machines (depending on the way you configure the link/junction and depending on your current client OS configuration).

    The trick is to us FSUTIL

    fsutil behavior set SymLinkEvaluation R2R:1

    http://blogs.msdn.com/b/junfeng/archive/2012/05/07/the-symbolic-link-cannot-be-followed-because-its-type-is-disabled.aspx and 

    http://social.technet.microsoft.com/Forums/windows/en-US/de0d32b6-27f0-48fd-881b-433a17ae5d27/symbolic-links-in-shared-directories?forum=w7itprogeneral

    talk about that.


    Falko

    Twitter @kirk_tn   |   Blog kirxblog   |   Web kirx.org   |   Fireside appvbook.com

    Monday, May 12, 2014 6:40 AM
    Moderator