locked
Is there a cmdlet or property that will show when a file was last loaded by an application RRS feed

  • Question

  • Hi

    I'm trying to learn more about the software that my company has written - like knowing which dlls are called when the user goes into various menu. I could speak to a Developer to ask everytime but they would get annoyed after a while.

    I've written this kind of script but the property does not show when the file was last accessed by the PC.

    Get-ChildItem -path 'C:\Program Files (x86)\My Company\modules\*' | Select FullName,LastAccessTime | Sort-Object LastAccessTime

    I need to know so I can double check the the relevent dll files are intact/up to date.

    Can anyone help :-

    Thanks

    Matt

    Monday, May 12, 2014 4:03 PM

Answers

All replies

  • What do you mean when it was last accessed by the PC?  Your code seems to work fine for me.

    You can use procexp to find out what specific files are used by an application:

    http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx


    I hope this post has helped!

    Monday, May 12, 2014 4:26 PM
  • There are developer tools that track loading.

    Opening a menu does not load DLLs.  They are loaded as the code block that calls them is loaded.

    Ask your developers for a copy of the tools that they have to monitor API calls.You can also use the Software Verification kit.


    ¯\_(ツ)_/¯

    Monday, May 12, 2014 4:31 PM
  • This kind of problem (which DLLs are up-to-date, etc.) is normally handled by the installer. A correctly designed MSI database knows how to upgrade an application by correctly removing out-of-date files and installing the new versions. I would say this is not a scripting problem/question.


    -- Bill Stewart [Bill_Stewart]

    Monday, May 12, 2014 5:53 PM
  • Hi Rhys

    The reason I need to know which dlls are being utilised it this - if I start a new job working for a new company where information isn't very forth-coming about which dlls are required then it would make my job harder. In my actual situation, I support many different software modules for the company I work for and it would be nice to find these kinds of answers without asking for help every time.

    Checking out http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx is my next point of call, thank you.

    To Bill, I agree that it sounds this kind qf query cannot be done using PowerShell, bu I do think that the question belongs in this group because, as a beginner, I needed to be sure what the limits of PowerShell are. So please do not move this discussion to another group - I'm quite happy to leave it in here but please recommend a discussion group if know of one.

    If I can help it, I don't want to ask my Developers - you could call this politics and I prefer to find my answers independently (with you're help) please.

    Kind Regards

    Matt

    Tuesday, May 13, 2014 8:04 AM
  • Hi jrv

    What is the Software Verification kit? I googled and found this - is this the right download please?

    http://www.microsoft.com/en-us/download/details.aspx?id=1610

    Kind  Regards

    Matt

    p.s I tried Rhys's suggestion - to try using Process Explorer but this only appears to show processes currently loaded from what I can tell - not which dlls are currently being utilised which is what I need.

    Tuesday, May 13, 2014 8:20 AM
  • Hi jrv

    What is the Software Verification kit? I googled and found this - is this the right download please?

    http://www.microsoft.com/en-us/download/details.aspx?id=1610

    Kind  Regards

    Matt

    p.s I tried Rhys's suggestion - to try using Process Explorer but this only appears to show processes currently loaded from what I can tell - not which dlls are currently being utilised which is what I need.

    Unfortunately your knowledge of Windows t4echnology is too limited for you to understand why scripting cannot solve your problem.  Any application in Windows will likely reference hundreds of DLLs.  As to which ones are compiled directly you have to ask the developers.  You can alos use a tool that can read the PE file structure.

    To use and understand these tools requires training.  That is why the developers have been the traditional source of this information. Issues with the DLL usage can only be addressed by developers as Helpdesk techs are not trained in this and do not have access to the programs build resources.

    Start by leaning development and programming.  Once you have mastered this you will understand why your request is getting so much back flow.

    Depending on the need for you request the Software Verification and compatibility tools may be a solution.  They can show what APIs are not supported.  They can also produce fixups that allow older programs to run on newer platforms.

    Other tools are PEDump which allows us to inspect an EXE or DLL file: http://msdn.microsoft.com/en-us/library/ms809762.aspx and ProcessExplorer from Sysinternals.com.  ProcessExplorer can show all DLLs, drivers and other resources used by a program.  You have to learn how to use it and learn what the output is showing you.  If you are not systems trained this may be very hard for you to learn.


    ¯\_(ツ)_/¯

    Tuesday, May 13, 2014 2:16 PM
  • We've drifted outside the scope of a  scripting question. A better answer is to simply ask the developers of the application which versions of which DLLs are needed for a particular version of the application.


    -- Bill Stewart [Bill_Stewart]

    Tuesday, May 13, 2014 2:16 PM
  • The answer to the original question is simply "NO!".

    http://technet.microsoft.com/en-us/windows/application-compatibility.aspx


    ¯\_(ツ)_/¯

    • Marked as answer by jmatty2000 Tuesday, May 13, 2014 2:21 PM
    Tuesday, May 13, 2014 2:20 PM
  • Shame!!! Thanks everyone

    cheers

    Matt

    Tuesday, May 13, 2014 2:22 PM