Jump to content

Help needed for SQL XP_CMDSHELL


Recommended Posts

Posted

Guys,

 

I am trying to run an following .exe from sql query 

"C:\ABCD\EFG.exe" 1234

1234 is the parameter

When running above command using below SQL getting an error

SELECT      @CMDSQL='"C:\ABCD\EFG.exe"  '+ 1234

EXEC xp_cmdshell @CMDSQL

OUTPUT:

'"C:\ABCD\EFG.exe" 1234' is not recognized as an internal or external command,
operable program or batch file.

 

 

Any help plzzzzz

Posted

Bro, this could be due to the location of the file. 

Instead of "C:\ABCD\EFG.exe" try "ip address\drive$\app.exe"

Example: 10.34.12.35\C$\ABCD\EFG.exe

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...