-
Notifications
You must be signed in to change notification settings - Fork 1
/
Main.frm
68 lines (67 loc) · 2.25 KB
/
Main.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
VERSION 5.00
Begin VB.Form Main
BorderStyle = 1 'Fixed Single
Caption = "Install"
ClientHeight = 2025
ClientLeft = 45
ClientTop = 435
ClientWidth = 4680
Icon = "Main.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 2025
ScaleWidth = 4680
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton cmdInstall
Caption = "Install"
Height = 375
Left = 3360
TabIndex = 0
Top = 1440
Width = 1095
End
Begin VB.Label Label1
Caption = "Ýòà ïðîãðàììà èçâëå÷åò ìóëüòèìåäèéíûå ôàéëû, íåîáõîäèìûå äëÿ ðàáîòû ïðãðàììû, à çàòåì óñòàíîâèò Office Space íà âàø êîìïüþòåð."
Height = 735
Left = 240
TabIndex = 1
Top = 360
Width = 4095
End
End
Attribute VB_Name = "Main"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mfsysObject As New Scripting.FileSystemObject
Dim strDir As String
Dim strFileName As String
Private Sub cmdInstall_Click()
Dim mFolder As Folder
strDir = mfsysObject.GetSpecialFolder(WindowsFolder)
strDir = Left(strDir, 3) ' îòñåêàåì ëèøíåå
'Cîçäàíèå ïàïîê
On Error Resume Next
MkDir strDir & "Program Files\Softway\"
On Error Resume Next
MkDir strDir & "Program Files\Softway\OfficeSpace\"
Set mFolder = mfsysObject.GetFolder(App.Path & "\Sound\")
mFolder.Copy strDir
Set mFolder = mfsysObject.GetFolder(App.Path & "\Image\")
mFolder.Copy strDir & "\Program Files\Softway\OfficeSpace\"
Set mFolder = mfsysObject.GetFolder(App.Path & "\Companies\")
mFolder.Copy strDir & "\Program Files\Softway\OfficeSpace\"
Set mFolder = mfsysObject.GetFolder(App.Path & "\Save Games\")
mFolder.Copy strDir & "\Program Files\Softway\OfficeSpace\"
On Error GoTo OneExe
Shell App.Path & "\Setup.exe"
Unload Main
End
Exit Sub
OneExe:
FileCopy App.Path & "\OfficeSpace.exe", strDir & "\Program Files\Softway\OfficeSpace\OfficeSpace.exe"
Unload Main
End
End Sub