change windows desktop background

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Cezar

    change windows desktop background

    Hello!

    How can I change Windows (or any other) desktop background in javascript ?
    It is possible?

    Thanks for any advices.
    Cezar.


  • Richard Cornford

    #2
    Re: change windows desktop background

    Cezar wrote:[color=blue]
    > How can I change Windows (or any other) desktop background in
    > javascript ? It is possible?[/color]

    As I recall, the desktop background is held in a setting in the Windows
    registry so a WSH script or an HTA could change those settings
    (implemented in JScript). If the idea is to attempt it from a web page
    over the Internet then security restriction will render the task
    impossible.

    Richard.


    Comment

    • Steven Daedelus

      #3
      Re: change windows desktop background

      In article <c960kv$cjl$1$8 302bc10@news.de mon.co.uk>,
      "Richard Cornford" <Richard@litote s.demon.co.uk> wrote:
      [color=blue]
      > Cezar wrote:[color=green]
      > > How can I change Windows (or any other) desktop background in
      > > javascript ? It is possible?[/color]
      >
      > As I recall, the desktop background is held in a setting in the Windows
      > registry so a WSH script or an HTA could change those settings
      > (implemented in JScript). If the idea is to attempt it from a web page
      > over the Internet then security restriction will render the task
      > impossible.
      >
      > Richard.[/color]

      I concur. The root object, when you run JS in a web page, is the window
      object. Can't go any higher than that.

      Comment

      • bruce

        #4
        Re: change windows desktop background

        "Cezar" <cezaryk@imail. net.pl> wrote in message news:<c95rb2$m7 j$1@nemesis.new s.tpi.pl>...[color=blue]
        > Hello!
        >
        > How can I change Windows (or any other) desktop background in javascript ?
        > It is possible?
        >
        > Thanks for any advices.
        > Cezar.[/color]

        If you include an ActiveX object in your javascript, it would
        probably possible, but I doubt this could be done with javascript
        alone. Would be quite a security breach!

        Comment

        • Thomas 'PointedEars' Lahn

          #5
          Re: change windows desktop background

          Steven Daedelus wrote:
          [color=blue]
          > [...] "Richard Cornford" [...] wrote:[color=green]
          >> As I recall, the desktop background is held in a setting in the Windows
          >> registry so a WSH script or an HTA could change those settings
          >> (implemented in JScript). If the idea is to attempt it from a web page
          >> over the Internet then security restriction will render the task
          >> impossible.
          >> [...][/color]
          >
          > I concur. The root object, when you run JS in a web page, is the window
          > object. Can't go any higher than that.[/color]

          The root object of an (X)HTML document (that is what you call a "web page")
          is the "html" element object which is part of the DOM. The global object
          has a "window" property that refers to itself in all HTML UAs I know of.
          It is correct that one cannot escape from the browser's DOM and "invade"
          the user's system without an appropriate client-side API.

          However, Richard was talking about HyperText Applications (HTAs) that use
          the Windows Script Host (WSH) and ActiveX. Those run on the client, but
          not necessarily within the browser (but *can* run from Internet sites in
          IE!), and can access e.g. the Windows registry (take for example the Windows
          Me/2k/XP Control Panel's Software module -- that is a HTA). (That is why
          RadioActiveX is considered harmful and support for that is recommended to
          be restricted, if not disabled, if not avoiding IE and Windows at all.)


          PointedEars

          Comment

          Working...