Register DLL on the tentacle

Hello,

I am trying to register a dll file on the tentacle but it seems that Octopus is stuck at some point.
Here is my code :

net use \RemoteIp\C$\Dev ‘pass’/USER:'user’
net use \LocalIp\D$ ‘pass’/USER:‘user’

copy-item “\LocalIp\D$\test.dll” -Destination “\RemoteIp\c$\Dev”;
regsvr32 “\RemoteIp\C$\Dev\test.dll”;

From what I see in the log file it seems that the command has been executed successfully but it is stuck at some point and I can’t figure it out where.

Here is also the log file :
| Running: Windows 2008 R2
16:04:12 Verbose | Octopus Server version: 3.3.14+Branch.master.Sha.94cbad9d1e5d9a9515a90f390455374b9fbe30f8
16:04:12 Info | Executing script on 'Windows 2008 R2’
16:04:13 Verbose | Octopus Deploy: Calamari version 3.3.13+Branch.master.Sha.821b4ffaf94e26f64cd9c14be2f3969587822fad
16:04:14 Verbose | Name Value
16:04:14 Verbose | ---- -----
16:04:14 Verbose | CLRVersion 2.0.50727.5448
16:04:14 Verbose | BuildVersion 6.1.7601.17514
16:04:14 Verbose | PSVersion 2.0
16:04:14 Verbose | WSManStackVersion 2.0
16:04:14 Verbose | PSCompatibleVersions {1.0, 2.0}
16:04:14 Verbose | SerializationVersion 1.1.0.1
16:04:14 Verbose | PSRemotingProtocolVersion 2.1
16:04:14 Info | The command completed successfully.
16:04:21 Info | The command completed successfully.

Thank you

Hi @sebi,

Thanks for reaching out.

  • Does the command work when you run it locally on the VM?

  • Usually when Octopus appears to freeze during a PS script, what is actually going on in the background is that the console is asking the user for input (like when you run a command that needs a password after you hit [enter]). Does any of those commands need a password or any kind of input like that?

  • You might wanna add a “Write-host” line before each one of those 4 lines to help you figure out where in the script is Octopus “getting stuck”

Best regards,
Dalmiro

Hello,

Yes, the command works fine when is executed from the remote machine, or from my local machine. I don’t know why it gets stuck.
Actually I found a work-around for this, I have made a cmd file that registers the DLL where I copy the file and after the copy I just execute that cmd file and it works properly.

Thank you for your prompt response !

Glad to hear you found a workaround :slight_smile:

Cheers