Announcement

Collapse
No announcement yet.

VBScript - Control //NOLOGO from within script?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • VBScript - Control //NOLOGO from within script?

    I'd like the ability to switch off the stupid logo from within my scripts just for their own execution. Having to tell people to do //nologo is lame and I am not going to go around to all my servers or someone else's servers to do cscript //nologo //s on all of them.

    Is there a way to switch off the logo from within a script, that same way you can set a timeout from within the script?

    Given that the self setting of Timeout seemed to be an undocumented feature over at Microsoft, I'd really like to know if the same is true for NOLOGO.

  • #2
    Re: VBScript - Control //NOLOGO from within script?

    The syntax should be;
    DisplayLogo=1 (<= //Logo)
    DisplayLogo=0 (<= //NoLogo)

    (this is relevant only when cscript is the host)

    hope it works for you ?


    \Rems

    EDIT
    The persistent settings can be found here
    HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings
    (or, you can execute: wscript.exe)
    and here:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Script Host\Settings
    Last edited by Rems; 11th January 2008, 15:13.

    This posting is provided "AS IS" with no warranties, and confers no rights.

    __________________

    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts

    Comment


    • #3
      Re: VBScript - Control //NOLOGO from within script?

      The problem with that is that you cannot set it from within the script itself.

      I looks like you can only use it in an accompanying .wsh file. This is kind of like the batch dependency of distributing a second file so I can't use this.

      I have tried setting this property from within script itself like so
      Code:
      WScript.DisplayLogo=0
      but when I run it I get
      Code:
      Microsoft VBScript runtime error: Object doesn't support this property or method: 'WScript.DisplayLogo'

      Comment


      • #4
        Re: VBScript - Control //NOLOGO from within script?

        Originally posted by humbletech99 View Post
        I looks like you can only use it in an accompanying .wsh file. This is kind of like the batch dependency of distributing a second file so I can't use this.
        You are right about that.

        A WSH file is like a PIF file for batch files; it contains the options in INI-file format:
        Code:
        [ScriptFile]
        Path=D:\scripts\test.vbs
        
        [Options]
        Timeout=10
        DisplayLogo=0
        
        BatchMode=0
        This Logo or NoLogo thing must be set before executing, it will be to late to set this in the script it self.

        This posting is provided "AS IS" with no warranties, and confers no rights.

        __________________

        ** Remember to give credit where credit's due **
        and leave Reputation Points for meaningful posts

        Comment


        • #5
          Re: VBScript - Control //NOLOGO from within script?

          yes that is what I was thinking, I think I might be stuck on this one, unless anyone has any bright ideas?

          Comment


          • #6
            Re: VBScript - Control //NOLOGO from within script?

            You could,
            create a WSH file, use a relative path to the vbscript (.\test.vbs) that is in the same folder.
            Use WinRAR to create one archive with both files, and convert it to SFX.
            (options; path to extract=%temp%, run test.WSH after extraction)

            \Rems

            This posting is provided "AS IS" with no warranties, and confers no rights.

            __________________

            ** Remember to give credit where credit's due **
            and leave Reputation Points for meaningful posts

            Comment


            • #7
              Re: VBScript - Control //NOLOGO from within script?

              thanks for the clever idea but it's not really suitable for what I'm trying to do. This program will be used over and over and I don't want to do that.

              Comment

              Working...
              X