Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista Tutorial - Script DOS Command?

Reply
 
Old 05-23-2008   #1 (permalink)
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
Old 05-23-2008   #2 (permalink)
Joe Fawcett
Guest


 
 

Re: Script DOS Command?



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

> 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
Old 05-23-2008   #3 (permalink)
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
Quote:

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

>> 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
Old 05-23-2008   #4 (permalink)
Todd Vargo
Guest


 
 

Re: Script DOS Command?

Andrew Staley wrote:
Quote:

> 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
Quote:

> 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
Old 05-24-2008   #5 (permalink)
Joe Fawcett
Guest


 
 

Re: Script DOS Command?



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

> Andrew Staley wrote:
Quote:

>> 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
Quote:

>> 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
Reply

Thread Tools


Similar Threads
Thread Forum
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
Escape comma in dos command from PS script PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46