Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 41 lines (31 sloc) 1.28 KB
#!/bin/bash
###################################################################
# Prey Windows Specific Settings - by Tomas Pollak (bootlog.org)
# URL: http://preyproject.com
# License: GPLv3
####################################################################
readonly os_version=$(echo 'os get version' | wmic 2> /dev/null | grep -i version -A1 | tail -1 | sed 's/[^0-9\.]//g')
readonly logged_user=`echo "ComputerSystem Get Username" | wmic 2> /dev/null | grep -v 'wmic:' | grep -v "^$" | tail -1 | sed 's/.*\\\//'`
tmpbase="$WINDIR\Temp"
line_breaker="\r\n"
readonly required_net_version='2.0.50727'
readonly prey_reg_key="HKLM\Software\Prey"
x64=`echo $PROCESSOR_ARCHITEW6432 | grep "64" 1> /dev/null && echo 1`
# [ -n "$x64" ] log " ** 64 bit architecture detected!"
readonly root_path='C:\'
readonly system_path="$WINDIR"
if [ -d "C:\Users" ]; then # vista and up
readonly vista7=1
readonly users_path="C:\Users"
if [ -n "$x64" ]; then
readonly programs_path="C:\Program\ Files"
else
readonly programs_path="C:\Program\ Files\ \(x86\)"
fi
else # xp and 2000
readonly winxp=1
readonly users_path="C:\Documents\ and\ Settings"
readonly programs_path="C:\Program\ Files"
fi
readonly home_path="$users_path\\${logged_user}"
# readonly config_program="$platform_path/prey-config.exe"