Login | |
|
 |
Re: Uninstalling Adobe and other programs - 1/27/2005 9:08:07 PM
|
|
 |
|
| |
Zifter
Posts: 318
Score: 0
Joined: 1/5/2005
From: Belgium
Status: offline
|
Here you can find an example of how to install/uninstall Acrobat reader with VBScript. HTH
|
|
| |
|
|
|
 |
Re: Uninstalling Adobe and other programs - 1/28/2005 7:52:19 AM
|
|
 |
|
| |
Rioku
Posts: 52
Score: 0
Joined: 1/27/2005
From:
Status: offline
|
#1 whatever you do do not try to make a post without logging in forst because I jsut lost about 20min of work because of it. Now, sorry for not understanding the link you sent me but it is confusing to me. Because they say " The Acrobat Reader MSI need To on the target system". which I do not know if that means that Adobe needs to be install with the MSI or if I need to have an ADOBE.MSI on the computer here is the code: ' Install or Uninstall based on switches passed to packaged ' executable If no switches (or if the script is not a ' packaged executable) an installation will be performed Set oShell = CreateObject("WScript.Shell") ASEEXEARGS = oShell.ExpandEnvironmentStrings("%ASEEXEARGS%") WINDIR = oShell.ExpandEnvironmentStrings("%WINDIR%") COMSPEC = oShell.ExpandEnvironmentStrings("%COMSPEC%") If InStr("%ASEEXEARGS%","-u") <> 0 Then ' Uninstall Acrobat Reader oShell.Run COMSPEC & " /c MsiExec.exe /X{AC76BA86-7AD7-1033-7646-A00000000001} /qn", 7, True Else ' Install Acrobat Reader oShell.Run "AdbeRdr60_enu.exe -p""-s /v\""/qn\""""", 7, True ' Note: there are many ways to trigger the silent installation, ' see http://www.appdeploy.com/packages for more information Set FSO = CreateObject("Scripting.FileSystemObject") fso.DeleteFolder(WINDIR & "\cache\adobe reader 6\") Set FSO = Nothing ' While deleting these files will free space, if the files are needed in the ' future, the user will be prompted for their location. Calling the MSI from ' a network share may be best for usually-connected systems. End If oShell = Nothing ' This script has been successfully tested with alternate credentials specified ' in the ASE Script Packager. The Script Packager is a feature of the Admin Script ' Editor - http://www.adminscripteditor.com what do these mean: %ASEEXEARGS% and %COMSPEC% and the uninstall line: oShell.Run COMSPEC & " /c MsiExec.exe /X{AC76BA86-7AD7-1033-7646-A00000000001} /qn", 7, True what does the /c, MsiExec.exe, /X and the large number do? thank you for the help
|
|
| |
|
|
|
 |
Re: Uninstalling Adobe and other programs - 1/28/2005 6:59:16 PM
|
|
 |
|
| |
Rioku
Posts: 52
Score: 0
Joined: 1/27/2005
From:
Status: offline
|
OK Gentelmen I/we are very close to getting this finished First I would like to thank everyone who had helped so far So here is what I think the problem is The adobe product code is not the correct one and I am unable to locate others. Plus I also am in need of the others so that the script will completly erase all older versians of adobe. Again here is the code: '****************** START CODE *************************** Option Explicit Dim UserName, adobe6file, unInstall Dim adobe6 'adobe6 = "C:\Documents%20and%20Settings\Pearce%20Aurigemma\Desktop\scripting\scripting\AdbeRdr60.exe /s /v /x" 'adobe6 = "h:\AdbeRdr60.exe" adobe6file = "C:\Program Files\Adobe\Acrobat 6.0 CE\Reader\AcroRd32.exe" Dim oFS set oFS = WScript.CreateObject("Scripting.FileSystemObject") Dim oShell set oShell = WScript.CreateObject("WScript.Shell") Dim COMSPEC COMSPEC = oShell.ExpandEnvironmentStrings("%COMSPEC%") If (oFS.FileExists(adobe6file)) Then ' *** Adobe 6.0 exist "unInstall" will get 1 on OK, 2 on Cancle unInstall = MsgBox ("Would you like to uninstall" & vbNewLine & _ "Adobe 6.0 from this computer", 65, "Acrobat 6.0 Exists on this computer") If (unInstall = 1) Then ' oShell.Run "h:\AdbeRdr60.exe" oShell.Run COMSPEC & " /c MsiExec.exe /X{AC76BA86-0000-0000-7760-7E8A45000000} ", 7, True else Wscript.echo " You Chose Cancle" End if Else Wscript.echo "Acrobat 6.0 Does not Exist on this computer" End if ' AC76BA86-7AD7-1033-7646-A00000000001 ' oShell.Run installCmd,1, TRUE ' oShell.Run "\\ds1\c\adobe7.0.exe /s /v/qn" '*********** CLEAN UP ************** Set oFS = Nothing Set oShell = Nothing WScript.Quit (0) ' ********** END CODE **************** The error it returns is "This action is only valid if the product is currently installed" I do have adobe 6.0 CE installed. So I have come to the conclusion that the codes that I tried are not the ones that I need and a search on Adobe's site for "product code" nothing also same result on google. thanx for the help I can not wait to be able to post the completed script
|
|
| |
|
|
|
 |
Re: Uninstalling Adobe and other programs - 1/29/2005 9:51:06 AM
|
|
 |
|
| |
Rioku
Posts: 52
Score: 0
Joined: 1/27/2005
From:
Status: offline
|
Hey, Just wanted to say thanx. I got all the parts that I need working I will post the final script when I am done. Hopefully it will help someone. Thanx again
|
|
| |
|
|
|
 |
Re: Uninstalling Adobe and other programs - 2/1/2005 3:11:12 PM
|
|
 |
|
| |
Rioku
Posts: 52
Score: 0
Joined: 1/27/2005
From:
Status: offline
|
I am trying to read the 5th line of a file with the object.readline how do I get it to move down the the fith line. then after I have it in a variable I want cut off the first 8 characters is there a function for that?
|
|
| |
|
|
|
 |
Re: Uninstalling Adobe and other programs - 3/11/2005 12:14:37 PM
|
|
 |
|
| |
Bushmen
Posts: 122
Score: 0
Joined: 2/4/2005
From:
Status: offline
|
gents, you'ld probably find in big organizations with application repackaging teams, that all uninstall, and isu files and information which gets put down with the installation gets removed when you repackage the msi or on install, since the msiexec windows installer service can take care of this much more effectively and efficiently. another reason is so that the user can not be tempted to try anything fancy, like uninstalling a package via the command line or shortcuts.. users are getting clever these days and even though machines gets locked down, users gets around it. with the msi repair capabilities, the user can do pretty much anything to the install, and the msi should be able to repair, unless of course the user unistall the product, where the won't be possible. Bushmen
|
|
| |
|
|
|
|
|