web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate Unable ...
Power Automate
Suggested Answer

Power Automate Unable to run VBscript

(0) ShareShare
ReportReport
Posted on by 4

Hi All,

 

I have been using power automate desktop flow for many months now to run a SAP VBscript, but past few days the automate flow is unable to run any VBscript.

 

The error thrown is "CScript Error: Execution of the Windows Script Host failed. (Inappropriate authentication. )".

 

Please provide your suggestions on how we can resolve this.

script error.jpg
I have the same question (0)
  • stampcoin Profile Picture
    5,146 Super User 2026 Season 1 on at
    What type account do you use for the flow ?
    Do you think the password expired /changed ?
     
  • Suggested answer
    VishnuReddy1997 Profile Picture
    2,656 Super User 2026 Season 1 on at
     
    Can check the SAP GUI Scripting whether it is disabled or enabled . Also confirm with your BASIS/IT team whether SAP GUI scripting is disabled at server level (RZ11 parameter: sapgui/user_scripting should be TRUE).
     
    Regards,
    Vishnu Reddy
  • Foxtail Profile Picture
    4 on at
    @VishnuReddy1997 If we run the same VB script from SAP scripting and playback option menu, it is able to playback the script without any hinderance. But if i run the same script in my desktop flow its does not do anything in the SAP.
  • Suggested answer
    Riyaz_riz11 Profile Picture
    4,048 Super User 2026 Season 1 on at
    Hi,
     

    1. Check Windows Script Host Registry Settings


    • Press Win + R, type regedit, and press Enter

    • Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Script Host\Settings

    • Look for a value named Enabled

    • If it exists and is set to 0, change it to 1

    • If the key doesn't exist, create a new DWORD value named Enabled and set it to 1


    •  

    2. Verify Group Policy Settings

     
    • Press Win + R, type gpedit.msc, and press Enter

    • Navigate to: Computer Configuration > Administrative Templates > Windows Components > Windows Script Host

    • Ensure "Turn off Windows Script Host" is set to "Not Configured" or "Disabled"


    •  

    3. Run Command Prompt as Administrator


    • Open Command Prompt as Administrator

    • Run: regsvr32 wshom.ocx

    • Run: regsvr32 scrrun.dll

    • Run: regsvr32 vbscript.dll

    •  

    Power Automate Desktop Specific Solutions

    4. Update Script Execution Method
    In your Power Automate Desktop flow:


    • Instead of using "Run VBScript" action, try using "Run DOS Command" action

    • Use command: cscript.exe "C:\path\to\your\script.vbs"

    • Ensure the script path is accessible and permissions are correct


    •  

    5. Alternative Script Execution


    • Use "Run PowerShell Script" action instead

    • Convert your VBScript logic to PowerShell, or

    • Call your VBScript from PowerShell using: cscript.exe "path\to\script.vbs"


    •  

    6. Check Power Automate Desktop Service


    • Open Services (services.msc)

    • Find "Power Automate Desktop Service"

    • Restart the service

    • Ensure it's running under appropriate credentials


    •  

    Security and Authentication Fixes

    7. Run Power Automate Desktop as Administrator


    • Right-click on Power Automate Desktop

    • Select "Run as administrator"

    • Test your flow again


    •  

    8. Check Windows Defender/Antivirus


    • Temporarily disable real-time protection

    • Test if the script runs

    • If it works, add Power Automate Desktop and your script location to antivirus exclusions


    •  

    9. User Account Control (UAC)


    • Temporarily lower UAC settings

    • Test the flow

    • If it works, you may need to modify your script or flow to handle UAC properly


    •  

    Advanced Solutions

    10. Recreate the Script Action


    • Delete the existing VBScript action in your flow

    • Add a new "Run VBScript" action

    • Copy your script content again

    • Test the flow


    •  

    11. Check Script Content


    • Ensure your VBScript doesn't contain any new authentication-related code

    • Remove any references to network resources or external authentication

    • Test with a simple script first: MsgBox "Hello World"


    •  

    12. Windows Updates


    • Check if recent Windows updates caused this issue

    • Consider rolling back recent security updates if they coincide with when the problem started


    •  

    Testing Steps


    1. First, test if CScript works outside Power Automate:

      • Open Command Prompt

      • Run: cscript.exe //NoLogo "C:\path\to\your\script.vbs"

      •  

    2. If CScript works manually but not in Power Automate, the issue is with Power Automate Desktop permissions or configuration.
     
    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Riyaz

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard