wuruoyu Posted May 28, 2016 Share Posted May 28, 2016 (edited) I want retrieve modified date of ntuser.dat on a remote computer's local profile. These computers are in different domains, and I have use different system administrator credential to access accordingly. I wonder if there is a way to RunAs FileGetTime with a different user. I am thinking out loud here that I might need to use DOS command set FileDate= Edited May 28, 2016 by wuruoyu Link to comment Share on other sites More sharing options...
EmilyLove Posted May 28, 2016 Share Posted May 28, 2016 I don't believe you need to RunAs to get the date from a file. If it is on your domain, then all you need to do is authenticate yourself so you can access the file and either get the file's date now, or copy it back to your computer, get the date, and then clean up. I'm not sure if AutoIt handles UNC paths well. Link to comment Share on other sites More sharing options...
wuruoyu Posted May 28, 2016 Author Share Posted May 28, 2016 Hi BetaLeaf, thanks for your reply. I managed to authenticate the remote administrative shared c$ with _WinNet_AddConnection2, and FileGetName work with UNC paths that have no spaces. But FileGetName can't return time for UNC path with spaces. e.g. \\computer\c$\Documents and Settings\user\ntuser.dat" Link to comment Share on other sites More sharing options...
EmilyLove Posted May 29, 2016 Share Posted May 29, 2016 Have you tried using quotes? Maybe try downloading the file first to your computer before performing the operation you needo. Something like filecopy or in inetget. Remember to clean up and unneeded files when you are done. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now