Rene564489

The following code works as an exe if I double click but as a shell command, it doesn't. What am I doing wrong
I am using this to register my dll.


Sub main
Dim myReg As RegistryKey = Registry.LocalMachine
Dim MyRegKey As RegistryKey
Dim retval As Boolean
Dim MyVal As String

MyRegKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\.NETFramework", True)


MyVal = MyRegKey.GetValue("InstallRoot")
MyVal = MyVal + "v2.0.50727\\regasm.exe myproduct.dll /codebase"
retval = Shell(MyVal, 1)

End sub


Re: Visual Basic General Regasm in Custom Action???

Bruno Yu - MSFT

Rebe,

Could you please provide your error message when you run the exe file






Re: Visual Basic General Regasm in Custom Action???

Bruno Yu - MSFT

Rene,

Since the application with the code snippet works well as an exe file, I recommend you to pay more attention to the file path when you try to run the application in the shell command that launches executable programs from Visual Studio. A full path is required if the specified file is not in one of the directories in the PATH environment variable.

Please take a look at the information on shell command and change properly on your file path:

Shell Command: http://msdn2.microsoft.com/en-us/library/0xca6kdd(vs.71).aspx