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   [ - ] Hide Comments


Please log in to comment

Answer this question or Comment on this question for clarity



Try this

Option Explicit
Dim wshShell
On Error Resume Next
   Set wshShell = WScript.CreateObject("WSCript.shell")
   If Err.Number <> 0 Then
   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

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

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