Jump to content

Recommended Posts

Posted

RunWait('msiexec /qb- /i"' & @ScriptDir & '\wcp\wcp.msi"')

->not error

But!!!

RunWait('msiexec TRANSFORMS="\wcp\WCP.MST" TARGETDIR="%ProgramFiles%\Common Files\wcp" /qb- /i"' & @ScriptDir & '\wcp\wcp.msi"')

->error

Why???

RunWait(@COMSPEC & " /c " & @ScriptDir & '\wcp\wcp.msi TARGETDIR="%ProgramFiles%\Common Files\wcp" TRANSFORMS="\wcp\WCP.MST" /qb- ', "", @SW_HIDE)

@ScriptDir = 'c:\' -> not error

But!!!

@ScriptDir = 'C:\Documents and Settings\'

@ScriptDir = 'C:\Program Files'

->path error

Posted (edited)

RunWait('msiexec /qb- /i"' & @ScriptDir & '\wcp\wcp.msi"')

->not error

But!!!

RunWait('msiexec TRANSFORMS="\wcp\WCP.MST" TARGETDIR="%ProgramFiles%\Common Files\wcp" /qb- /i"' & @ScriptDir & '\wcp\wcp.msi"')

->error

Why???

RunWait(@COMSPEC & " /c " & @ScriptDir & '\wcp\wcp.msi TARGETDIR="%ProgramFiles%\Common Files\wcp" TRANSFORMS="\wcp\WCP.MST" /qb- ', "", @SW_HIDE)

@ScriptDir = 'c:\' -> not error

But!!!

@ScriptDir = 'C:\Documents and Settings\'

@ScriptDir = 'C:\Program Files'

->path error

@ScriptDir only refers to the folder that the script is in so any file you refer to with that macro must reside in, or be relative to, the same folder as your script.

Also you can not set @ScriptDir with @ScriptDir =

You could however use $Dir = 'C:\Documents and Settings\'

Better Yet (because of the spaces)

$Dir = '"C:\Documents and Settings\"'

EDIT: You could also use $Dir = FileGetShortName('C:\Documents and Settings\') but be forewarned... I have seen this fail, although not often.

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

Posted

RunWait('msiexec /qb- /i"' & @ScriptDir & '\wcp\wcp.msi"')

->not error

But!!!

RunWait('msiexec TRANSFORMS="\wcp\WCP.MST" TARGETDIR="%ProgramFiles%\Common Files\wcp" /qb- /i"' & @ScriptDir & '\wcp\wcp.msi"')

->error

Why???

RunWait(@COMSPEC & " /c " & @ScriptDir & '\wcp\wcp.msi TARGETDIR="%ProgramFiles%\Common Files\wcp" TRANSFORMS="\wcp\WCP.MST" /qb- ', "", @SW_HIDE)

@ScriptDir = 'c:\' -> not error

But!!!

@ScriptDir = 'C:\Documents and Settings\'

@ScriptDir = 'C:\Program Files'

->path error

A man/women/boy/girl of many words....

Posted (edited)

@ComSpec knows what %ProgramFiles% is but AutoIt does not unless you use Opt('ExpandEnvStrings', 1).

RunWait('msiexec TRANSFORMS="\wcp\WCP.MST" TARGETDIR="%ProgramFiles%\Common Files\wcp" /qb- /i"' & @ScriptDir & '\wcp\wcp.msi"')

->error

to

RunWait('msiexec TRANSFORMS="' & @ScriptDir & '\wcp\WCP.MST" TARGETDIR="' & @ProgramFilesDir & '\Common Files\wcp" /qb- /i "' & @ScriptDir & '\wcp\wcp.msi"')

:)

Edit:

Code change

Edited by MHz

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
  • Recently Browsing   0 members

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