By Chris Graham
PROBLEM: We have a NAL application that we only want to be available if the screen resolution is 1024x768 or higher. We have had no luck finding anything in the registry, in a readable format, to determine the screen size.
Create a forced-run, install-only NAL app. Place the code in the Run Options|Launch Scripts|Run before Launching box. Set the Script Engine Location to wscript.exe and the file extension to .vbs
The code will determine the screen resolution, create an environment variable (ScrRes) with the value of the width of the screen and refresh NAL.
We then use the ScrRes variable to determine the availability of our other application.
set oShell = wscript.createobject("wscript.shell")
set sysenv = oshell.environment("Volatile")
'*** Get width value of screen resolution
'*** Set the ScrRes environment variable to equal the screen width
sysenv("ScrRes") = .width
'*** Wait 5 seconds and refresh NAL
If you have any questions you may contact Chris at grahamcTAKETHISOUT@tbh.net
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.