Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBScript to run an .MSI file on a Network Share

Status
Not open for further replies.

Alexial

Programmer
Nov 26, 2008
36
US
Hello everyone! I have a very simple script that I need to get working in order to install an outlook add-on. I think I have the basics correct, however I am getting an error (scroll past the code) that stops it from working.

The error code doesn't seem to make sense since I am sure I pointed it to the correct location. This needs to operate in a Windows Vista 32bit environment.

Here is the code:
Code:
Option Explicit
'On Error Resume Next
 
Dim objShell, strCmd

Set objShell = CreateObject("WScript.Shell")
strCmd = "msiexec.exe /a ""\\xxxxxx\CCSInstall\CCSServiceRequestClient.msi"" /quiet /norestart"

objShell.Run "strCmd",2,True

Here is the error:
Script: C:\Users\xxxx\Desktop\CCInstall2.vbs
Line: 9 (Last line)
Char: 1
Error: The system cannot fine the file specified.
Code: 80070002
Source: (null)

When I use:
Code:
objShell.Run ("strCmd,2,True")
I get the same error, and if I try:
Code:
objShell.Run (strCmd,2,True)
I get:

Script: C:\Users\xxxx\Desktop\CCInstall2.vbs
Line: 9 (Last line)
Char: 29
Error: Cannot use parentheses when calling a Sub.
Code: 800A0414
Source: Microsoft VBScript compilation error

Any help would be greatly appreciated! I know it's probably something silly. :)
 
Ok. I've been playing with this. If I do:

Code:
Option Explicit
'On Error Resume Next
 
Dim objShell, strCmd

Set objShell = CreateObject("WScript.Shell")
strCmd = "msiexec.exe /a ""\\xxxx\Software\CCSInstall\CCSServiceRequestClient.msi"" /quiet /norestart"

[b]objShell.Run (strCmd)[/b]

Then I don't get errors, but it doesn't DO anything either.
 
Ok. If I comment out /quiet /norestart then the installer comes up and appears to work. What am I doing wrong?
 
Alright, you can ignore this for the time being. The installer does not work, I have to email the company. Sorry for the trouble!
 
Alright, so I finally got the updated and fixed installer. I now have one last small problem. The installer goes through a little wizard where you have to click 'Next' a couple times, then finish. I want to skip this, or possibly make the MSI click through so that the user doesn't have to/have the change to click anything.

I have Advanced Installer 6.6 if I need to edit the MSI. Let me know if this can be done with VB or if it is the wrong section and I'll copy/paste this to a more appropriate area. Thanks!!
 
Alexial, you probably aren't getting a lot of replies because your problem raises a "yyyyeeeah, that sounds suspicious" flag to a lot of people (me included).

A quick google search shows CCSServiceRequestClient to look pretty legitimate. I read through the first page of the installation manual, and it looks like the software has a "Client-on-demand" mode that will install the software on the client computers as they need it. This is set up on the exchange server, btw.

Is that not a viable option?
 
It's quite legit :) It's an outlook addon that creates ticket forms that users can fill out when they are having a problem with their computers. This way we don't have to use email and get the obscure 'my computer isn't working' email.

What the MSI does is install a button in outlook that the user can push to load the form and create a new ticket. Unfortunately their 'client on demand' option is not that great. In order for it to automatically install, the user would have to navigate down through several public folders, go to the correct one, and then create a new task.

Most of them don't even know what public folders are, much less how to show them, or how to use them once they get there. Basically I'd like to have this install automatically when they logon so that I don't get a million calls saying 'Ok, I pressed that.. now what? I can't find that..' etc. Also, my boss wants this done next week. x.x
 
Check out the 'Application.Sendkeys' and 'Application.Wait' methods. That should be all you need.
 
Hmm. Sounds good! I'll google it :) Thank you!
 
you have an msi that you are installing using msiexec?
and you want to get rid of the prompts? next next finish?
you should be able to pass msiexec parameters to install the msi silently.../qb- etc


app.sendkeys wouldnt be recommended for use during application installations or configurations.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top