I have an embedded vbscript (displayed below) running at the top of Execute Immediate.

If Not Installed then
| Call VBScript From Embedded Code (Action)
End
_______________________________________________________________________________________________________
Embedded VBScript:

On Error Resume NExt
Dim objShell, objNewPort, objWMIService, oFSO, Path, strComputerA
Dim RunErrorToReturn, Results
Dim strComputer : strComputer = "."
Dim objNetwork : Set objNetwork = CreateObject("WScript.Network")
strComputerA = objNetwork.ComputerName

Set objWMIService = GetObject("winmgmts:"& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
ProgramFiles = objShell.ExpandEnvironmentStrings("%ProgramFiles%")
windir= objShell.ExpandEnvironmentStrings("%windir%")
temp = objShell.ExpandEnvironmentStrings("%temp%")
allusers=objShell.ExpandEnvironmentStrings("%AllUsersProfile%")

path= oFSO.GetParentFolderName(WScript.ScriptFullName)

objShell.Run ("RunDll32 printui.dll,PrintUIEntry /if /b ""HP LaserJet III"" /f "+windir+"\inf\ntprint.inf /r ""lpt1:"" /m ""HP LaserJet III""")

On Error Resume Next
____________________________________________________________________________________________________

The problem is this printer is installing not fast enough and the fax printer driver trys to install but can't because the above printer driver wasn't installed in time.

How do I make it where the above embedded script is a mandatory install before the Fax printer driver?
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Surely any sane person has LaserJet printer drivers as part of their base build? If not, I'd build a package to install at least one (and probably not an antique like LJ III).

The problem with scripted installs is that many people assume they know what they're doing (no offence). If you don't want to go to thr trouble of building a proper package for LJ drivers, you should create a more professional script, one which uses WMI to create a process, capture the process ID and wait for that process to end before progressing to install your fax driver.
Answered 11/21/2008 by: VBScab
Red Belt

Please log in to comment
0
VBScab,

Could you post a better script for me to use? I am using LJ III drivers because that is what works with RightFax 8 as a pre-req.
Answered 11/21/2008 by: case2k5
Orange Belt

Please log in to comment
0
So you're asking someone to write a script for you. I hope that you're willing to pay them for it.

Just before the custom action 'Create_RFPrinter_CA' in the Execute Deferred sequence, add an action to Execute Program From Destination and run the following command line
cmd.exe /c rundll32 printui.dll,PrintUIEntry /ia /m "HP LaserJet 4" /h "Intel" /v "Windows 2000" /f %windir%\inf\ntprint.inf /q

Set you CA to 'Syncronous, Ignore Exit Code' and this will wait until the CA has completed before continuing with the rest of you installation.

Try using the help file in you packaging software, you'll be amazed at what you can learn from it.
Answered 11/21/2008 by: michaelnowell
Second Degree Blue Belt

Please log in to comment
0
michaelnowell,

Your method works. Thank you very much.
Answered 11/24/2008 by: case2k5
Orange Belt

Please log in to comment
0
Hello Can anybody help to Add a perticular service in Application through VB scripts.

I am using Wise package studio5.6 Tool for application Re-packaging

Pls send the script to Following mail ID

[:)]

[email=vijayskb@gmail.com]vijayskb@gmail.com[/email]
Answered 11/24/2008 by: vijayskb@gmail.com
Yellow Belt

Please log in to comment
0
ORIGINAL: [email=vijayskb@gmail.com]vijayskb@gmail.com[/email]
Hello Can anybody help to Add a perticular service in Application through VB scripts.

I am using Wise package studio5.6 Tool for application Re-packaging

Pls send the script to Following mail ID

[:)]

[email=vijayskb@gmail.com]vijayskb@gmail.com[/email]

Why not do the job properly and use WPS's 'Services' link (Installation Expert/Feature Details/Services)?
Answered 11/25/2008 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity