最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

windows - Why I cant start Remote Assistance (msra.exe) via vba "shell" since Win 11Office 365 update? - Stack

programmeradmin1浏览0评论

This is the code I use (from ms-access):

Dim commandLine As String
commandLine = "msra.exe /offerRA " & par_terminalId
Call Shell(commandLine, vbNormalFocus)

If I c&p the content of "command line" (e.g. "msra.exe /offerRA TFQ8") into cmd it works. If I try it with the above code in vba the result is:

Err.Number: 5
err.descrition: "Invalid procedure call or argument"

So what has changed? Until our Win 11/Office 365 update the same code worked fine.

This is the code I use (from ms-access):

Dim commandLine As String
commandLine = "msra.exe /offerRA " & par_terminalId
Call Shell(commandLine, vbNormalFocus)

If I c&p the content of "command line" (e.g. "msra.exe /offerRA TFQ8") into cmd it works. If I try it with the above code in vba the result is:

Err.Number: 5
err.descrition: "Invalid procedure call or argument"

So what has changed? Until our Win 11/Office 365 update the same code worked fine.

Share Improve this question asked Jan 20 at 12:45 Gener4torGener4tor 3883 gold badges13 silver badges47 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

With:

  Dim wsh As Object
  Set wsh = CreateObject("WScript.Shell")
  Call wsh.Run(commandLine)

it works fine. The problem seems to be with the shell-command specificly.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论