Computing.Net > Forums > Programming > VBScript Problem

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

VBScript Problem

Reply to Message Icon

Name: Grime
Date: January 16, 2004 at 12:40:44 Pacific
OS: XP Pro and W2K3
CPU/Ram: -
Comment:

I've obtained a VB install script for an Adobe Reader 6.0.1 msi file I want to install. I put it in the logon scripts so all the computers in the domain would install Adobe when a user logged on. Both the script and the msi are in "\\SERVER\NETLOGON\MSI\Adobe Reader 6.0.1\". When I try to login and have it automatically install the program on any computer on the domain, the script runs and says that it starts the installation, the event log says that the MSI is in fact starting as well, and then I get a message from the script that says it was installed successfully. Nevertheless, I check Add/Remove and it is not there. I've never written VB before, so I don't know what the problem is, or even if it is a problem with the script or with the MSI itself. Anyways, here is the script:

' 1. set variables
'
Option Explicit
On Error Resume Next
Dim Return, programpath, programname, windowspath, startmenupath, fso, WshShell, WshNetwork
programname = "Adobe Acrobat Reader 6.0 Full"
set fso = CreateObject("scripting.filesystemobject")
Set WshShell=WScript.CreateObject("Wscript.Shell")
Set WshNetwork = WScript.CreateObject("Wscript.Network")
programpath = left(WScript.ScriptFullName,len(wscript.scriptfullname) - Len(WScript.scriptName))

' 2. run setup program
WshShell.Popup "Starting installation of " & programname & "...",3,programname
Return = WshShell.Run("msiexec /qb- /i """ & programpath & "Adobe Reader 6.0.1.msi""",1,True)
'
' 3. perform after-installation configuration
'
WshShell.regdelete "HKCU\Software\Adobe\Acrobat Reader\6.0\AdobeViewer\EULA"
WshShell.regdelete "HKLM\Software\Adobe\Acrobat Reader\6.0\AdobeViewer\EULA"
WshShell.regwrite "HKCU\Software\Adobe\Acrobat Reader\6.0\AdobeViewer\EULA","1","REG_DWORD"
WshShell.regwrite "HKLM\Software\Adobe\Acrobat Reader\6.0\AdobeViewer\EULA","1","REG_DWORD"
If fso.folderexists("c:\documents and settings\all users") Then
fso.deletefolder "c:\documents and settings\all users\start menu\programs\PrintMe Internet Printing", True
End If
If fso.folderexists("c:\winnt\profiles\all users") Then
fso.deletefolder "c:\winnt\profiles\all users\start menu\programs\PrintMe Internet Printing", True

End If
If fso.folderexists("c:\windows\profiles\all users") Then
fso.deletefolder "c:\windows\profiles\all users\start menu\programs\PrintMe Internet Printing", True
End If

WshShell.Popup "Completed installation of " & programname & "...",3,programname



Sponsored Link
Ads by Google

Response Number 1
Name: Code One
Date: January 17, 2004 at 21:01:41 Pacific
Reply:

looks to me this script is used for NT...

you have XP...

perhaps that doesnt matter, do it specify where it is being installed?

perhaps it is creating it's own folder since you arent telling it where to go...


0

Response Number 2
Name: Code One
Date: January 17, 2004 at 21:03:44 Pacific
Reply:

oh and it wont show up in add/remove unless you install it in the program files directory, looks to me like it may be going to the my documents and settings\all users directory check there...


0

Response Number 3
Name: Grime
Date: January 18, 2004 at 22:02:48 Pacific
Reply:

Heheh... Ooops. That script that I got from somewhere else must have been a little dated because the .msi was missing the last .1 in the version number. I also forgot a file or two in the shared install folder :-|


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: VBScript Problem

Vbscript problem www.computing.net/answers/programming/vbscript-problem/20253.html

Vbscript, problems with Do...loop www.computing.net/answers/programming/vbscript-problems-with-doloop/14274.html

vbScript Looping problem www.computing.net/answers/programming/vbscript-looping-problem/20082.html