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