This is quick way to get a list of appletalk machines on your network when you only have access to the terminal.
atlookup
Friday, June 5, 2009
Set remote desktop from command line
reg add "\\computer\hklm\system\currentcontrolset\control\terminal server" /v "fDenyTSConnections" /d 0 /t REG_DWORD /f
0 is off and 1 is on
0 is off and 1 is on
Wednesday, June 3, 2009
Generate a command window for each iteration of a loop
rem This is good for those commands that take a lot of time.
rem Each iteration generates a new cmd window
for /l %a in (1,1,10) do start cmd /k psexec \\computer-%a time-consuming.exe
rem Each iteration generates a new cmd window
for /l %a in (1,1,10) do start cmd /k psexec \\computer-%a time-consuming.exe
Force a live update from command line
This will perform a silent live update of Symantec Antivirus 10.2
"c:\Program Files\Symantec AntiVirus\VPDN_LU.exe" /fUpdate /s
"c:\Program Files\Symantec AntiVirus\VPDN_LU.exe" /fUpdate /s
Adding a printer with vbscript from a network share
rem Add the connection
cscript prnmngr.vbs -ac -p \\server\printer_share
rem Set it as a default
cscript prnmngr.vbs -t -p "\\server\printer name"
rem If you don't know the name
cscript prnmngr.vbs -l
cscript prnmngr.vbs -ac -p \\server\printer_share
rem Set it as a default
cscript prnmngr.vbs -t -p "\\server\printer name"
rem If you don't know the name
cscript prnmngr.vbs -l
Keeping track of station numbers with a text file
rem Usually I keep track of the configurations associated with a station by its mac
rem Without the macs, one can keep track of what configuration to use by using a counter
rem
rem This works well with a network or a flash drive
for /f %%a in ('type \\server\share\count.txt') do SET temp=%%a
rem echo %temp%
SET /A temp+=1
echo %temp% > \\server\share\count.txt
rem The counts of count.txt is simply a number and can be used in a script
rem Without the macs, one can keep track of what configuration to use by using a counter
rem
rem This works well with a network or a flash drive
for /f %%a in ('type \\server\share\count.txt') do SET temp=%%a
rem echo %temp%
SET /A temp+=1
echo %temp% > \\server\share\count.txt
rem The counts of count.txt is simply a number and can be used in a script
Adding an extension to a bunch of files
#I made a bunch of text files for Windows, but XP cannot open them without an extension
#This was a quick fix
find . -type f -exec mv {} {}.txt \;
#This was a quick fix
find . -type f -exec mv {} {}.txt \;
Subscribe to:
Posts (Atom)