我在VB6中制作了这些代码,但是当我运行它时,Vb说我找不到Path,有人可以帮我,这是我的VB代码:
MkDir App.Path & "\users\" & Splice(2)
Open App.Path & "\users\" & Splice(2) & "\pass.txt" For Append As #1
Print #1, Splice(3)
Close #1
Open App.Path & "\users\" & Splice(2) & "\list.txt" For Append As #1
Print #1, "" 'we have to put something into the buddy list
'so well put nothing ;)
Close #1
Open App.Path & "\users\" & Splice(2) & "\info.txt" For Append As #1
Print #1, "" 'we have to put something into the buddy list
'so well put nothing ;)
Close #1
Open App.Path & "\ipreglog.log" For Append As #1
Print #1, inip
Close #1
由于
答案 0 :(得分:3)
MkDir不是递归的,因此需要直接父级存在。 尝试确保首先存在Users目录:
MkDir App.Path & "\users\"
MkDir App.Path & "\users\" & Splice(2)
答案 1 :(得分:2)
您正在写入App.Path下面的文件。注意virtualisation of Program Files。 Windows通过秘密写入虚拟文件夹来阻止程序写入Program Files
及其子目录。