• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Script DOS Command?

A

Andrew Staley

#1
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 Computer

J

Joe Fawcett

#2
"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/library/d5fk67ky(VS.85).aspx

--

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

My Computer

A

Andrew Staley

#3
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/library/d5fk67ky(VS.85).aspx
>
> --
>
> Joe Fawcett (MVP - XML)
> http://joe.fawcett.name
 

My Computer

T

Todd Vargo

#4
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 Computer

J

Joe Fawcett

#5
"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 Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)