Jump to content

Runwait with @ComSpec


DigDeep
 Share

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")

 

Link to comment
Share on other sites

  • Developers

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?

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...