Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

File.windowsShortcut

 

File.windowsShortcut

Dans cet exemple, la méthode windowsShortcut est utilisée pour ajouter un raccourci dans le répertoire Program ( Program est un mot clef pour désigner le répertoire d'installation du programme, par exemple, C:\Program Files\Netscape\Netscape 6\" sous Microsoft Windows) au logiciel Windows (misc.exe) installé dans le répertoire Windows .

var xpiSrc = "misc.exe";
var vi = "1.1.1.1";
initInstall(
  "Windows Shortcut",
  "test",
  vi,
  0);
f = getFolder("Windows");
g = getFolder("Temporary");
addFile(
  "miscshortcut",
  "2.2.2.2",
  xpiSrc,
  f,
  xpiSrc,
  true);
target = getFolder(f, xpiSrc);
shortcutpath = getFolder("Program");
err = File.windowsShortcut(
  target,
  shortcutpath,
  "misc shortcut",
  g,
  "",
  target,
  0);
logComment("file.windowsShortcut returns: " + err);
if (0 == getLastError())
  performInstall();
else
  cancelInstall();

Interwiki Languages Links

Étiquettes et contributeurs liés au document

 Contributeurs à cette page : teoli, Fredchat
 Dernière mise à jour par : teoli,