www.pudn.com > virtualdrivemapper.zip > modMain.bas
Attribute VB_Name = "modMain"
'/////////////////////////////////////////////////////////
'Copyright © 2001 B.O.O.P.S. Inc.
'BOOPS, Based On Other People's Stuff
'We don't code the source you download, we code it better.
'Original only in the synthesis.
'
'This program is based on Ian O'Connor's(oc@lineone.net) vb script file
'"Directory Mapping.vbs" with revisions by Neil Ramsbottom(nramsbottom@hotmail.com).
'It was included in the zip.
'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Private R As New cReg
Dim filesys, wsh
Sub Main()
If Command = "-Boot" Then
frmBoot.Show
Exit Sub
End If
If App.PrevInstance = True Then
MsgBox "There is already another instance of vDrive running.", vbExclamation
End
End If
If R.ValRegKey(&H80000001, "Software\BOOPS", "Loaded") = True Then
frmMain.Show
Else
R.CreateNewKey &H80000001, "Software\BOOPS"
R.SetKeyValue &H80000001, "Software\BOOPS", "Loaded", "0", REG_SZ
R.SetKeyValue &H80000001, "Software\Microsoft\Windows\CurrentVersion\Run", "vDrive", App.Path & "\vDrive.exe -Boot", REG_SZ
frmMain.Show
End If
End Sub
Public Function FileExist(Filename As String) As Boolean
On Error Resume Next
FileExist = (Dir$(Filename) <> "")
End Function