Jump to content

why does this line error?


Recommended Posts

can somebody explain this why this errors?

it will compile fine, and the path is correct... but it chokes every time and my syntax seems to be correct.

Thanks

RunWait(@COMSPEC & " /c Start ", "C:\ntst-tmp\visio-test1\VISPRO.msi")

:)

Link to comment
Share on other sites

can somebody explain this why this errors?

it will compile fine, and the path is correct... but it chokes every time and my syntax seems to be correct.

Thanks

RunWait(@COMSPEC & " /c Start ", "C:\ntst-tmp\visio-test1\VISPRO.msi")

:)

Try
ShellExecuteWait("C:\ntst-tmp\visio-test1\VISPRO.msi")

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Try it....

RunWait(@COMSPEC & " /c Start "C:\ntst-tmp\visio-test1\VISPRO.msi", @ScriptDir)
I'm pretty sure that won't work either. An msi file is not an executable.

To use Run it would have to be

Run(@SystemDir & "\msiexec.exe /i C:\ntst-tmp\visio-test1\VISPRO.msi")

There is no need to use @Comspec in there either

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

  • Developers

I'm pretty sure that won't work either. An msi file is not an executable.

To use Run it would have to be

That will work since start.exe acts the same as ShellExecute(). :)

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

That will work since start.exe acts the same as ShellExecute(). :)

Ahhhhh yes!! Another momentary lapse.

I still find that in most instances ShellExecute is the way to go and I reserve @Comspec for those instances where I want to run native commands that would normally be used in a command window.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

it seems however when i use the shellexecute command that it breaks the winwaitactive command right after it... where when i launch with the following it seems to launch and understand the winwaitactive command, and thus can proceed to 'send'

RunWait(@COMSPEC & " /c Start C:\ntst-tmp\visio-test1\VISPRO.msi")
Link to comment
Share on other sites

  • Developers

it seems however when i use the shellexecute command that it breaks the winwaitactive command right after it... where when i launch with the following it seems to launch and understand the winwaitactive command, and thus can proceed to 'send'

RunWait(@COMSPEC & " /c Start C:\ntst-tmp\visio-test1\VISPRO.msi")
You should use ShellExecute() in stead of ShellExecuteWait() since you want it to launch the program and continue the script . Edited by JdeB

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

  • Developers

really?

so instead of using

ShellExecuteWait("C:\ntst-tmp\visio-test1\VISPRO.msi")

i should change it to just

ShellExecute("C:\ntst-tmp\visio-test1\VISPRO.msi")
The last line works because Runwait Shells Start which shells MSIEXEC and then returns.

So effectively it acts as Run()

shellexecutewait() doesn;t break your WinWaitActive() command, but your script stops until the MSIEXEC is finished.

Try ShellExecute() .

:)

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...