Results 1 to 14 of 14

Thread: Browser control in a screensaver

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    739

    Browser control in a screensaver

    Making a .net version of an old vb6 screensaver.

    Ive got an old vb6 project that builds a screensaver. Its simply a form that fills the display. The form has a webbrowser control which loads a html file that is located on a shared folder on a local network drive.

    The screensaver is configured in the registry Users> .Default>ControlPanel>Desktop so that it comes on as the pre login screensaver. ie before any user logs in.

    This has worked for 10 years or more on XP maxhines.

    I'm now making a .net version of that.

    On a windows 7 computer If the user is logged in and the screensaver comes on through inactivity then it works just fine. If the user is not logged on then the screensaver comes on but it doesnt load the html page.

    I'm assuming this is some kind of security issue in win7.

    So, i'm looking for alternative suggestions. I'd really like to show the html document in the screensaver but i'm open to other suggestions. Its a just a simple html page with table showing colored text in columns and rows. There's no hyperlinks or any active content. The html is generated by a different process running on a different device so if i switch to using something else then I'll need to rewrite that other process as well so a solution that can use the current html document is my preferred solution.

    But all suggestions are appreciated.

    Thanks
    Ian

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,479

    Re: Browser control in a screensaver

    my guess is that your local network drive requires your logon credentials

  3. #3
    Hyperactive Member mbutler755's Avatar
    Join Date
    May 2008
    Location
    Peoria, AZ
    Posts
    417

    Re: Browser control in a screensaver

    Quote Originally Posted by .paul. View Post
    my guess is that your local network drive requires your logon credentials
    You could copy the file to the local drive and see if this is the issue. Try putting it in C:\ScreenSaver and altering your registry key to see if security is the problem.
    Regards,

    Matt Butler, MBA, BSIT/SE, MCBP
    Owner, Intense IT, LLC
    Find us on Facebook
    Follow us on Twitter
    Link up on LinkedIn
    mb (at) i2t.us

    CODE BANK SUBMISSIONS: Converting Images to Base64 and Back Again

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    739

    Re: Browser control in a screensaver

    Sorry, should have explained in more detail. The network drive is what the old vb6 system is using.

    On my .net development machine the html file is in the local computer.

  5. #5
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,479

    Re: Browser control in a screensaver

    I think it's still the same problem.
    can you make a copy of the html + save it in my.resources?

    then you can set webbrowser.documenttext = my.resources.resourceName

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    739

    Re: Browser control in a screensaver

    Just for testing purposes the folder where the html file is located is set for sharing. Security is Everyone, full control. Wouldnt that eliminate any permission issues?

    Bear in mind that the screen saver is coming on before any user logs on so wouldnt the screensaver at that moment be running as SYSTEM ? And not as a user with restricted permissions.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    739

    Re: Browser control in a screensaver

    Actually, for dev/testing the screensaver file and the html file are in the same folder. The system has no problem getting the screensaver executable but the executable refuses to open the html thats in the same folder.

  8. #8
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,479

    Re: Browser control in a screensaver

    must be a security problem. it seems it won't let you access the filesystem while the user isn't logged in.
    is there any reason my my.resources idea wouldn't work?

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    739

    Re: Browser control in a screensaver

    Quote Originally Posted by .paul. View Post
    ... is there any reason my my.resources idea wouldn't work?
    Sorry Paul. I'm not at my desk at the moment so cant try it. I'm Accessing vbforums using an ipad.

    This my.resources idea. If that works on the local drive will it also work on the network drive? Will the other machine be able to update the html file?

    The system has a machine thats monitoring a bunch of devices. That machine is logging data into a database and every few minutes it generates the html file.

    All other machines have the screensaver reading that html file.

    So, for testing i'm using a local html file but when deployed it has to be able to read that html file from the shared network folder.

  10. #10
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,479

    Re: Browser control in a screensaver

    no. it would be more of a static set-up.
    it might not be the best solution, but you could keep an up-to-date version of the html in my.settings, then you can display that when you can't access your live html.
    would that help?

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    739

    Re: Browser control in a screensaver

    I really need to display the live data. Its system status info that people need to respond to quickly.

    The idea of the screensaver is that if the person whose job it is to monitor the system hasnt come in to work on time, or he's logged out and gone to lunch, then his computer will be showing the system status in its screensaver and somebody else on a nearby desk will see if anything pops up.

    I'm just wondering whether the loading of a webbrowser control before any user has logged in is a security hole that MS have decided to close. To prevent misbehaving apps, ie malware etc from navigating to remote sites using system permissions which could, in theory, download and execute more malware.

    I'm going to try using something like a datagridview to load data from a csv or xml file instead. I'll be able to lay it out so it looks pretty much the same, its just columns of text. I'll also need to update the monitoring system to create the csv or xml file instead of the html.

    Just itching to get back to my desk and try this but if i go now Mrs IanS will be throwing my dinner out into the street
    Last edited by IanS; Aug 14th, 2013 at 02:23 PM.

  12. #12
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,537

    Re: Browser control in a screensaver

    Quote Originally Posted by IanS View Post
    Just for testing purposes the folder where the html file is located is set for sharing. Security is Everyone, full control. Wouldnt that eliminate any permission issues?

    Bear in mind that the screen saver is coming on before any user logs on so wouldnt the screensaver at that moment be running as SYSTEM ? And not as a user with restricted permissions.
    No... at that moment it's running as LocalSystem... with NO network context at all... since for all intents and purposes, it's "disconnected" it has no network login credentials of any kind with which to access the network resources.

    Quote Originally Posted by IanS View Post
    This my.resources idea. If that works on the local drive will it also work on the network drive? Will the other machine be able to update the html file?
    Ergh... apparently we're unclear on how the My namespace and .Resources property works, are we?... the short answer is NO ... Resource files are EMBEDDED INTO THE APP ... it has nothing to do with network or local or any kind of drives...

    Quote Originally Posted by IanS View Post
    The system has a machine thats monitoring a bunch of devices. That machine is logging data into a database and every few minutes it generates the html file.

    All other machines have the screensaver reading that html file.

    So, for testing i'm using a local html file but when deployed it has to be able to read that html file from the shared network folder.
    It sounds like this is only going to work IF the machine is logged in...

    Now wait... there is an alternative.... the computer where the HTML file gets stored... can you turn that into a webserver? It doesn't need to be IIS, even a simple install of WAMP would work... then instead of accessing the FILE you would access the WEBADDRESS (even if it's http:\\internalserve\systemstatus\status.html -- in other words it doesn't need to be a full blown internet address...) THEN you should be able to access it that way, w/o worrying about the machine being logged in... that *might* work...


    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  13. #13

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    739

    Re: Browser control in a screensaver

    Quote Originally Posted by techgnome View Post
    No... at that moment it's running as LocalSystem... with NO network context at all... since for all intents and purposes, it's "disconnected" it has no network login credentials of any kind with which to access the network resources.
    Now that you mention it that does make sense. But how is it working on the current XP based system? All users authenticate to a domain server and when no user has logged in how is the current vb6 screensaver accessing the html file over the network?


    Ergh... apparently we're unclear on how the My namespace and .Resources property works, are we?... the short answer is NO ... Resource files are EMBEDDED INTO THE APP ... it has nothing to do with network or local or any kind of drives...
    I assumed Paul was suggesting an embedded html file that contained 'something' like a static place holder but it gave me an idea that the embedded html file could contain a HTML REFRESH tag with zero interval that refreshed to the remote html page.

    But after all that, if it is simply a case that no network access is allowed at all until somebody logs in then that wouldnt work either.

  14. #14
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,537

    Re: Browser control in a screensaver

    Quote Originally Posted by IanS View Post
    Now that you mention it that does make sense. But how is it working on the current XP based system? All users authenticate to a domain server and when no user has logged in how is the current vb6 screensaver accessing the html file over the network?
    Ever-increasing security... it's possible that previously in XP, machines were still resolving to the domain and allowing network access (makes sense especially if that workstations also then has a shared folder... it needs to resolve on the network in order for it to be accessed... it's possible that loophole has been removed... or there's some setting in windows somewhere that was on by default in XP, whereas in Win7 it's off...

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width