Lapas

trešdiena, 2013. gada 27. marts

Kā izdzēst dokumentus no printer queue

Bieži windows nevar izmest dokumentus no printer queue, ja dokuments jau ir statusā - printing jeb spooled. Tad palīdz spooled dokumentu izdzēšana no %systemroot%\system32\spool\printers\ 
Var uztaisīt cmd failu, kas to dara automātiski:

@echo off
net stop spooler
del %systemroot%\system32\spool\printers\*.shd
del %systemroot%\system32\spool\printers\*.spl
net start spooler
echo Pabeigts!
pause


Uz vista/7/8 - Run as Administrator

trešdiena, 2013. gada 6. marts

Izdzēst visus Shape Objects no Excel faila

Bieži vien gadās redzēt excel failus, kuros ir pilns ar shape objektiem. Manuāli šos objektus izdzēst nav iespējams - excelis nenormāli bremzē - Not responding.

Atveram "vainīgo" sheet un spiežam Alt+F11 un palaižam šo VBA:

Sub DeleteShapes()
Dim Shp As Shape
For Each Shp In ActiveSheet.Shapes
Shp.Delete
Next Shp
End Sub

Interesanti, ka pēc objektu izdzēšanas faila izmērs samazinās 10x.
Nākamoreiz varētu pamēģināt šo Kutools - zem Delete tools -> Delete Auto Shapes.

pirmdiena, 2013. gada 4. marts

Windows home lietotāju atslēgšana

Lai lietotājs nerēgotos logon logā viņu atslēgt var Local security policies -> Deny logon locally, bet Windows home tādas iespējas nav. Tāpēc izmantojam regedit:

HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\Winlogon\SpecialAccounts\UserList
Add new "DWORD" value, "Name" username that you want to disable.
Under the "Data" column, set the value to 0 to disable the account or set it to 1 to enable it 


Ja nav keys SpecialAccounts un UserList - izveidot.

Atslēgt lietotāju izmantojot command prompt

net user [username] /active:no

Printeri zem Mac OS X

Pielikt printeri, ja nav draiveru, izmantojot CUPS zem mac. Projekts saucas Gimp print, jeb Gutenprint.
Tālāk webiski http://127.0.0.1:631