1

I am trying to launch spotfire application from VBA like following

Dim retval As Double
retval = Shell("Path\Spotfire.Dxp.exe", vbNormalFocus)

It works. It launches spotfire with the default servername,username and password

But I want to launch the application by giving the servername, username and password as parameters in the script. How do I do it?

I tried this

retval = Shell("Path\Spotfire.Dxp.exe -s http://spotfire.abcd.com -u ABCD\A7 -p ABC", vbNormalFocus)

But it launched the application with default parameters and gives error at the end "Unable to load file. Could not find the specified file : -s"

Please suggest the possible solution.

braX
  • 11,506
  • 5
  • 20
  • 33
Jay
  • 339
  • 1
  • 7
  • 23
  • Possible duplicate of [How do you run a .exe with parameters using vba's shell()?](https://stackoverflow.com/questions/20917355/how-do-you-run-a-exe-with-parameters-using-vbas-shell) – niko Feb 14 '18 at 19:53
  • I don't think so. I read the possible solution thoroughly but I do not think that can be an answer. – Jay Feb 14 '18 at 20:26
  • are you able to run this from the command line without any issues? – niko Feb 14 '18 at 20:27
  • partially yes. It launches spotfire application. But it launches it with the default servername, username and password and not the one which I provided through command line and gives error in message box at the end "Unable to load file. Could not find the specified file : -s" – Jay Feb 14 '18 at 20:33

1 Answers1

1

after checking our support db, I found a few references to / notation instead of -. so the following command should work:

c:\path\Spotfire.Dxp.exe /server:http://localhost:8080/ /username:user /password:pass

niko
  • 3,946
  • 12
  • 26