Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

IE 7 Task Kill in Vista

Updated: 21 May 2010 | 8 comments
Anthony De Silva's picture
0 0 Votes
Login to vote

I am declaring the path of IE 7 and asking the task be killed if it is in use, but it is not working when i test it out. Anyone have any ideas?



See below:



item: Set Variable

Variable=INUSEFILENAME

Value=iexplore.exe

Flags=10000000

end

item: Set Variable

Variable=INUSEPATHNAME

Value=C:\Program Files\Internet Explorer

Flags=10000000

end

item: Custom Script Item

Filename=Check In-use File.wse

Variable Name1=_INUSE_VAR_

Variable Value1=APPRUNNING

Variable Name2=HELPFILE

Variable Value2=C:\Program Files\Altiris\Wise Package Studio\Help\WiseScriptPackageEditor.chm

Variable Name3=_INUSE_PATH_

Variable Value3=%PROGRAM_FILES%\Internet Explorer\iexplore.exe

end

item: Remark

Text=CSIT: gives a warning to close application and if not will force the app to close

end

item: If/While Statement

Variable=INUSE_RTN

Value=-1

end

item: Wizard Block

Direction Variable=DIRECTION

Display Variable=DISPLAY

X Position=0

Y Position=0

Filler Color=0

end

item: Custom Dialog Set

Name=Program In-Use

Display Variable=DISPLAY

item: Dialog

Title=%APPTITLE%

Title French=Commencer l'installation

Title German=Installation beginnen

Title Portuguese=Iniciar Instalação

Title Spanish=Comenzar la Instalación

Title Italian=Avvia Installazione

Title Danish=Start installationen

Title Dutch=Start de installatie

Title Norwegian=Start installeringen

Title Swedish=Starta installationen

Width=290

Height=238

Font Name=Helv

Font Size=8

item: Push Button

Rectangle=186 200 228 214

Variable=DIRECTION

Value=N

Create Flags=01010000000000010000000000000001

Text=&Next >

Text French=&Suivant>

Text German=&Weiter>

Text Portuguese=&Próximo>

Text Spanish=&Siguiente >

Text Italian=&Avanti >

Text Danish=&Næste>

Text Dutch=&Volgende>

Text Norwegian=&Neste>

Text Swedish=&Nästa >

end

item: Push Button

Rectangle=237 200 279 214

Action=3

Create Flags=01010000000000010000000000000000

Text=Cancel

Text French=Annuler

Text German=Abbrechen

Text Portuguese=Cancelar

Text Spanish=Cancelar

Text Italian=Annulla

Text Danish=Annuller

Text Dutch=Annuleren

Text Norwegian=Avbryt

Text Swedish=Avbryt

end

item: Static

Rectangle=71 191 286 192

Action=3

Create Flags=01010000000000000000000000000111

end

item: Static

Rectangle=0 187 71 195

Destination Dialog=4

Enabled Color=00000000000000001111111111111111

Create Flags=01010000000000000000000000000000

Text=Wise Installation Wizard®

end

item: Static

Rectangle=20 20 260 170

Destination Dialog=4

Create Flags=01010000000000000000000000000000

Flags=0000000000000001

Name=Arial

Font Style=-12 0 0 0 700 0 0 0 0 3 2 1 34

Text=Warning: Setup has detected that Adobe Reader/Acrobat or Internet Explorer are open. Please save and close any documents you are working on within these applications. Any documents that are still open after clicking Next will be automatically closed and any unsaved changes will be lost.

Text=

Text=Click Next to continue.

Text=

Text=Attention: L’installation a détecté qu’Acrobat Reader/Acrobat ou Internet Explorer est ouvert. Veuillez enregistrer et fermer tous les documents sur lesquels vous travaillez. Tous les documents ouvert après avoir cliqué sur "Next" seront fermés automatiquement et tous changements qui n’ont pas été enregistré seront perdus.

Text=

Text=Cliquez sur "Next" pour continuer.

Text=

Text French=Vous êtes maintenant prêt à installer %APPTITLE%

Text French=

Text French=Cliquez sur Suivant pour commencer l'installation ou Retour pour entrer à nouveau les informations d'installation

Text German=Sie sind jetzt zur Installation von %APPTITLE% bereit.

Text German=

Text German=Auf die Schaltfläche Weiter klicken, um mit dem Start der Installation zu beginnen, oder auf die Schaltfläche Zurück, um die Installationsinformationen nochmals aufzurufen.

Text Portuguese=Está agora pronto para instalar %APPTITLE%

Text Portuguese=

Text Portuguese=Pressione o botão Próximo para começar a instalação ou o botão Retornar para introduzir novamente a informação sobre a instalação

Text Spanish=Ahora estará listo para instalar %APPTITLE%.

Text Spanish=

Text Spanish=Pulse el botón de Siguiente para comenzar la instalación o el botón Retroceder para volver a introducir la información sobre la instalación.

Text Italian=Sei pronto ad installare %APPTITLE%.

Text Italian=

Text Italian=Premi il tasto Avanti per iniziare l’installazione o il tasto Indietro per rientrare nuovamente nei dati sull’installazione

Text Danish=Du er nu klar til at installere %APPTITLE%.

Text Danish=

Text Danish=Klik på Næste for at starte installationen eller på Tilbage for at ændre installationsoplysningerne.

Text Dutch=U bent nu klaar om %APPTITLE% te installeren.

Text Dutch=

Text Dutch=Druk op Volgende om met de installatie te beginnen of op Terug om de installatie-informatie opnieuw in te voeren.

Text Norwegian=Du er nå klar til å installere %APPTITLE%

Text Norwegian=

Text Norwegian=Trykk på Neste-tasten for å starte installeringen, eller Tilbake-tasten for å taste inn installasjonsinformasjonen på nytt.

Text Swedish=Du är nu redo att installera %APPTITLE%.

Text Swedish=

Text Swedish=Tryck på Nästa för att starta installationen eller på Tillbaka för att skriva in installationsinformationen på nytt.

end

end

end

item: Execute Program

Pathname=taskkill.exe

Command Line=/F /T /IM iexplore.exe

Flags=00001010

end

item: End Block

end

item: End Block

end

discussion Filed Under:

Comments

kip marousyn's picture
03
Oct
2008
0 Votes 0
Login to vote

what about a little vbscript?



objProcess.Terminate()

EdT's picture
05
Oct
2008
0 Votes 0
Login to vote

If you wish to post sample code, please attach it as a ZIP file. Do not just post it in your message as it is effectively unusable from there without extensive editing to remove trailing spaces on each line, and we don't have the time to do that.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

VBScab's picture
05
Oct
2008
0 Votes 0
Login to vote

Hard-code paths to EXEs are always a bad idea. It's easy to assume that IE (or Office, or Windows, or...you get the idea) will be installed in its default location but I've worked at two clients which didn't use the IE default. Made packaging such fun!

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

Anthony De Silva's picture
07
Oct
2008
0 Votes 0
Login to vote

F.Y.I Sent from Altiris concerning the issue of closing IE7 in Vista.



"Article ID: 40581

KNOWN ISSUE: Check in-use file action does not work unless user has write permissions to file

________________________________________

Problem/Symptoms

1. Take an .exe such as Notepad.exe and change the permissions so that you are denied write-access.

2. Create a .wse that has the following lines of code:



Check In-Use File c:\windows\notepad.exe

Display Message (this action should display the variable used in the Check In-Use file action)

3. Compile and Run the Wisescript with Notepad closed. The variable displayed is blank.

4. Open Notepad and run the WiseScript .exe. The variable displayed is still blank.

5. Allow write permissions to notepad and re-do steps 3–4. This time the variable displays the expected result.

________________________________________

Environment

Wise Installation Studio 7.x

Wise Package Studio 7.x

________________________________________

Cause

This occurs due to the method used to determine if a file is in-use. The action attempts to open the file with Read/Write access. If the file cannot be opened, a check is done to see if the file is being used by another process. If the user does not have write permissions, the APIs indicate that the file cannot be opened due to lack of permissions. In this case, the same value is returned whether or not the file is actually in-use.

________________________________________

Resolution

Workaround: There is no known workaround at this time.



Best Regards,



Alicia Custard, ACP

Tech Support Engineer

Symantec Corporation

www.symantec.com"

VBScab's picture
07
Oct
2008
0 Votes 0
Login to vote

My reading of your response above is that applying write access permission to the file will resolve the issue. Could you not therefore add an action before your kill to run a command-line tool (e.g. SetACL, SubInACL, XCACLS) to do just that?

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

EdT's picture
07
Oct
2008
0 Votes 0
Login to vote

By the way, if you are working with Vista (something that you failed to mention in your original posting), then tell us. Providing full information at the beginning of a topic saves a lot of time by avoiding false assumptions.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

VBScab's picture
07
Oct
2008
0 Votes 0
Login to vote

quote:
Originally posted by: EdT

By the way, if you are working with Vista (something that you failed to mention in your original posting), then tell us.

Ummmm...it does mention 'Vista' in the title, Ed.

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

EdT's picture
08
Oct
2008
0 Votes 0
Login to vote

OK - I missed that completely.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.