CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2016
    Posts
    2

    Question Needing some help!

    Hi,

    I was wondering if anybody here, would be able to provide me with some advise on resolving a rather frustrating problem in which I have. I work at a college, where we have a small application written in C#, which we call "Launchpad". This application is purely a form, which reads from an XML file which consists of various paths to installed software, e.g. Microsoft Office. The C# application paints buttons on the form, for the paths which actually exist on that physical machine. For example, if MS Word is installed, a button will be created which points to the executable for MS Word. If MS Word is not installed, no button will be painted for that application.

    Now, this application works as designed and does exactly as described above, but here is the problem. We use application visualization (App-V), which allows us to virtually assign software to our end users. This removes the need to physically install software on end user devices, and also aids our Thin Client configuration. When a user logs on, applications which are virtually assigned to them are cached locally to their session. The problem with this, is that the current C# application doesn't paint buttons for these virtual applications, unless the program is restarted.

    I'm currently looking to find a solution on how to dynamically update Launchpad, so that a restart of the application is no longer required. Now, I'm relatively new to C#, so my description here may be slightly vague. Our C# Lunchpad application consists of a FlowLayoutPanel, which has a TabControl. There are various tab's which are painted, these are painted from the entries entered into the XML file. These tab's separate the different types of software we have. From there, buttons are added to the FlowLayoutPanel for each tab, for example, a tab called "Microsoft Office" would show buttons for "Word", "Excel", etc.

    Would anybody be able to advise me on how I would make this application re-check the file system, to see if the file paths stored in the XML file are yet valid? I tried to implement this on the Tab Change event, but this ended up painting duplicate tabs!

    Apologies for my very vague explanation, I'd appreciate any help you can give!

    Kind regards,
    Richard Hughes

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Needing some help!

    Out of curiosity, how many applications does the launcher app track? Also, does the launcher app run on the the client machine?

  3. #3
    Join Date
    Sep 2016
    Posts
    2

    Re: Needing some help!

    Quote Originally Posted by Arjay View Post
    Out of curiosity, how many applications does the launcher app track? Also, does the launcher app run on the the client machine?
    Hi Arjay,

    Thanks for your response. I currently have 70 applications being tracked, and yes, the Launchpad application runs locally on the client machine and simply checks the file system at launch to see what files from the XML file are valid. Unfortunately though, the files don't download quick enough so they aren't tracked by the Launchpad app, unless you close and re-open Launchpad.

    Kind regards,
    Richard

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Needing some help!

    You can create one or more FileSystemWatcher objects to monitor the specific install folders you are trying to track.

    At startup, do what you normally do (i.e. enable the buttons for the apps that are installed). For the apps that aren't installed, create a the FileSystemWatcher instance on the expected install folder to notify you when the folder (and files) change.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured