Serialize RT on Windows 7
Mark Phillips
mark.phillips at mophilly.com
Sun Dec 26 12:58:41 EST 2010
On Dec 25, 2010, at 7:12 AM, Paul Jonson wrote:
> What is the trick to get Studio 5.1 RT installed on a windows 7 box?
>
> It doesn't prompt for a license...
Hi, Paul,
You can open the serial number dialog using the method $serialize. Here is a snippet from the the help text: "$serialise([bGenericLogo=kFalse,cTitle,iIconId=0]) opens the serialize dialog. Title is the dialog title. If bGenericLogo is true a generic logo icon is displayed,else iIconId is the icon id of the logo icon (zero uses the default Omnis logo)".
The parameters let you style the dialog to present your application logo and title.
You can also write the serial number to the file "serial.txt". This is stored under the psuedo directory "Application Data", in a folder named "Local". You can get a path using sys(115); here is its definition from the documents: "On all platforms except Windows Vista returns the pathname of the folder containing the Omnis executable, including the terminating path separator.
On Windows Vista returns the pathname of the folder containing the installed writeable files, including the terminating path separator (usually a sub-folder of the AppData Local folder). To get the pathname of the folder containing the Omnis executable, use sys(215)."
BTW, the reading and writing of files to other sanctioned directories can be managed using GetEnv commands on Windows. For Mac OS, these values are available using shell scripts.
In the application foundation we have built, an object class handles these tasks for the desktop platforms we currently support: mac os x, windows xp and windows 7.
hth,
- Mark
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
-- Brian W. Kernighan
More information about the omnisdev-en
mailing list