vbs to exe

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

    #1

    vbs to exe

    i have this vbs


    On Error Resume Next
    dim WshShell,FSO




    sUser="++++++"
    sPass="+++++++"
    sCmd="+++++++"
    set WshShell = CreateObject("W Script.Shell")
    set WshEnv = WshShell.Enviro nment("Process" )
    WinPath = WshEnv("SystemR oot")&"\System3 2\runas.exe"
    set FSO = CreateObject("S cripting.FileSy stemObject")

    if FSO.FileExists( winpath) then
    'wscript.echo winpath & " " & "verified"
    else
    wscript.echo "!! ERROR !!" & VBCRLF & "Can't find or verify " &
    winpath &"." & VBCRLF & "You must be running Windows 2000 for this
    script to work."
    set WshShell=Nothin g
    set WshEnv=Nothing

    set FSO=Nothing
    wscript.quit
    end if

    rc=WshShell.Run ("runas /user:" & sUser & " " & CHR(34) & sCmd &
    CHR(34), 2, FALSE)

    Wscript.Sleep 30 'need to give time for window to open.
    WshShell.AppAct ivate(WinPath) 'make sure we grab the right window to
    send password to
    WshShell.SendKe ys sPass 'send the password to the waiting window.

    set WshShell=Nothin g

    set WshEnv=Nothing
    set FSO=Nothing

    wscript.quit


    i have convert this to exe...ok...but if i run will open i window and
    wait i password for the command runas -.-" while if i run this
    in .vbs: wscript xxxx.vbs it work...

    why?


    tnx, Pietro

  • rowe_newsgroups

    #2
    Re: vbs to exe

    i have convert this to exe...ok...but if i run will open i window and
    wait i password for the command runas -.-" while if i run this
    in .vbs: wscript xxxx.vbs it work...
    Sorry, but this sentence doesn't make since to me. I realize that
    English probably isn't you're primary language, but could you please
    try to clarify this sentence?

    Thanks,

    Seth Rowe

    Comment

    • Pietro Pesce

      #3
      Re: vbs to exe

      On 2 Ago, 16:28, rowe_newsgroups <rowe_em...@yah oo.comwrote:
      i have convert this to exe...ok...but if i run will open i window and
      wait i password for the command runas -.-" while if i run this
      in .vbs: wscript xxxx.vbs it work...
      >
      Sorry, but this sentence doesn't make since to me. I realize that
      English probably isn't you're primary language, but could you please
      try to clarify this sentence?
      >
      Thanks,
      >
      Seth Rowe
      mmmmmm
      i dont speak good en ;)
      this script .vbs work...
      ..exe no!

      why?

      Comment

      • rowe_newsgroups

        #4
        Re: vbs to exe

        On Aug 2, 10:50 am, Pietro Pesce <mista...@tele2 .itwrote:
        On 2 Ago, 16:28, rowe_newsgroups <rowe_em...@yah oo.comwrote:
        >
        i have convert this to exe...ok...but if i run will open i window and
        wait i password for the command runas -.-" while if i run this
        in .vbs: wscript xxxx.vbs it work...
        >
        Sorry, but this sentence doesn't make since to me. I realize that
        English probably isn't you're primary language, but could you please
        try to clarify this sentence?
        >
        Thanks,
        >
        Seth Rowe
        >
        mmmmmm
        i dont speak good en ;)
        this script .vbs work...
        .exe no!
        >
        why?
        Okay, how does the exe not work? Is it throwing an exception (if so
        please share the message) or is it just not working?

        Thanks,

        Seth Rowe

        Comment

        • Pietro Pesce

          #5
          Re: vbs to exe

          On 2 Ago, 17:01, rowe_newsgroups <rowe_em...@yah oo.comwrote:
          On Aug 2, 10:50 am, Pietro Pesce <mista...@tele2 .itwrote:
          >
          >
          >
          >
          >
          On 2 Ago, 16:28, rowe_newsgroups <rowe_em...@yah oo.comwrote:
          >
          i have convert this to exe...ok...but if i run will open i window and
          wait i password for the command runas -.-" while if i run this
          in .vbs: wscript xxxx.vbs it work...
          >
          Sorry, but this sentence doesn't make since to me. I realize that
          English probably isn't you're primary language, but could you please
          try to clarify this sentence?
          >
          Thanks,
          >
          Seth Rowe
          >
          mmmmmm
          i dont speak good en ;)
          this script .vbs work...
          .exe no!
          >
          why?
          >
          Okay, how does the exe not work? Is it throwing an exception (if so
          please share the message) or is it just not working?
          >
          Thanks,
          >
          Seth Rowe- Nascondi testo tra virgolette -
          >
          - Mostra testo tra virgolette -


          because dont open the program cambio_ip.exe in administrative
          mode.....when i run the exe i see the window that question me the
          password for runas... if i run the script "wscript aaa.vbs" the
          program work.....

          Comment

          • rowe_newsgroups

            #6
            Re: vbs to exe

            On Aug 2, 11:10 am, Pietro Pesce <mista...@tele2 .itwrote:
            On 2 Ago, 17:01, rowe_newsgroups <rowe_em...@yah oo.comwrote:
            >
            >
            >
            On Aug 2, 10:50 am, Pietro Pesce <mista...@tele2 .itwrote:
            >
            On 2 Ago, 16:28, rowe_newsgroups <rowe_em...@yah oo.comwrote:
            >
            i have convert this to exe...ok...but if i run will open i window and
            wait i password for the command runas -.-" while if i run this
            in .vbs: wscript xxxx.vbs it work...
            >
            Sorry, but this sentence doesn't make since to me. I realize that
            English probably isn't you're primary language, but could you please
            try to clarify this sentence?
            >
            Thanks,
            >
            Seth Rowe
            >
            mmmmmm
            i dont speak good en ;)
            this script .vbs work...
            .exe no!
            >
            why?
            >
            Okay, how does the exe not work? Is it throwing an exception (if so
            please share the message) or is it just not working?
            >
            Thanks,
            >
            Seth Rowe- Nascondi testo tra virgolette -
            >
            - Mostra testo tra virgolette -
            >
            because dont open the program cambio_ip.exe in administrative
            mode.....when i run the exe i see the window that question me the
            password for runas... if i run the script "wscript aaa.vbs" the
            program work.....
            Post the code for the exe - I suspect you're not using impersonation
            like we suggested in the other thread.

            Thanks,

            Seth Rowe

            Comment

            • Pietro Pesce

              #7
              Re: vbs to exe

              On 2 Ago, 18:56, rowe_newsgroups <rowe_em...@yah oo.comwrote:
              On Aug 2, 11:10 am, Pietro Pesce <mista...@tele2 .itwrote:
              >
              >
              >
              >
              >
              On 2 Ago, 17:01, rowe_newsgroups <rowe_em...@yah oo.comwrote:
              >
              On Aug 2, 10:50 am, Pietro Pesce <mista...@tele2 .itwrote:
              >
              On 2 Ago, 16:28, rowe_newsgroups <rowe_em...@yah oo.comwrote:
              >
              i have convert this to exe...ok...but if i run will open i window and
              wait i password for the command runas -.-" while if i run this
              in .vbs: wscript xxxx.vbs it work...
              >
              Sorry, but this sentence doesn't make since to me. I realize that
              English probably isn't you're primary language, but could you please
              try to clarify this sentence?
              >
              Thanks,
              >
              Seth Rowe
              >
              mmmmmm
              i dont speak good en ;)
              this script .vbs work...
              .exe no!
              >
              why?
              >
              Okay, how does the exe not work? Is it throwing an exception (if so
              please share the message) or is it just not working?
              >
              Thanks,
              >
              Seth Rowe- Nascondi testo tra virgolette -
              >
              - Mostra testo tra virgolette -
              >
              because dont open the program cambio_ip.exe in administrative
              mode.....when i run the exe i see the window that question me the
              password for runas... if i run the script "wscript aaa.vbs" the
              program work.....
              >
              Post the code for the exe - I suspect you're not using impersonation
              like we suggested in the other thread.
              >
              Thanks,
              >
              Seth Rowe- Nascondi testo tra virgolette -
              >
              - Mostra testo tra virgolette -
              the code is in the 1° post....i convert this vbs in a exe

              Comment

              Working...