zambuka42
asked on
In VB 6.0, How to append text to file across network using seperate credentials
I have a large text file across a network that I need my program to append text to. However, I need it to use a specific set of credentials (user/pass) other than those of the user that has run the program.
ASKER
no, I'm afraid that will not work. It is still the user who ran the program's credentials being used.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
not sure what you mean by NTFS credentials. Did you mean NTLM credentials? Anyway, you need NTLM credentials to access a share.. however, my program needs to access the share then write to a file. If you simply make a connection to the share using alternate credentials, that is not enough, because the next step is writing to the file which would then occur using the current logged in user, not the alternate credentials. I need to write to the file using the alternate credentials.
Well, isn't it what impersonation is about ? Impersonate another user to use his credentials ?
Have you checked the link I posted ?
Have you checked the link I posted ?
ASKER
I do plan on trying it, i was just trying to clear up what I thought might be a misunderstanding. Anyway, I'm afraid I can't get remotely connected to the site I am using this on at the moment, so I won't be able to try it properly until then. I'll repost.. thanks alot for your help
ASKER
The code in the link provided worked very well. Thank you very much
The WScript.Network object will do the trick here.
Open in new window