Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Optimize the output of pscmd
#4
thank you for your reply

I used the above code to test that pscmd3 cannot call jint.dll


Macro PSrunjs
Code:
Copy      Help
str s
_s=
;function Invoke-JSAdd ($a, $b) {
;;;;;Add-Type –Path  "C:\Jint.dll"
;;;;;;;;;;;;;;
;;;;;$JavaScript = "
;;;;;;;;;function add(a, b) {
;;;;;;;;;;;;;return a + b;
;;;;;;;;;}
;;;;;"
;;;;;$add = (New-Object Jint.Engine).
;;;;;;;;;;;;;Execute($JavaScript).
;;;;;;;;;;;;;GetValue("add")
;;;;;;;;;;;;;;
;;;;;$add.Invoke($a, $b).ToString()
;}
;
;Invoke-JSAdd 5 6
PsCmd _s "-Version 5.0" s ;;success  But there are extra characters
;PsCmd3 _s "" s ;;failure
;PsCmd3 _s "-Version 2.0" s ;;failure
;PsCmd3 _s "-Version 5.0" s ;;failure
mes s


Attached Files
.zip   Jint.zip (Size: 96.91 KB / Downloads: 458)


Messages In This Thread
Optimize the output of pscmd - by win - 05-05-2019, 11:48 PM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 03:43 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 04:44 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 04:57 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 06:15 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 07:21 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 07:35 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 07:41 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 07:55 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 08:05 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 08:12 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 08:15 AM
RE: Optimize the output of pscmd - by Gintaras - 05-06-2019, 08:26 AM
RE: Optimize the output of pscmd - by win - 05-06-2019, 09:02 AM
RE: Optimize the output of pscmd - by win - 05-07-2019, 11:48 PM
RE: Optimize the output of pscmd - by win - 05-08-2019, 03:54 AM
RE: Optimize the output of pscmd - by Gintaras - 05-08-2019, 04:25 AM
RE: Optimize the output of pscmd - by win - 05-08-2019, 05:42 AM
RE: Optimize the output of pscmd - by win - 05-08-2019, 09:37 AM
RE: Optimize the output of pscmd - by win - 05-08-2019, 12:51 PM
RE: Optimize the output of pscmd - by Gintaras - 05-08-2019, 01:05 PM
RE: Optimize the output of pscmd - by win - 05-08-2019, 01:17 PM
RE: Optimize the output of pscmd - by Kevin - 05-09-2019, 01:19 AM
RE: Optimize the output of pscmd - by win - 05-09-2019, 01:36 AM
RE: Optimize the output of pscmd - by Kevin - 05-09-2019, 01:40 AM
RE: Optimize the output of pscmd - by win - 05-09-2019, 01:43 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)