Windows Vista Forums

Script DOS Command?

  1. #1


    Andrew Staley Guest

    Script DOS Command?

    I need to create a VBS script that runs this;

    regsvr32 "c:\program files\my prog\mydll.dll" /s

    Can anyone point me in the right direction, I've only ever been able to do
    simple scripts before that point to BAT files to do what I need, in this
    case though it wouldn't work so I actually need it in a VBS script that will
    execute from a GPO.

    Thanks in advance, Andrew.


      My System SpecsSystem Spec

  2.   


  3. #2


    Joe Fawcett Guest

    Re: Script DOS Command?



    "Andrew Staley" <noreply@xxxxxx> wrote in message
    news:FFCB14B6-2A19-4EDF-B8E3-DB25D47A8AD2@xxxxxx

    > I need to create a VBS script that runs this;
    >
    > regsvr32 "c:\program files\my prog\mydll.dll" /s
    >
    > Can anyone point me in the right direction, I've only ever been able to do
    > simple scripts before that point to BAT files to do what I need, in this
    > case though it wouldn't work so I actually need it in a VBS script that
    > will execute from a GPO.
    >
    > Thanks in advance, Andrew.
    Look at the WSH documentation for the Shell.Run method.
    http://msdn.microsoft.com/en-us/libr...ky(VS.85).aspx

    --

    Joe Fawcett (MVP - XML)
    http://joe.fawcett.name


      My System SpecsSystem Spec

  4. #3


    Andrew Staley Guest

    Re: Script DOS Command?

    Thank you for the reply, but the link makes very little sense to me. I know
    very little about VBS script, the only ones I've been able to get to work in
    the past have been ones where I've found examples in the net which I can
    easily modify.

    Can you give me an example of how this script should look?

    Thanks in advance, Andrew.

    "Joe Fawcett" <joefawcett@xxxxxx> wrote in message
    news:824A5D4C-AEEC-4150-92F8-AAFC1C2F980E@xxxxxx

    >
    >
    > "Andrew Staley" <noreply@xxxxxx> wrote in message
    > news:FFCB14B6-2A19-4EDF-B8E3-DB25D47A8AD2@xxxxxx

    >> I need to create a VBS script that runs this;
    >>
    >> regsvr32 "c:\program files\my prog\mydll.dll" /s
    >>
    >> Can anyone point me in the right direction, I've only ever been able to
    >> do simple scripts before that point to BAT files to do what I need, in
    >> this case though it wouldn't work so I actually need it in a VBS script
    >> that will execute from a GPO.
    >>
    >> Thanks in advance, Andrew.
    > Look at the WSH documentation for the Shell.Run method.
    > http://msdn.microsoft.com/en-us/libr...ky(VS.85).aspx
    >
    > --
    >
    > Joe Fawcett (MVP - XML)
    > http://joe.fawcett.name

      My System SpecsSystem Spec

  5. #4


    Todd Vargo Guest

    Re: Script DOS Command?

    Andrew Staley wrote:

    > I need to create a VBS script that runs this;
    >
    > regsvr32 "c:\program files\my prog\mydll.dll" /s
    >
    > Can anyone point me in the right direction, I've only ever been able to do
    > simple scripts before that point to BAT files to do what I need, in this
    > case though it wouldn't work so I actually need it in a VBS script that
    will

    > execute from a GPO.
    Set WshShell = WScript.CreateObject("WScript.Shell")
    cmd = "regsvr32 ""c:\program files\my prog\mydll.dll"" /s"
    WshShell.Run cmd, 1, true

    --
    Todd Vargo
    (Post questions to group only. Remove "z" to email personal messages)


      My System SpecsSystem Spec

  6. #5


    Joe Fawcett Guest

    Re: Script DOS Command?



    "Todd Vargo" <tlvargo@xxxxxx> wrote in message
    news:ORd$KKMvIHA.1328@xxxxxx

    > Andrew Staley wrote:

    >> I need to create a VBS script that runs this;
    >>
    >> regsvr32 "c:\program files\my prog\mydll.dll" /s
    >>
    >> Can anyone point me in the right direction, I've only ever been able to
    >> do
    >> simple scripts before that point to BAT files to do what I need, in this
    >> case though it wouldn't work so I actually need it in a VBS script that
    > will

    >> execute from a GPO.
    >
    > Set WshShell = WScript.CreateObject("WScript.Shell")
    > cmd = "regsvr32 ""c:\program files\my prog\mydll.dll"" /s"
    > WshShell.Run cmd, 1, true
    >
    > --
    > Todd Vargo
    > (Post questions to group only. Remove "z" to email personal messages)
    >
    What he said


    --

    Joe Fawcett (MVP - XML)
    http://joe.fawcett.name


      My System SpecsSystem Spec


Script DOS Command?
Similar Threads
Thread Forum
Export results of script with cmd command to csv PowerShell
Running a command from inside a script, command line is corrupted PowerShell
Determine if script was run from command prompt VB Script
problem in script with dsmod command PowerShell
Script from command-line PowerShell