Hi, 

I need vbs to Launch cmd and change directory to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

type Regasm c:\temp\BARB2.EdxWebServiceClient.dll /tlb BARB2.EdxWebServiceClient.tlb /codebase

 

 

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0

Try this

Option Explicit
Dim wshShell
On Error Resume Next
   Set wshShell = WScript.CreateObject("WSCript.shell")
   If Err.Number <> 0 Then
      Wscript.Quit
   End If
   wshShell.Run "cmd.exe /C cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 & Regasm c:\temp\BARB2.EdxWebServiceClient.dll /tlb BARB2.EdxWebServiceClient.tlb /codebase"
On Error Goto 0
 
 
Answered 03/20/2013 by: jdornan
Red Belt

Please log in to comment
0

Registering a DLL located in 'C:\TEMP' ranks right up there in the pantheon of Really Bad Ideas!

And does *nobody* know how to use Google? Jeeeeez...

Answered 03/21/2013 by: VBScab
Red Belt

Please log in to comment
0

Aside from the location of the DLL specified (I hope it was just filler for the real path), is there any specific reason that the script has to change the directory before executing the command?  Why not simply run the command with the full path like this:

 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Regasm.exe c:\temp\BARB2.EdxWebServiceClient.dll /tlb BARB2.EdxWebServiceClient.tlb /codebase
Answered 03/21/2013 by: M P
Purple Belt

Please log in to comment
Answer this question or Comment on this question for clarity