Call Powershell from VBA
Problem solved. It was Bitdefender Total Security 2018 that prevented Powershell to start:Application powershell.exe has been detected as potentially malicious and blocked. Application path:...
View ArticleCall Powershell from VBA
I tested it on another Windows 10 PC, and it worked. So it must be o problem on my production PC. I will accept the last answer as "Mark as answer". Thanks for everybodies effeort.
View ArticleCall Powershell from VBA
ProcMon shows:Command line:C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -noexitProcess Exit shows: Exit Status: -1073741790
View ArticleCall Powershell from VBA
Yes Windows 10 64 bit running Office 365 32 bit.Windows 10 Pro, Version 1709, OS Build 16299.248Office 365 Excel Version 1801(Build 9001.2171
View ArticleCall Powershell from VBA
Result from test:Run-time error 6 - Overflowon statement: errorCode = wsh.Run(psCmd, windowStyle, waitOnReturn)
View ArticleCall Powershell from VBA
Try this.Sub Test() Dim psCmd As String Dim wsh As Object Dim waitOnReturn As Boolean Dim windowStyle As Integer Dim errorCode As Integer waitOnReturn = False Set wsh = CreateObject("WScript.Shell")...
View ArticleCall Powershell from VBA
For now I just want to se Powershell being started fra VBA without exiting.The command I want to execute in VBA: sCommand = "Powershell -executionpolicy bypass -noexit" Debug.Print sCommand Pid =...
View ArticleCall Powershell from VBA
I want an VBA solution. I am just documenting that -noexit works in VBS but not in VBA.If Powershel is called from VBA ProcMon document that it starts but stops imidiatly, and the window do not stay...
View ArticleCall Powershell from VBA
This is a VBA forum so I thought you wanted a VBA solution. I just saw you want a VBS solution. You want this forum.
View ArticleCall Powershell from VBA
Did not work. More info:PowerShell -noexit problemWhen I run this vbs file: option explicitdim objShell Wscript.Echo "Starting"Set objShell = CreateObject("Wscript.shell")objShell.run("powershell...
View ArticleCall Powershell from VBA
Try this.Sub Test() Dim retval As Variant Dim psCmd As String psCmd = "Powershell -noprofile -ExecutionPolicy RemoteSigned &'C:\temp\copy.ps1'" Debug.Print psCmd retval = Shell(psCmd,...
View ArticleCall Powershell from VBA
Hello Janand305,This forum(Excel for Developers) is for development issues related to Excel Object Model and I think your issue is more related to VBA, so I would move the thread to Visual Basic for...
View ArticleCall Powershell from VBA
HiI tried your Ed Wilsons script in vbscript:option explicitdim objShell Wscript.Echo "Starting"Set objShell = CreateObject("Wscript.shell")objShell.run("powershell -executionpolicy bypass -noexit...
View Article
More Pages to Explore .....