What is wrong with this command line?

trunxson

New member
Local time
1:27 AM
Messages
20
Help please I am pulling my hair out.

I use a desktop shortcut to run an application called get_iplayer.cmd located in the directory c:\program files\get_iplayer

The line in the Target of the shortcut properties therefore reads:

C:\Windows\System32\cmd.exe /k "c:\program files\get_iplayer\get_iplayer.cmd"

When the shortcut is run (as administrator) the following lines are returned:

'c:\program' is not a recognized internal or external command, operable program or batch file
c:\windows\system32>


However if I repeat the command again by running cmd and use CD to get to manually change directories the program runs as expected.

What is going wrong?
 

My Computer My Computer

At a glance

Windows7 32bit
OS
Windows7 32bit

My Computer My Computer

At a glance

Windows 7 32 bitAMD 5200+ dual core2 GBNVidia GeForce 6150SE 128 MB
Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
Try:
C:\Windows\System32\cmd.exe /k ""c:\program files\get_iplayer\get_iplayer.cmd""
 

My Computer My Computer

At a glance

Microsoft Windows 7 Home Premium 64-bits 7601...Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz4,00 GBATI Mobility Radeon HD 5400 Series
Computer type
Laptop
Computer Manufacturer/Model Number
ACER ASPIRE 5742G
OS
Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
CPU
Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz
Motherboard
Acer Aspire 5742G
Memory
4,00 GB
Graphics Card(s)
ATI Mobility Radeon HD 5400 Series
Sound Card
(1) AMD High Definition Audio Device (2) Realtek High Defi
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
WDC WD5000BEVT-22ZAT0
Sorry but I just get a label syntax error with the double ""
 

My Computer My Computer

At a glance

Windows7 32bit
OS
Windows7 32bit
actually i was wrong i now get

' "c:\program files\get_iplayer\get_iplayer.cmd' " is not recognised as an internal or external command ...blaa.. blaa..
 

My Computer My Computer

At a glance

Windows7 32bit
OS
Windows7 32bit
How about let the shell do it? Right click in the folder where the .cmd file is, New Shortcut, choose the .cmd file as target. Then if it works you should be able to drag the shortcut to the desktop or wherever and have it still function.

Edit: Or do it another way. Right click your shortcut on the desktop and click Properties. Fill in the "Start in:" field with the folder where the .cmd file is. Since program files has a space you may need to wrap it in double quotes. But this method should be more reliable.
 

My Computer My Computer

At a glance

Windows 7 32 bitAMD 5200+ dual core2 GBNVidia GeForce 6150SE 128 MB
Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
Use the environment variable, ProgramFiles

C:\Windows\System32\cmd.exe /k %ProgramFiles%\get_iplayer\get_iplayer.cmd
 

My Computer My Computer

At a glance

x64 (6.3.9600) Win8.1 Pro & soon dual boot x6...AMD A6-3420M APU with Radeon(tm) HD Graphics6.00 GBAMD Radeon(TM) HD 6520G
Computer type
Laptop
Computer Manufacturer/Model Number
HP Pavilion dv6-6c10us
OS
x64 (6.3.9600) Win8.1 Pro & soon dual boot x64 (6.1.7601) Win7_SP1 HomePrem
CPU
AMD A6-3420M APU with Radeon(tm) HD Graphics
Motherboard
Hewlett-Packard 1805
Memory
6.00 GB
Graphics Card(s)
AMD Radeon(TM) HD 6520G
Sound Card
(1) AMD High Definition Audio Device (2) IDT High Definiti
Monitor(s) Displays
HP W2072a 20" LCD (1600 x 900) @ 60 Hz
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
ST640LM0 00 HM641JI SATA Disk Device
Keyboard
Logitech k520 wireless KB
Mouse
Logitech m320 wireless mouse (bundled with KB)
Internet Speed
15/5 | 54 MB Wireless 'n'
Antivirus
Realtime: Defender or Avast | On-demand: Malwarebytes, ESET
Browser
IE 11 on Win8, IE 10 on win 7
Other Info
Media: [Gimp, Audacity, VLC] || Comm: [WEmail 2012, Skype] || Productivity: [OpenOffice,| Textpad] || Utils: [Sysinternals, cCleaner, Speccy, Defraggler]
Back
Top