sahra Posted February 2, 2010 Share Posted February 2, 2010 i have to open the install.log when i silented the uninstallso i try to do this:$file = FileOpen("INSTALL.LOG", 0)$line = FileRead($file)Run($line, 'UNWISE.exe /S')It does nothing Link to comment Share on other sites More sharing options...
iamtheky Posted February 2, 2010 Share Posted February 2, 2010 (edited) **assuming this is an auoit script**there is no need for capturing the contents of the install.log:Run('UNWISE.exe /S "%fullpath%\install.log"')If it is not currently on the box just do a fileinstall ("install.log" , "%destination_path%" , 1)and then use the destination path as the argument for WISE. Edited February 2, 2010 by iamtheky Link to comment Share on other sites More sharing options...
sahra Posted February 3, 2010 Author Share Posted February 3, 2010 (edited) Thanks you very matchjust one question, i write this:Run(@ProgramFilesDir & '\MyAshampoo\UNWISE.exe /S "C:\Program Files\MyAshampoo\install.log"')now i want to set that C:\Program Files\MyAshampoo\install.log will be @ProgramFilesDir\MyAshampoo\install.log or @HomeDrive\Program Files\MyAshampoo\install.logIs that possible? Edited February 3, 2010 by sahra Link to comment Share on other sites More sharing options...
iamtheky Posted February 3, 2010 Share Posted February 3, 2010 If you are just asking if you can set a variable to the log path that should work:$log = @ProgramFilesDir\MyAshampoo\install.logRun(@ProgramFilesDir & '\MyAshampoo\UNWISE.exe /S "$log"') Link to comment Share on other sites More sharing options...
sahra Posted February 3, 2010 Author Share Posted February 3, 2010 (edited) If you are just asking if you can set a variable to the log path that should work:$log = @ProgramFilesDir\MyAshampoo\install.logRun(@ProgramFilesDir & '\MyAshampoo\UNWISE.exe /S "$log"')no its not working Because quotesthe $log color is gray - $log and its need to be Bordeaux - $log Edited February 3, 2010 by sahra Link to comment Share on other sites More sharing options...
iamtheky Posted February 3, 2010 Share Posted February 3, 2010 maybe$log = @ProgramFilesDir\MyAshampoo\install.logRun(@ProgramFilesDir & '\MyAshampoo\UNWISE.exe /S ' & $log)theres a space after the /S Link to comment Share on other sites More sharing options...
sahra Posted February 3, 2010 Author Share Posted February 3, 2010 maybe$log = @ProgramFilesDir\MyAshampoo\install.logRun(@ProgramFilesDir & '\MyAshampoo\UNWISE.exe /S ' & $log)theres a space after the /Sstill don't work:$log = @ProgramFilesDir & '\MyAshampoo\install.log'Run(@ProgramFilesDir & '\MyAshampoo\UNWISE.exe /S ' & $log)it say could find install.log Link to comment Share on other sites More sharing options...
iamtheky Posted February 3, 2010 Share Posted February 3, 2010 what does it tell you when you run the command explicitly.this test shows the command looks ok, so unless the run command has a limitation that msgbox does not, it should be fine.$log = @ProgramFilesDir & '\MyAshampoo\install.log'msgbox (64,"test", @ProgramFilesDir & '\MyAshampoo\UNWISE.exe /S ' & $log, 10)Is the install.log already in that folder... Link to comment Share on other sites More sharing options...
sahra Posted February 3, 2010 Author Share Posted February 3, 2010 (edited) what does it tell you when you run the command explicitly.this test shows the command looks ok, so unless the run command has a limitation that msgbox does not, it should be fine.$log = @ProgramFilesDir & '\MyAshampoo\install.log'msgbox (64,"test", @ProgramFilesDir & '\MyAshampoo\UNWISE.exe /S ' & $log, 10)Is the install.log already in that folder...look what wrong:when i set:MsgBox(64, "test", @ProgramFilesDir & '\MyAshampoo\UNWISE.exe /S ' & $log)its workand when i set:Run(@ProgramFilesDir & '\MyAshampoo\UNWISE.exe /S ' & $log)its don't work i am sure the problem is the in the quotes the &log need to be with the exe together like here:Run(@ProgramFilesDir & '\MyAshampoo\UNWISE.exe /S "C:\Program Files\MyAshampoo\install.log"')Man really thanks you for your help and your time Edited February 3, 2010 by sahra Link to comment Share on other sites More sharing options...
MHz Posted February 4, 2010 Share Posted February 4, 2010 Unwise.exe usually uses the install.log in the current working directory so I would pass the working directory of install.log to Unwise.exe like shown below.RunWait('"' & @ProgramFilesDir & '\MyAshampoo\UNWISE.exe" /S', @ProgramFilesDir & '\MyAshampoo')You may find older versions of Unwise.exe (as some devs may still use an older version of WISE to make their installers) may not accept a command line argument of the install.log path unless it is in 8.3 filename format thus the above example will avoid the issue. Link to comment Share on other sites More sharing options...
sahra Posted February 4, 2010 Author Share Posted February 4, 2010 Unwise.exe usually uses the install.log in the current working directory so I would pass the working directory of install.log to Unwise.exe like shown below.RunWait('"' & @ProgramFilesDir & '\MyAshampoo\UNWISE.exe" /S', @ProgramFilesDir & '\MyAshampoo')You may find older versions of Unwise.exe (as some devs may still use an older version of WISE to make their installers) may not accept a command line argument of the install.log path unless it is in 8.3 filename format thus the above example will avoid the issue.sorry man dont work its show me to pick the install.log Link to comment Share on other sites More sharing options...
MHz Posted February 5, 2010 Share Posted February 5, 2010 sorry man dont work its show me to pick the install.logOdd. Perhaps passing just "install.log" with my attempt may help but I would expect UnWise.exe to imply "install.log" by default.Try these attempts then; try full path$path_MyShampoo = @ProgramFilesDir & '\MyAshampoo'RunWait('"' & $path_MyShampoo & '\UNWISE.exe" /S "' & $path_MyShampoo & '\install.log"')Notice the single/double quoting used above.; try 8.3 path$path_MyShampoo = FileGetShortName(@ProgramFilesDir & '\MyAshampoo')RunWait('"' & $path_MyShampoo & '\UNWISE.exe" /S ' & $path_MyShampoo & '\install.log')@iamthekyI hope that I am not being overly intrusive. Link to comment Share on other sites More sharing options...
sahra Posted February 5, 2010 Author Share Posted February 5, 2010 sorry man dont work its show me to pick the install.logOdd. Perhaps passing just "install.log" with my attempt may help but I would expect UnWise.exe to imply "install.log" by default.Try these attempts then; try full path$path_MyShampoo = @ProgramFilesDir & '\MyAshampoo'RunWait('"' & $path_MyShampoo & '\UNWISE.exe" /S "' & $path_MyShampoo & '\install.log"')Notice the single/double quoting used above.; try 8.3 path$path_MyShampoo = FileGetShortName(@ProgramFilesDir & '\MyAshampoo')RunWait('"' & $path_MyShampoo & '\UNWISE.exe" /S ' & $path_MyShampoo & '\install.log')@iamthekyI hope that I am not being overly intrusive.Now Work Perfect Thanks You Very Match!!!!!!!! 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