Vyhľadajte odpoveď

Vyhnite sa podvodom s podporou. Nikdy vás nebudeme žiadať, aby ste zavolali alebo poslali SMS na telefónne číslo alebo zdieľali osobné informácie. Nahláste prosím podozrivú aktivitu použitím voľby “Nahlásiť zneužitie”.

Learn More

Username variable in policy templates or in about:config

  • 1 odpoveď
  • 0 má tento problém
  • 8 zobrazení
  • Posledná odpoveď od cor-el

more options

I'm trying to set the download location to a different drive, containing the current username. For example, if my username is Brett.Michaels, I want my default download directory to be G:\brett.michaels. Other browsers have a variable that is usable like {user_name} however I can only find reference to {home} for Firefox, which does not allow me to alter the drive. I've tried using Windows-based environment variables to no avail. Perhaps I'm missing something?

Thanks!

I'm trying to set the download location to a different drive, containing the current username. For example, if my username is Brett.Michaels, I want my default download directory to be G:\brett.michaels. Other browsers have a variable that is usable like {user_name} however I can only find reference to {home} for Firefox, which does not allow me to alter the drive. I've tried using Windows-based environment variables to no avail. Perhaps I'm missing something? Thanks!

Všetky odpovede (1)

more options

The getenv() function is one of the available function for the autoconfig.cfg, you can't do this via about:config. There is no mention that it can be used with a policy.


function getenv(name) {
  try {
    return Services.env.get(name);
  } catch (e) {
    displayError("getEnvironment", e);
  }
  return undefined;
}

Pomohla vám táto odpoveď?

Položiť otázku

Ak chcete odpovedať na príspevky, musíte sa prihlásiť do svojho účtu. Ak ešte nemáte účet, položte novú otázku.