Sign in to follow this  
Followers 0
coucou

HELP! on 3 functions

9 posts in this topic

Hi

I 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 menu

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

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 help

Regards

coucou

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Hi,

TNX for yr help.

Sorry to disappointing you, Nothing works.

runWait("SymAntiSpam.exe") Symantec AntiSpam start then stop and nothing happens.

coucouc

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

2) 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 command

I'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.

Regards

coucou

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Regards

coucou

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Try this anyway:

runWait("SymAntiSpam.exe", @scriptDir)

Maybe this might work if that doesn't:

runWait(@scriptDir & "\SymAntiSpam.exe", @scriptDir)
Edited by LxP

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