Sign in to follow this  
Followers 0
unclefishy

why does this line error?

12 posts in this topic

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

:)

Share this post


Link to post
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!"

Share this post


Link to post
Share on other sites

I didn't realize that i could use shell exe... slick.

works like a champ!!

Thanks a bunch GEOsoft

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

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(). :)


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

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

Share this post


Link to post
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")

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

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

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

#10 ·  Posted

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

Share this post


Link to post
Share on other sites

#11 ·  Posted

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

:)


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

#12 ·  Posted

thanks for the explination... that helps me wrap my melon around it a little better! :)

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
Sign in to follow this  
Followers 0