coucou Posted July 29, 2005 Share Posted July 29, 2005 HiI try to write a silent Activation of Symantec AntiSpam for an Unattended CD-Rom WinXP installation.I've got some success in the past, but this time i encountered some unusual (for me) functions to launch/call: RunWait @ScriptDir & when preceeded by regedit@CommonProgramsDir when launching a link from Start menu1) How to pause the script until finishing the installation?Runwait("SymAntiSpam.exe",.....) In fact, until the following window closed.>>>>>>>>>>>> Window Details <<<<<<<<<<<<< Title: Norton AntiSpam Setup Class: #32770 Size: X: 378 Y: 303 W: 524 H: 388 >>>>>>>>>>> Visible Window Text <<<<<<<<<<< Progress1 {E47EE8FB-ACC0-4608-859C-4E2851B18A6A} Components are being installed. Installation Progress Symantec Network Drivers >>>>>>>>>>> Hidden Window Text <<<<<<<<<<<2) How to add a .reg file to registe???Does the next command to run .reg file is correct?Run("regedit.exe /S file.reg", @ScriptDir & "F:\XPCD_SP2\Software\SymantecAntiSpam")2a) How to run the same command when the file.reg is in the CD-Rom installation?3) How to launch an application from Start Menu in ex:"C:\Documents and Settings\All Users\Start Menu\Programs\Norton AntiSpam\Norton AntiSpam" How to use "@CommonProgramsDir"?I'll appreciate any helpRegardscoucou Link to comment Share on other sites More sharing options...
Jason_A Posted July 29, 2005 Share Posted July 29, 2005 In fact, until the following window closed.<{POST_SNAPBACK}>You could use WinExists for this... Returns 1 if the window exists, otherwise returns 0.WinExist will return 1 even if a window is hidden. Link to comment Share on other sites More sharing options...
LxP Posted July 29, 2005 Share Posted July 29, 2005 1) How to pause the script until finishing the installation?Runwait("SymAntiSpam.exe",.....) In fact, until the following window closed.>>>>>>>>>>>> Window Details <<<<<<<<<<<<< Title: Norton AntiSpam Setup Class: #32770 Size: X: 378 Y: 303 W: 524 H: 388 >>>>>>>>>>> Visible Window Text <<<<<<<<<<< Progress1 {E47EE8FB-ACC0-4608-859C-4E2851B18A6A} Components are being installed. Installation Progress Symantec Network Drivers >>>>>>>>>>> Hidden Window Text <<<<<<<<<<<This should do the trick:runWait("SymAntiSpam.exe", ...) winWait("Norton AntiSpam Setup") winWaitClose("Norton AntiSpam Setup")2) How to add a .reg file to registe???Does the next command to run .reg file is correct?Run("regedit.exe /S file.reg", @ScriptDir & "F:\XPCD_SP2\Software\SymantecAntiSpam")2a) How to run the same command when the file.reg is in the CD-Rom installation?Maybe this?runWait("regedit.exe /S F:\XPCD_SP2\Software\SymantecAntiSpam\file.reg")3) How to launch an application from Start Menu in ex:"C:\Documents and Settings\All Users\Start Menu\Programs\Norton AntiSpam\Norton AntiSpam" How to use "@CommonProgramsDir"?Are you trying to run the program after installing it? You would know where the program is installed, so you could call it directly:run("C:\Program Files\Norton AntiSpam\TheProgram.exe") Link to comment Share on other sites More sharing options...
coucou Posted July 31, 2005 Author Share Posted July 31, 2005 Hi, TNX for yr help. Sorry to disappointing you, Nothing works. runWait("SymAntiSpam.exe") Symantec AntiSpam start then stop and nothing happens. coucouc Link to comment Share on other sites More sharing options...
LxP Posted July 31, 2005 Share Posted July 31, 2005 You might need to visit a computer that already has AntiSpam installed and inspect the Start menu shortcuts created by Setup. You can then see exactly how AntiSpam is started, and use the same syntax in your script. Link to comment Share on other sites More sharing options...
coucou Posted July 31, 2005 Author Share Posted July 31, 2005 Hi,I think we misunderstand each other.Tne installation is in 3 parts, all are working fine separately.1) Serial number enterd by "SymAS.reg "file2) Installing Silently the program. I've build a an installer and inegerated it to the Symantec Antispam program called "SymAntiSpam.exe".3) I've build an AutoIT file to activate the application "SymActive.au3".Here the Launch for activation:Run("C:\Program Files\Common Files\Symantec Shared\nmain.exe /nosysworks /dat:C:\Program Files\Norton AntiSpam\NASPLUG.NSI"3a) I was looking how to use "@CommonProgramsDir" to get a shorter line commandI'm looking to integrate all in one AutoIt file.The part 2 doesn't works when i use runWait("SymAntiSpam.exe") command as i wrote above. When you reply about part 3.Regardscoucou Link to comment Share on other sites More sharing options...
LxP Posted July 31, 2005 Share Posted July 31, 2005 Does double-clicking SymAntiSpam.exe manually install the program silently as expected?Possibly it is failing because a path is not specified in the RunWait() command? Link to comment Share on other sites More sharing options...
coucou Posted July 31, 2005 Author Share Posted July 31, 2005 Does double-clicking SymAntiSpam.exe manually install the program silently as expected?YES!!!Possibly it is failing because a path is not specified in the RunWait() command?All the files concerning Norton Antisapm (SymAS.reg , SymAntiSpam.exe, SymActive.au3) are in the same directory.With my AutoIt humble experienace, when all files are in the same directory, you don't need to specify the path.Regardscoucou Link to comment Share on other sites More sharing options...
LxP Posted August 1, 2005 Share Posted August 1, 2005 (edited) Try this anyway: runWait("SymAntiSpam.exe", @scriptDir) Maybe this might work if that doesn't: runWait(@scriptDir & "\SymAntiSpam.exe", @scriptDir) Edited August 1, 2005 by LxP 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