Hi,
Recently i found myself needing to launch a perl script before my cmd to set environment variables. For the environment variables set in my perl script to be seen in my shell i had to launch the shell from the script.
It work very well when i double click the script in the explorer.
It also works perfectly with PowerShell (i add a toolbar shortcut that just launch the pl script)
My problem is with Console. I kind of managed to get it working with this command in the shell preference:
cmd /k "perl script.pl"
At first it appears to be running fine, but in fact it is not. If do ctrl+c strange things start to happen. Typing a command and pressing enter just doesnt do the command, and a lot of other glitches like that.
Does anyone sees a better way to do it? Is it a bug, or just something console cant do?
Thanks
Martin
Martin,
what's your Windows version? 32 or 64 bits? What's your Console version? Which perl do you use? Could you please attach your console.xml? And script.pl?
Initial thoughts: unless script.pl starts another instance of cmd, I don't think your environment, set up by the script, will stick. It's strange to use perl script to just set up the environment. Do you think you can set up variables via batch file?
--
Kirill.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
OK so i am under win7 64bit. Console version2.00.145. Active Perl 5.10
I cant send you the xml because now i do it differently. Because it wasnt working i now do cmd /k "setupEnv.bat"
The bat file call the perl script inside and so create all the environment variables.
Now you say it s strange to use a perl script. In fact i have no other choice. I need to parse files, do regex and a whole lot of other things to set my env. ANd i just cant do all that in bat.
I think there is still a problem if you try to create a tab by launching directly a perl script. But as i do here it works if you do it through a bat file (which do something like "call perl %directory%\perl\setupEnv.pl %* -dir=%directory%").
Anyway thanks a lot for answering, i hope you know how many people use console everyday!
Last edit: Anonymous 2015-03-21