aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/archive/mozilla/xpinstall/reference/index.html
blob: 5111ad1a6b33182861c237aecdba0385f83cb065 (plain)
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
---
title: XPInstall API reference
slug: Archive/Mozilla/XPInstall/Reference
translation_of: Archive/Mozilla/XPInstall/Reference
---
<p></p><div class="warning"><p>Parts of this page show the use of the <a href="https://developer.mozilla.org/zh-CN/docs/XPInstall_API_Reference">XPInstall API</a>. The majority of this API is now deprecated and as of Gecko 1.9 no longer available. <a href="https://developer.mozilla.org/zh-CN/docs/Extensions">Extension</a>, <a href="https://developer.mozilla.org/zh-CN/docs/Themes">Theme</a>, and <a href="https://developer.mozilla.org/zh-CN/docs/Plugins">plug-in</a> developers must switch away from <code>install.js</code> based packages to the new <a href="https://developer.mozilla.org/zh-CN/docs/Bundles">packaging scheme</a> with an <code><a href="https://developer.mozilla.org/zh-CN/docs/Install_Manifests">install.rdf</a></code> manifest. In particular plugin developers should see <a class="new" href="https://developer.mozilla.org/zh-CN/docs/Shipping_a_plugin_as_a_Toolkit_bundle" rel="nofollow">how to package a plugin as an extension</a>.</p></div><p></p>


<h3 id="Objects" name="Objects">Objects</h3>

<h4 id="Install" name="Install"><a href="/en-US/docs/XPInstall_API_Reference/Install_Object">Install</a></h4>

<dl>
 <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Properties">Properties</a></dd>
 <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods">Methods</a></dd>
</dl>

<dl>
 <dd>
 <dl>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/addDirectory">addDirectory</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/addFile">addFile</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/alert">alert</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/cancelInstall">cancelInstall</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/confirm">confirm</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/deleteRegisteredFile">deleteRegisteredFile</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/execute">execute</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/gestalt">gestalt</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/getComponentFolder">getComponentFolder</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/getFolder">getFolder</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/getLastError">getLastError</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/getWinProfile">getWinProfile</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/getWinRegistry">getWinRegistry</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/initInstall">initInstall</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/loadResources">loadResources</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/logComment">logComment</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/patch">patch</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/performInstall">performInstall</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/refreshPlugins">refreshPlugins</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/registerChrome">registerChrome</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/resetError">resetError</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/Install_Object/Methods/setPackageFolder">setPackageFolder</a></dd>
 </dl>
 </dd>
</dl>

<h4 id="InstallTrigger" name="InstallTrigger"><a href="/en-US/docs/XPInstall_API_Reference/InstallTrigger_Object">InstallTrigger</a></h4>

<dl>
 <dd><em>No properties</em></dd>
 <dd><a href="/en-US/docs/XPInstall_API_Reference/InstallTrigger_Object/Methods">Methods</a></dd>
</dl>

<dl>
 <dd>
 <dl>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/InstallTrigger_Object/Methods/compareVersion">compareVersion</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/InstallTrigger_Object/Methods/enabled">enabled</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/InstallTrigger_Object/Methods/getVersion">getVersion</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/InstallTrigger_Object/Methods/install">install</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/InstallTrigger_Object/Methods/installChrome">installChrome</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/InstallTrigger_Object/Methods/startSoftwareUpdate">startSoftwareUpdate</a></dd>
 </dl>
 </dd>
</dl>

<h4 id="InstallVersion" name="InstallVersion"><a href="/en-US/docs/XPInstall_API_Reference/InstallVersion_Object">InstallVersion</a></h4>

<dl>
 <dd><a href="/en-US/docs/XPInstall_API_Reference/InstallVersion_Object/Properties">Properties</a></dd>
 <dd><a href="/en-US/docs/XPInstall_API_Reference/InstallVersion_Object/Methods">Methods</a></dd>
</dl>

<dl>
 <dd>
 <dl>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/InstallVersion_Object/Methods/compareTo">compareTo</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/InstallVersion_Object/Methods/init">init</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/InstallVersion_Object/Methods/toString">toString</a></dd>
 </dl>
 </dd>
</dl>

<h4 id="File" name="File"><a href="/en-US/docs/XPInstall_API_Reference/File_Object">File</a></h4>

<dl>
 <dd><em>No properties</em></dd>
 <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods">Methods</a></dd>
</dl>

<dl>
 <dd>
 <dl>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/copy">copy</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/dirCreate">dirCreate</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/dirGetParent">dirGetParent</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/dirRemove">dirRemove</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/dirRename">dirRename</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/diskSpaceAvailable">diskSpaceAvailable</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/execute">execute</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/exists">exists</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/isDirectory">isDirectory</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/isFile">isFile</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/macAlias">macAlias</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/modDate">modDate</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/modDateChanged">modDateChanged</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/move">move</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/remove">remove</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/rename">rename</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/size">size</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/windowsGetShortName">windowsGetShortName</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/windowsRegisterServer">windowsRegisterServer</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/File_Object/Methods/windowsShortcut">windowsShortcut</a></dd>
 </dl>
 </dd>
</dl>

<h4 id="WinProfile" name="WinProfile"><a href="/en-US/docs/XPInstall_API_Reference/WinProfile_Object">WinProfile</a></h4>

<dl>
 <dd><em>No properties</em></dd>
 <dd><a href="/en-US/docs/XPInstall_API_Reference/WinProfile_Object/Methods">Methods</a></dd>
</dl>

<dl>
 <dd>
 <dl>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/WinProfile_Object/Methods/getString">getString</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/WinProfile_Object/Methods/writeString">writeString</a></dd>
 </dl>
 </dd>
</dl>

<h4 id="WinReg" name="WinReg"><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object">WinReg</a></h4>

<dl>
 <dd><em>No properties</em></dd>
 <dd><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object/Methods">Methods</a></dd>
</dl>

<dl>
 <dd>
 <dl>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object/Methods/createKey">createKey</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object/Methods/deleteKey">deleteKey</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object/Methods/deleteValue">deleteValue</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object/Methods/enumKeys">enumKeys</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object/Methods/enumValueNames">enumValueNames</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object/Methods/getValue">getValue</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object/Methods/getValueNumber">getValueNumber</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object/Methods/getValueString">getValueString</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object/Methods/isKeyWritable">isKeyWritable</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object/Methods/keyExists">keyExists</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object/Methods/setRootKey">setRootKey</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object/Methods/setValue">setValue</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object/Methods/setValueNumber">setValueNumber</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object/Methods/setValueString">setValueString</a></dd>
  <dd><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object/Methods/valueExists">valueExists</a></dd>
 </dl>
 </dd>
</dl>

<dl>
 <dd><a href="/en-US/docs/XPInstall_API_Reference/WinReg_Object/WinRegValue">WinRegValue constructor</a></dd>
</dl>

<h3 id="Other_Information" name="Other_Information">Other Information</h3>

<h4 id="Return_Codes" name="Return_Codes">Return Codes</h4>

<p><a href="/en-US/docs/XPInstall_API_Reference/Return_Codes">See complete list</a></p>

<h4 id="Examples" name="Examples"><a href="/en-US/docs/XPInstall_API_Reference/Examples">Examples</a></h4>

<dl>
 <dd><a href="/en-US/docs/XPInstall_API_Reference/Examples/Trigger_Scripts_and_Install_Scripts">Trigger Scripts and Install Scripts</a></dd>
</dl>

<h5 id="Code_Samples" name="Code_Samples">Code Samples</h5>

<dl>
 <dd><a href="/en-US/docs/XPInstall_API_Reference/Examples/File.macAlias">File.macAlias</a></dd>
 <dd><a href="/en-US/docs/XPInstall_API_Reference/Examples/File.windowsShortcut">File.windowsShortcut</a></dd>
 <dd><a href="/en-US/docs/XPInstall_API_Reference/Examples/Install.addDirectory">Install.addDirectory</a></dd>
 <dd><a href="/en-US/docs/XPInstall_API_Reference/Examples/Install.addFile">Install.addFile</a></dd>
 <dd><a href="/en-US/docs/XPInstall_API_Reference/Examples/InstallTrigger.installChrome">InstallTrigger.installChrome</a></dd>
 <dd><a href="/en-US/docs/XPInstall_API_Reference/Examples/InstallTrigger.startSoftwareUpdate">InstallTrigger.startSoftwareUpdate</a></dd>
 <dd><a href="/en-US/docs/XPInstall_API_Reference/Examples/Windows_Install">Windows Install</a></dd>
</dl>