Can the batch version of the script know if it is being called from PowerShell?
Is there a way the batch script can know if it was called from PowerShell (no additional parameters)?
You need something like ..
if (%THIS_BATCH_CALLED_FROM_POWERSHELL%)
... warn the user or drop back to powershell to execute the proper instructions...
The question is related to this question - virtualenv-in-powershell .
+2
source to share
3 answers
In my Powershell environment (PS 2.0 CTP) I seem to have a PSMODULEPATH environment variable that is not set by the normal command line environment but still exists when Powershell has a CMD.exe child shell.
I think you might be able to "reliably enough" check for PSMODULEPATH in your script package.
0
source to share