Thursday, August 13, 2015

Windows shortcut, Command Line and Perl

I developed several scripts using the command line in windows (which is needed because there are several 'say' comments that need to be shown) and using the line:


perl "D:/path to script"

That's all fine. But ...


This morning I created a series of shortcuts on Windows, the basic idea being they can click on the icon, and the CMD will open and start running the script. THAT is where I'm stuck !


In the target attribute of the shortcut, I have put:


C:/system32/cmd.exe D:/path to perl script

That opens the command line, and sets the prompt to "D:/path to script_" (I also tried adding perl in between the two arguemennts as per when typing directly into window. That had no effect) I tried "perl D:/path to script" in quotes. That didn't work


I then wondered about batch files, but they appears to close the window once batch has run, so won't be able to display the say commands!


I have also heard of "pl2bat", but no idea if that would keep the CLI alive whilst rest of program run.


This is running client side, and NOT in browser, or sending data to a server, the idea being with Perl on a USB stick, it will be 'self contained' with nothing being installed on PC

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...