Jump to content
wuruoyu

RunAs different user with FileGetTime and UNC path with spaces

Recommended Posts

wuruoyu

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 by wuruoyu

Share this post


Link to post
Share on other sites
BetaLeaf

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.


False Positive Reporter - Mass email all anti virus vendors with an attachment of your program for fast and easy whitelisting.

PortableApps.com App Creation Wizard  - A simple GUI-based Wizard for creating PortableApps.

SoundBoard - Play any song or sound you want at the press of a hotkey.

My GitHub Page: https://github.com/BetaLeaf

Share this post


Link to post
Share on other sites
wuruoyu

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"

Share this post


Link to post
Share on other sites
BetaLeaf

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.


False Positive Reporter - Mass email all anti virus vendors with an attachment of your program for fast and easy whitelisting.

PortableApps.com App Creation Wizard  - A simple GUI-based Wizard for creating PortableApps.

SoundBoard - Play any song or sound you want at the press of a hotkey.

My GitHub Page: https://github.com/BetaLeaf

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.