import subprocess
import smtplib
import socket
from email.mime.text import MIMEText
import datetime
# Change to your own account information
to = 'email@server.de'
1und1_user = 'email@server.de'
1und1_password = 'pass@server'
tries = 0
while True:
    if (tries > 60):
        exit()
    try:
        smtpserver = smtplib.SMTP('smtp.1und1.de', 587, timeout=30) # Server to use.
        break
    except Exception as e:
        tries = tries + 1
        time.sleep(1)
smtpserver.ehlo()
smtpserver.starttls()
smtpserver.ehlo
smtpserver.login(gmail_user, gmail_password)
today = datetime.date.today()
# Very Linux Specific
arg='ip route list'
p=subprocess.Popen(arg,shell=True,stdout=subprocess.PIPE)
data = p.communicate()
split_data = data[0].split()
ipaddr = split_data[split_data.index('src')+1]
my_ip = 'Your ip is %s' %  ipaddr
msg = MIMEText(my_ip)
msg['Subject'] = 'Raspb3b-Infocenter ready after reboot... - IP For RaspberryPi on %s' % today.strftime('%b %d %Y')
msg['From'] = gmail_user
msg['To'] = to
smtpserver.sendmail(gmail_user, [to], msg.as_string())
smtpserver.quit()

Download PDF

Windows 10 create List of Installed Programs with no external programs

How to Get a List of Installed Programs with Command Prompt and WMIC?

The list of installed programs on Windows can be obtained by using the WMIC command-line utility, which can access the WMI namespace. Run the elevated Command Prompt (use search and then run the app as Administrator), and execute the following command:

wmic product get name,Version

To export this list into a text file, run the following command:

wmic product get name,version /format:csv > C:\InstalledApps_%Computername%.csv

This command generates a CSV file with your computer name in the title. After command execution, open the drive C. There you will find a CSV file with your apps. In addition to the app’s names and versions, this list has the current computer name (it may be useful for further analysis or when you need to generate installed program lists from a few computers). Open this file using any text editor or Excel.

-----

To export this list into a text file, run the following command:

wmic product get name,version /format:csv > C:\InstalledApps_%Computername%.csv

This command generates a CSV file with your computer name in the title. After command execution, open the drive C. There you will find a CSV file with your apps. In addition to the app’s names and versions, this list has the current computer name (it may be useful for further analysis or when you need to generate installed program lists from a few computers). Open this file using any text editor or Excel.

------

Also, in modern Windows versions the WMIC utility allows you to generate a convenient HTML report:

wmic /output:c:\IstalledApps.htm product get Name, Version, Vendor /format:htable
Download PDF