Jump to content

Runwait with @ComSpec

Recommended Posts


I am trying to get a code for downloading patches and facing some alignment issues with the below RUNWAIT.

If I am checking the command using MsgBox it shows the correct path but I think I am not aligning it correctly in the Runwait.

Can someone help here please?


RunWait(@ComSpec & " /c " & "DISM.exe /Online /Add-Package /PackagePath:" & $FLDR & "\" & $KB & ".cab", "", @SW_SHOW)

MsgBox(0, '', "DISM.exe /Online /Add-Package /PackagePath:" & $FLDR & "\" & $KB & ".cab /quiet")


Share this post

Link to post
Share on other sites

Something like this maybe?

RunWait(@ComSpec & ' /c DISM.exe /Online /Add-Package /PackagePath:"' & $FLDR & '\' & $KB & '.cab"', "", @SW_SHOW)

else try changing the /C to /K so the cmd window stays open and you can see any error.

Have you tested with the formed commandline in a CMD.exe manually?


Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
Live for the present,
Dream of the future,
Learn from the past.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now