Friday, November 12, 2010

Silent switches for some common applications

Working on setting up WDS/MDT 2010 at work, and finding silent switches that works can be quite time consuming, so for future reference I'll post a list here and hopefully it can be to some use for otheres too.

Firefox:
setup.exe -ms
Quicktime: 
QuickTimeInstaller.exe /quiet
MS Office (This one is configured in MDT): 
setup.exe
OpenOffice (Guess LibreOffice will replace this one):
msiexec /qn /i openofficeorg32.msi
Java:
jre-6u21-windows-i586.exe /s IEXPLORER=1 MOZILLA=1
Adobe Reader: 
AdbeRdr930_nb_NO.exe /sAll
7Zip: 
msiexec /qn /i 7z465.msi
FlashFirefox: 
install_flash_player.exe -install
FlashIE: 
install_flash_player_ax.exe -install
VLC: 
vlc-1.1.2-win32.exe /S
Windows Live (This one install Photo, Mail and messenger and nothing else):
WLSetup-all.exe /q /NOToolbarCEIP /NOhomepage /Nolaunch /nosearch /AppSelect:Photo,Mail,Messenger
Textpilot (This one require .NET):
msiexec /quiet /i MSI-Textpilot-Setup.msi
GIMP: 
gimp-2.6.11-i686-setup-1.exe /VERYSILENT
CDBurnerXP:
msiexec /quiet /i cdbxp_setup_4.3.7.2423.msi
Geogbra: 
GeoGebra-Windows-installer-3-2-45-0.exe /S
Google Earth:
GoogleEarthWin.exe /V"/quiet"
Google Chrome: 
ChromeStandaloneSetup.exe -install
MS Photostory: 
msiexec /quiet /i PStory.msi
Mat på data (a Norwegian program with listings of nutrition information for many types of food, maybe not too much use for other than Norwegians, but I'll include anyway):
setup_mpd51.exe /VERYSILENT

One small tip at the end. If you got access to Linux you can try the following command to identify which installer that is used (replace setup.exe with the name of the installer file):
strings setup.exe

This command  just checks a file for strings and print them out. Many installers got some XML-tags at the end with some information.

Monday, October 4, 2010

Getting Powershell started on Windows Server 2008 r2 Core

Thought I should check out how the command line based Windows Server works out, so I decided to install it virtually. I've just started to check out Powershell, so configuring and adminstering a Core installation is not something I know how to do, but you'll never learn anything if you don't dare experiment a little. Anyway, this post is just going to be some notes I make along the way of getting started. I should also be noted that I haven't done much of scripting on Windows, so I am to be considered a total noob on this subject :)

The easiest way to start the intial configuration of the server is using the utility sconfig. This utility makes you able to do the basic configuration in an easy way; setting up hostname, domain, IP-settings and so on. To get startet just type the following command in the shell;
sconfig
And the following screen will show up which is quite self explainatory:



Even though the system is kind of basic when it comes to hardware needs, you still would want to install drivers. The easiest way to do that (as far as I've found out) is to just insert the driver cd-rom and run the setup utility from there. To install the guest additions for VirtualBox i just added the iso to the VM and started the installation program. After a reboot the drivers seems installed and everything works as expected (video, mouse integration and so on).

As default we see that the shell in use is command.com and not Powershell. I am quite sure that administering a server from command.com must be for people who wants to torture themselves, so lets try to get Powershell running. By default this is not installed, so we need to get that done. Bur first we need to install the required .NET-2.0 and .NET.3.0. To get a list of available components you can use 
oclist

Of course the buffer size is so small that you can't scroll up to the first entries. The solution would be to use pipe (|) and send the output through more:
oclist | more

So lets continue by install the required .NET packages (one important note; command.com have suddenly become case-sensitive!, I did not get that memo, so I had some trouble figuring out why I couldn't get it installed, but when I used the right case it worked. :
ocsetup NetFx2-ServerCore
ocsetup NetFx3-ServerCore

We don't get any progress bars or anything, so we just have to guess when it's finished (or you can push ctrl+shift+esc to get to Task Manager, and just watch the processlist).


And finally we install Powershell:
ocsetup MicrosoftWindowsPowerShell

To start Powershell the following command will do:
c:\windows\system32\WindowsPowerShell\1.0\powershell.exe

Don't let the 1.0 part fool you, it is Powershell 2.0 that you got at your hands :)

Now we can start exploring Powershell and see what it can do and how it works. My first impressions can be summarized like this:
I miss Bash :)
But I guess that if are going to administering Windows Servers (core or standard) it's not a bad thing to know a little about Powershell. A future post will contain what I've discovered while trying to figure out how it works.

Wednesday, September 29, 2010

How to save a video stream to disk with mplayer

If you want to save a video stream from the web to your disk, you can use mplayer to archive that. Many times the stream you want is in an .aspx file, but you need to find out what the mms:// stream is. One way to do that is to use VLC and open the .aspx-URL with that. When the stream is loaded you can use Tools->Media information and the mms-address should be found in this window.

When the mms-adress is identified the command to save it with mplayer is straight forward:

mplayer -dumpstream mms://the-adress-follows-here -dumpfile filename-you-want-to-save-as.avi

How to check if your dynamic public IP has changed and mail it to you

I think it's really nice to be able to SSH in to my system from work, but I'm too greedy to pay for a static IP, so I made the following script. Please use and modify it as you see fit.
You should add to your crontab so it's ran at a specified interval.

#!/bin/bash

PUBLIC_IP=$(links -dump www.whatismyip.com |grep "Your IP Address Is:" | cut -d":" -f2|tr -d " ")

if [ -f /tmp/publicip ]; then
    KNOWN_IP=$(cat /tmp/publicip)
else
    KNOWN_IP=0
fi

if [ "$PUBLIC_IP" != "$KNOWN_IP" ]; then
    echo $PUBLIC_IP > /tmp/publicip
    SMTPSERVER="smtp.yourisp.tld"
    TO="your@mail.tld"
    FROM="your@mail.tld"
    SUBJECT="IP-change"
    DATA=$(cat /tmp/publicip)
    {
    sleep 1
    echo "HELO $SMTPSERVER"
    sleep 1
    echo "MAIL FROM: $FROM"
    sleep 1
    echo "RCPT TO: $TO"
    sleep 1
    echo "DATA"
    sleep 1
    echo "Subject: $SUBJECT"
    sleep 1
    echo "$DATA"
    echo "."
    sleep 1
    } | telnet $SMTPSERVER 25 >/dev/null 2>&1
else
    exit $1;
fi

Wednesday, March 31, 2010

Finally I've got myself a blog

I've finally started to make myself a blog containing stuff that interests me, mainly GNU/Linux and other things related to that and computers in general. You'll get more information if you head over to the About me and this blog page. This blog is highly under construction, but I hope to get the time to update it as much as I want, so please check back if you think this blog could interest you :)