moving users

Apparemment que la pratique commune pour changer le répertoire C:\Users vers un autre dossier ou partition est de faire ça tout croche, alors j’ose éclaircir la chose et faire part de ce que ça donne.

Background
On devrait y trouvé tous nos fichiers de configuration (par user) pour chaque programme, en plus des documents ou autres. Faites simplement l’analogie avec /home sous un Unix. /home est le parent pour tous les users.
Les nouveaux users s’y trouveront aussi. On ne veut pas ces fichiers sur la partition système. C’est une séparation naturelle.

Façons stupides
– Changer un par un la location de chaque “library” sous un certain user. Utile que pour faire rapidement de la place de façon ghetto.
– Essayer des cossins sans faire de backup.
– Laisser faire car c’est pas dans un menu et ça pas l’air si facile. J’ai failli succomber à cette dernière.

Il se peut très bien que mes essaies engendre l’effacement de tous mes données, soit par erreur technique ou humaine, alors j’ai pris le temps de faire un backup de mes trucs. En fait j’ai plutôt fait un backup de la partition système entière, et cela pour 2 raisons:
– Je peux scrapper le boot.
– En voulant faire une archive du dossier C:\Users, j’ai constaté l’échec. Au départ, je croyais que la copie fût extrêmement rapide, mais en vérifiant la grosseur de l’archive j’ai bien vu que c’était impossible. Moins d’1% des données s’y retrouvait. Aucun message d’erreur! On n’a simplement pas accès aux données, et ils sont ignorées. Je ne me suis pas lancé dans explorer en cliquant sur tous les fichiers pour y avoir accès.
– Car il étant temps que j’en fasse un.

Y a-t-il une façon de faire des symbolic links sous Windows, comme on l’a longtemps fait avec unix? Et bien apparemment que oui. Depuis peut-être 2000 avec des jonctions! Depuis Vista je crois qu’il y a aussi du support pour de vrais symlinks, qui fonctionneraient over network, mais je n’en vois pas l’utilité ici.

reboot
f8 avant que win load
recovery (premier choix)
log as admin (j’avais un dummy admin, je ne sais pas si c’était nécessaire)
command prompt

robocopy C:\Users D:\Users /E /COPYALL /XJ
rmdir /S /Q C:\Users
rmdir "C:\Documents and Settings"
mklink /J C:\Users D:\Users
mklink /J "C:\Documents and Settings" D:\Users
exit

alt-ctrl-del, reboot

ref: http://forums.techarena.in/vista-setup-install/620001.htm#post4477675

Pour le saké de la chose, certains modifiaient avec succès des keys sous HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList mais je ne connais pas la procédure exact; apparemment qu’on doit changer une douzaine de registres! J’aime mieux la façon mklink, qui a fonctionné sur un setup qui roulait depuis plus de 4 mois.

audio ripz and burnz

For Win7x64;
Exact Audio Copy.
Configure to detect drive feature, offset.
Alt-G for freedb download.
F4 to detect pretrack gaps.
Make cue sheet with one FLAC file for entire album (action -> cue sheet… -> compressed)
Verify AccurateRip results.

Open cue sheet file with Foobar2000.
Right-click Convert… to convert to multiple ogg files. (how to normalize?)

Now we can use cue/flac to play at home or make copies and ogg to put on portable media player.

Sadly, foobar2000 doesn’t seem to have a decent writer component (it lacks CD-TEXT support). To make gapless audio copies of cue/flac, use maybe burrrn.net or cdrtools. Infrarecorder gives errors about last track length (?). cdrtfe is a nice frontend and the setup file includes common decoders (but can’t make Data DVDs AFAIK).

EAC does not produce a correct cue sheet file when using compressed image (says type is WAVE). Foobar2000 doesn’t seem to mind but ironically, EAC‘s write feature can’t deal with it.

msvcp win7

Apparemment que ce certain DLL est souvent répandu par l’entremise de différents logiciels, car il n’est pas installé avec des packages de runtime ou whatever. Ça pas l’air clair à savoir si les gens qui distribuent leurs programmes compilés doivent inclure ou pas cette bibliothèque.

On peut avoir besoin de différentes versions de cette dernière, mais j’ai trouvé les fichiers pour 6.0, 7.0, 7.1, 8.0 et 9.0 en faisant une recherche sur mon disque entier et sur un backup de XP.

On dirait que les programmes en ayant besoin sont capricieux et le veulent dans leur root folder. Peut-être avec regsvr32?

cmdhere on win7

Shift + right-click shows a context menu with additional entries such as Open command window here.

To add Open powershell here with and without elevated privileges:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\ps]
  @="Open powershell here"
[HKEY_CLASSES_ROOT\Directory\shell\ps\command]
  @="C:\\windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'"
[HKEY_CLASSES_ROOT\Directory\shell\Runas]
  @="Open admin powershell here"
[HKEY_CLASSES_ROOT\Directory\shell\Runas\Command]
  @="C:\\windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'"
[HKEY_CLASSES_ROOT\Drive\shell\ps]
  @="Open powershell here"
[HKEY_CLASSES_ROOT\Drive\shell\ps\command]
  @="C:\\windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'"
[HKEY_CLASSES_ROOT\Drive\shell\runas]
  @="Open powershell admin here"
[HKEY_CLASSES_ROOT\Drive\shell\runas\command]
  @="C:\\windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -NoExit -Command Set-Location -LiteralPath '%L'"

Keys having runas in their names are the ones that will trigger elevated privileges. So yes, it seems we can only map one elevated command per HKEY_CLASSES_ROOT key…

Avira AntiVir moins gossant

EDIT (2010-04-08): J’utilise maintenant Avast! et il n’y a aucun popup en utilisant le “gaming mode”.

EDIT (2009-10-27): Les fucking popups gossants sont revenus. Je songe sérieusement à désinstaller ce logiciel et me trouver un autre anti-virus.

Je trouvais AVG trop lourd et selon les tests de quelques personnes, AntiVir est plus efficace à trouver les virus. Je me décide donc à l’installer, sous win7.

Horreur, à chaque update (plus d’une fois par jour?), je vois un maudit popup qui m’énarve avec sa version premium payante. Enlevons ça:

  • Right-click sur avnotify.exe dans le répertoire correspondant de “Program Files”;
  • Properties;
  • Security tab;
  • Éditer les permissons en cochant “Deny” pour tous les users.

Certains utilisateurs se plaignaient aussi de l’updater qui démarre en mode minimized, apparemment chiant quand on roule une application full-screen. On peut démarrer l’updater en mode invisible, comme suit:

  • Popper l’interface;
  • Administration;
  • Scheduler;
  • Right-click “Daily Update”;
  • 3 fois “Next >”;
  • Changer à “invisible”;
  • Finish.

Ref: http://www.tipsfor.us/2009/03/18/avira-antivir-updates-to-version-9-make-it-more-usable/

UAC, and Configuring GVim on Windows 7

With all this new stuff about user access control (UAC), I tend to use Windows much more in the same way that I would use another Unix OS. The default UAC settings let us know each time we must use admin privileges to do something crazy on the computer.

Using Windows XP, it would be a pain to switch to an admin account everytime we want to do this crazy something. Because of this, I’m logged on admin full time when using XP, and I don’t like it. (If anyone knows another way, please tell me, or not because I won’t use it anymore). I’m glad this has changed. I think Vista also has this feature, but since it was Vista, I didn’t care.

All this to talk about Gvim‘s startup settings file, located under a system folder in Program Files. Under XP, I changed the settings right in this file. Of course, I would never do that under, say, Ubuntu — I have this file hidden right in the root of my home directory, as it is with pretty much any other software. Under 7, I was quickly reminded that I needed admin privileges to change it. “Good lord”, I thought to myself, “Not only Windows became more multi-user friendly, it even tells me to behave well!”. Good. Put your config files at home, you bastards.

Anyway, to change startup settings, I copied _vimrc from vim‘s folder into my home directory. To set font to Lucida Console, height 12, width 6.5:

set guifont=Lucida_Console:h12:w6.5

Backup and swap files are annoying:

set nobackup nowritebackup noswapfile

Also,

syntax on
colorscheme darkblue

Doc: http://www.vim.org/htmldoc/options.html

GVim on Windows 7 x64

EDIT: The latest installer works fine.

EDIT (2009-10-27): A way better solution is to use the x64 package of gVim from http://code.google.com/p/vim-win3264/. I say it’s way better because it adds diff with vim to the context menu when selecting 2 files, something I use really often. There is surely a way to add this one to the context menu using regedit, but I didn’t search for it.

After installing GVim on Windows 7 x64, we don’t get the useful edit with vim in the context menu.

Hack with registry:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Edit with Vim]
[HKEY_CLASSES_ROOT\*\shell\Edit with Vim\command]
@="C:\\Program Files (x86)\\Vim\\vim72\\gvim.exe \"%1\""