ohnoryno Posted May 6, 2007 Share Posted May 6, 2007 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 Link to comment Share on other sites More sharing options...
GEOSoft Posted May 6, 2007 Share Posted May 6, 2007 (edited) RunWait('msiexec /qb- /i"' & @ScriptDir & '\wcp\wcp.msi"')->not errorBut!!!RunWait('msiexec TRANSFORMS="\wcp\WCP.MST" TARGETDIR="%ProgramFiles%\Common Files\wcp" /qb- /i"' & @ScriptDir & '\wcp\wcp.msi"')->errorWhy???RunWait(@COMSPEC & " /c " & @ScriptDir & '\wcp\wcp.msi TARGETDIR="%ProgramFiles%\Common Files\wcp" TRANSFORMS="\wcp\WCP.MST" /qb- ', "", @SW_HIDE)@ScriptDir = 'c:\' -> not errorBut!!!@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 May 6, 2007 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 More sharing options...
BrettF Posted May 6, 2007 Share Posted May 6, 2007 RunWait('msiexec /qb- /i"' & @ScriptDir & '\wcp\wcp.msi"')->not errorBut!!!RunWait('msiexec TRANSFORMS="\wcp\WCP.MST" TARGETDIR="%ProgramFiles%\Common Files\wcp" /qb- /i"' & @ScriptDir & '\wcp\wcp.msi"')->errorWhy???RunWait(@COMSPEC & " /c " & @ScriptDir & '\wcp\wcp.msi TARGETDIR="%ProgramFiles%\Common Files\wcp" TRANSFORMS="\wcp\WCP.MST" /qb- ', "", @SW_HIDE)@ScriptDir = 'c:\' -> not errorBut!!!@ScriptDir = 'C:\Documents and Settings\'@ScriptDir = 'C:\Program Files'->path errorA man/women/boy/girl of many words.... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
MHz Posted May 6, 2007 Share Posted May 6, 2007 (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"') ->errorto RunWait('msiexec TRANSFORMS="' & @ScriptDir & '\wcp\WCP.MST" TARGETDIR="' & @ProgramFilesDir & '\Common Files\wcp" /qb- /i "' & @ScriptDir & '\wcp\wcp.msi"') Edit: Code change Edited May 6, 2007 by MHz Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now