/build/static/layout/Breadcrumb_cap_w.png

custom action embedded vbscript problem?

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

Answers (6)

Posted by: anonymous_9363 16 years ago
Red Belt
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.
Posted by: case2k5 16 years ago
Orange Belt
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.
Posted by: michaelnowell 16 years ago
Second Degree Blue Belt
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.
Posted by: case2k5 15 years ago
Orange Belt
0
michaelnowell,

Your method works. Thank you very much.
Posted by: vijayskb@gmail.com 15 years ago
Yellow Belt
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]
Posted by: anonymous_9363 15 years ago
Red Belt
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)?
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ