Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access is Denied Under VB

Status
Not open for further replies.

be35g

Programmer
Dec 5, 2000
17
0
0
US
I'm writing a script to do an automatic install of an application on user pcs. This requires copying a number of folders that hold around 750 files. Everything works fine except the copy of 13 .dat files in one subdirectory. These files do not copy with the CopyFolder command, so I created a batch file to shell out and do a copy in a DOS window. The batch file works fine when executed from Explorer, but gives "ACCESS IS DENIED" when run under VB.

The VB code that does not copies all but the 13 files is:

FSys.CopyFolder "D:\C5", "C:\C5", overwrite

The batch file that works standalone but not under VB is:

COPY D:\C5\X_WIN95\X_LANSA\*.* C:\C5\X_WIN95\X_LANSA\*.*

The permissions for these 13 files look exactly like those for the other 700+ files that copy properly. What is different under VB?

Thanks for any help



 
Compiling under VB 6.0

Installing to Win 2000 and Win NT. Neither works.
 
Problem solved: Files copied from CD have "read-only" attribute set. Setting attribute to 0 (normal) resolved problem.

Thanks to anyone who gave this some thought.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top