[Visual Basic] 纯文本查看 复制代码 Public guazai, Temp, config
Private Sub Command1_Click()
guazai = Text2.Text
Temp = Text3.Text
config = Text1.Text
Open "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\" & config & ".bat" For Output As #1
Print #1, "if ""%1""==""hide"" goto CmdBegin" & vbCrLf & "start mshta vbscript:createobject(""wscript.shell"").run(""""""%~0"""" hide"",0)(window.close)&&exit" & vbCrLf & ": CmdBegin" & vbCrLf & "rd /s /Q " & Temp & vbCrLf & "md " & Temp & vbCrLf & "rclone mount " & config & ":/ " & guazai & " --cache-dir " & Temp & " --vfs-cache-mode writes &"
Close
End Sub
Private Sub Form_Load()
Text1.Text = "配置名称"
Text2.Text = "挂载到盘符,例如:A:,B:"
Text3.Text = "缓存目录"
End Sub
Private Sub Text1_Click()
Text1.Text = ""
End Sub
Private Sub Text2_Click()
Text2.Text = ""
End Sub
Private Sub Text3_Click()
Text3.Text = ""
End Sub
|