Script DOS Command?


  1.    23 May 2008 #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.    23 May 2008 #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

  3.    23 May 2008 #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

  4.    23 May 2008 #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

  5.    24 May 2008 #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
Helo forum, I have problem with export results of powershell script to csv file. I have script to set directories quota. Script is using cmd...
PowerShell
Running a command from inside a script, command line is corrupted
Hello, I am trying to give Powershell a chance, since it seems like it may have some promise. I have this powershell script that needs to run...
PowerShell
Determine if script was run from command prompt
How can I determine in my VBScipt whether the script was run from the command prompt or from double clicking in Windows Explorer? I want to pause...
VB Script
My command works in the PS prompt but not in a script (.ps1) / reg
Hi, If I define these variables in the prompt: $var1 = "some" $var2 = "thing" .... and then run the command: Get-QADUser -SearchRoot...
PowerShell
problem in script with dsmod command
Hi, below I have written a script, with help from others, where I create users in my domain. I've run into a problem when my script gets to the...
PowerShell
Script from command-line
Ok... I feel as if this worked for me before. From Cmd.exe: powershell "c:\test test\test.ps1" doesn't work. It tells me it doesn't know...
PowerShell
Escape comma in dos command from PS script
I'm trying to execute a sql BCP call from within a Powershell script and am running into a problem. The line of code looks like: bcp "SELECT *...
PowerShell

Our Sites
  • Ten Forums
  • Eight Forums
  • Seven Forums
  • Help Me Bake
  • Site Links
  • Contact Us
  • Privacy and Cookies
  • About Us
    Windows Vista Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

    Designer Media Ltd
    All times are GMT -5. The time now is 21:02.
    .