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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Runtime error 70 Permission Denied - NT

Status
Not open for further replies.

ZOR

Technical User
Joined
Jan 30, 2002
Messages
2,963
Location
GB
I get the runtime error 70 when running an application which is an installer. I have logged into NT as an Administrator, however as I user I can do the job with NT Explorer?

I tried MKDIR, and now tried using FSO. Any ideas. The code below is rough, I have reference to Scripting Runtime etc.


' Arrives here if no previous installation present
If Form1.List1.ListCount = 0 Then
strDir = Form1.TxtPath
If Right$(strDir, 1) = "\" Then
Form1.TxtPath.Caption = Form1.TxtPath.Caption & "CManager"
strDir = Form1.TxtPath.Caption
Else
Form1.TxtPath.Caption = Form1.TxtPath.Caption & "\CManager"
strDir = Form1.TxtPath.Caption
End If

With New FileSystemObject
.CreateFolder strDir
End With

' Save Programme
SourceFile = Trim(Form1.Appath.Caption) ' Define source file name.
DestinationFile = Trim(Form1.DestPath.Caption) ' Define target file name.

With New FileSystemObject
.CopyFile SourceFile, DestinationFile, True
End With

'FileCopy SourceFile, DestinationFile ' Copy source to target.

' Reset Attributes
SetAttr DestinationFile, vbArchive

' Save Database
SourceFile = Trim(Form1.Appath2.Caption) ' Define source file name.
DestinationFile = Trim(Form1.DestPath2.Caption) ' Define target file name.

With New FileSystemObject
.CopyFile SourceFile, DestinationFile, True
End With

'FileCopy SourceFile, DestinationFile ' Copy source to target.

' Reset Attributes
SetAttr DestinationFile, vbArchive

I have remmed out the Filecopy bits which I tried first. Hope someone spots my dilemma. Thanks

 
Forgot to add, the directory gets created, but nothing happens further other than the error message. Thanks
 
Don't know why that error message comes up. It was not a permission at fault, it was an incorrect destination file name. So much for error messages. Thanks, all okay on that one now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top