Discussion Locked

Copiing files to Winnt directory

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I need to copy files to Winnt directory with VB 6, but new package do not authorize that because of a security level. How to copy files with specific parameters to Winnt directory. I am doing now mannualy using Admin rights.

1 reply

by rrv

First the user of your program should have admin rights. In VB6 include microsoft Scripting Runtime. Create a file system object. using getwindowsdirectory API and left$() function get the WINNT folder. using filesystemobject check the authority in the source and destination folder. Otherwise display error. if you have rights use filecopy method and copy the files to the destination folder.

RV

This discussion is closed to new replies.