This is what the registry entry looks like after installing & registering our software:
[HKEY_LOCAL_MACHINE\SOFTWARE\My Company\My Software]
"Registration Key"="ABC123"
I have tried these commands :
1) "C:\Program Files\My Company\My Software\Updater.exe" /checknow "HKLM\SOFTWARE\My Company\My Software\Registration Key"
2) "C:\Program Files\My Company\My Software\Updater.exe" /checknow "HKEY_LOCAL_MACHINE\SOFTWARE\My Company\My Software\Registration Key"
3) "C:\Program Files\My Company\My Software\Updater.exe" /checknow -licenseid ABC123
4) "C:\Program Files\My Company\My Software\Updater.exe" /checknow -licenseid "ABC123"
on the command prompt as well as the updater's Windows shortcut properties, but the our server side did not get any POST data, as reported by our server's collect_file.php script below; which did not execute at all.
There is no problem running our server's collect_file.php in the Internet browser, it does execute and the page will show "Array ()" message.
Which is the correct syntax to use since I can't find any practical example anywhere in the documentation or forum, or is this feature broken?
I have included these files which I used below.
Updater.ini :
[General]
URL=
my.company.com/softwareupdates.ini
ApplicationName=My Software
ID={BC4320A4-1A06-4FF8-AC39-6112A6012784}
DownloadsFolder=C:\Documents and Settings\User\Local Settings\Application Data\\My Company\My Software\updates\
AppDir=C:\Program Files\My Company\My Software\
CheckFrequency=1
CompanyName=My Company
my.company.com/softwareupdates.ini :
;aiu;
[General]
LicenseIdCheckURL=
my.company.com/collect_file.php
[Update]
Name=My Software 2.0
URL=
my.company.com/MySoftware2.0.msi
Size=2712576
ReleaseDate=14/01/2010
MD5=101b72b1dbd3a39a1bd27b62a98f1bbf
ServerFileName=MySoftware2.0.msi
Flags=SilentInstall
FilePath=[{E7BE0CF1-15DC-444E-8115-9167B928564F}{32C0AEA5-A921-4662-9017-6BDBC9218A46}]
Version=2.0
my.company.com/collect_file.php :
<?php
// test if there is any information to collect
if(!isset($_POST))
die();
$serverAppDir = @dirname(__FILE__) . '/';
$installLog = $serverAppDir . 'installs/users.log';
// create directory, if not present
@mkdir(@dirname($installLog));
// open file in "append" mode (create if not exists)
if(!$handle = @fopen($installLog, 'a'))
{
//echo "Cannot open file ($installLog)";
die();
}
// create install information record
$content = print_r($_POST, true) . "\n";
// log collected information
if(!@fwrite($handle, $content))
{
//echo "Cannot write to file ($installLog)";
}
// close file handle
@fclose($handle);
// optionally, emit a server response
echo $content;
?>