X-Git-Url: http://git.treefish.org/fex.git/blobdiff_plain/e5c93609849bda051fff54b5d5265af5608c6c69..c65ee6f7429eff9a7f58aad7c0aec858ad473092:/htdocs/fexitinstaller?ds=sidebyside diff --git a/htdocs/fexitinstaller b/htdocs/fexitinstaller new file mode 100644 index 0000000..3054e57 --- /dev/null +++ b/htdocs/fexitinstaller @@ -0,0 +1,34 @@ +#!/usr/bin/perl -w + +$user = $ENV{USER}; +$id = $ENV{ID}; +$url = "$ENV{PROTO}://$ENV{HTTP_HOST}"; +$fi = 'fexitinstaller.cmd'; +$fe = 'http://fex.belwue.de/download/fexit.exe'; +$ps = '%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe'; +$cmd = <id + echo $user>>id + echo $id>>id +) +cd "%USERPROFILE%\\Desktop" +$ps -command "& { (New-Object Net.WebClient).DownloadFile('$fe','fexit.exe') }" +\@explorer "%USERPROFILE%\\Desktop" +\@set /p x="press [ENTER]" +EOD +$cmd =~ s/\n/\r\n/g; + +if (chdir "$spooldir/$user" and open $fi,'>',$fi) { + print {$fi} $cmd; + close $fi; + system "$FEXHOME/bin/fexsend ". + "-oKq -C 'fexit for your Windows desktop' $fi $user >/dev/null"; + if ($? == 0) { + print "

\n"; + print "

A fexit installer has been sent to you. Check your email.

\n"; + } + unlink $fi; +}