I'm using Wise Package Studio to do a Setup Capture of an application that installs a printer. After first Setup Capture, the printer did not appear. Not even after reboot. Now I'm going to do another Setup Capture and this time select the checkbox for Capture Changes in Hardware Registry Entries. I've never used this option before and am worried it will add hardware entries that may cause problem on other models of PCs. I'm looking for feedback from people that have used this option and if it has caused problems for them.
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
Capturing hardware changes isn't required to install a printer. There are a range of options open to you. Most packagers would, I guess, use the same command line which the Control Panel applet's 'Add a printer' menu would, i.e. the 'RunDLL [etc]'. If I was in front of my work machine, I could get you a sample but as I'm not, I'll point you at AppDeploy's 'Search' facility. Search for 'RunDLL' and take your pick of entries. At a guess I'd say you'd find from AngelD.
Answered 08/22/2009 by: VBScab
Red Belt

Please log in to comment
0
I've heard from 3 different people about the Capturing Hardware Changes option to get a printer to show up that an application installs. 2 people said Not to use it, 1 person said to Use it. The 2 people that said Not to use it did not say why the Capture Hardware Changes was not good. So I did a comparison of the registry entries captured between one capture using Capture HW Changes option and the other capture not using the Capture HW Changes option. The Capture HW Changes capture included these additional registry keys (I did not include all the sub-keys):

HKLM\System\CurrentControlSet\Control\Print\Environments\Windows NT x86
HKLM\System\CurrentControlSet\Control\Print\Printers\RGF PDF Virtual Printer v250
HKLM\System\CurrentControlSet\Control\Print\Printers\Und_hplj4 (this is my roaming printer that follows me)
HKLM\System\CurrentControlSet\Control\ServiceCurrent
HKLM\System\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\DefaultPrinterStore
HKLM\System\CurrentControlSet\Hardware Profiles\00001\Software\RGF PDF Virtual Printer v250
HKLM\System\CurrentControlSet\Hardware Profiles\Current\Software\RGF PDF Virtual Printer v250
HKLM\System\CurrentControlSet\Services\{8A61BE7E-D2B5-47BB-AC0D-3397AC993F3}\Parameters\Tcpip


I would Exclude the entry for:
\Printers\Und_hplj


Using the Capture HW Changes option does not seem too bad. It installed my printer. Can anybody give me a reason or experience as to why I should not use it?
Answered 08/23/2009 by: troy_in_wi
Orange Belt

Please log in to comment
0
Can anybody give me a reason or experience as to why I should not use it? Yes. You don't need to!

I searched for you. Go here: http://itninja.com/question/deploy-daemon-tool6&mpage=1&key=rundll꫍
Answered 08/24/2009 by: VBScab
Red Belt

Please log in to comment
0
ORIGINAL: troy_in_wi
Can anybody give me a reason or experience as to why I should not use it?


You already posted one reason yourself ....

ORIGINAL: troy_in_wi
HKLM\System\CurrentControlSet\Hardware Profiles\00001\Software\RGF PDF Virtual Printer v250


You have captured an entry in an enumerated registry key (00001). Can you be *sure* this will be the same to all machines you deploy the package ?

Also, your focus shouldn't just be on registry changes. Does your capture contain any files named OEM<n>.INF for example ? [<n> is a number the OS normally assigns dynamically when the driver is installed.] If so, how could you be sure that OEM<n>.INF is not already in use on the target systems ?

ORIGINAL: troy_in_wi
2 people said Not to use it, 1 person said to Use it.


I'd suggest you go with the majority opinion on this one, IMHO.

Regards,

Spartacus
Answered 08/24/2009 by: spartacus
Black Belt

Please log in to comment
0
Use RUNDLL as already stated, DONT capture it as this can lead to a world of pain:

1) Need a reboot or to restart the printer service, both not ideal if the user is mid print!
2) Capture duplicate OEM INF's, can override others during install.
3) Printer driver files issues, see above.

Link to Rundll usage to install a printer:
http://www.robvanderwoude.com/2kprintcontrol.php

P
Answered 08/24/2009 by: Inabus
Second Degree Green Belt

Please log in to comment
0
I'm trying to add this printer to my Wise setup capture, but it is giving my a 1720 error the script could not be run. The problem seems to be in my line of code to add the printer. I'm running it under the Execute Deferred tab using VBscript embedded code. I don't see an inf config file for this driver, it is a dll. I don't know if the problem is a wrong capitalized letter, wrong Environment Variable, a misplaced quote, or wrong command switches. Any ideas?

WshShell.Run "CMD.EXE /C rundll32.exe printui.dll,PrintUIEntry" /If /b "RGF PDF Virtual Printer v250" /f "%Sys32%\spool\drivers\w32x86\3\acpdf250.dll" /r "lpt1:" /m "Amyuni Document Converter 2.50"

I'll try hard coding the path instead of that %Sys32% variable now and see if it helps.
Answered 08/24/2009 by: troy_in_wi
Orange Belt

Please log in to comment
0
If that's your whole script, there are several problems. Post the whole thing... and that environment variable will not work.
Answered 08/24/2009 by: turbokitty
Sixth Degree Black Belt

Please log in to comment
0
Here is the entire script. It is VBscript from Embedded Code on the Execute Deferred tab just before InstallFinalize. Currently, I'm getting a 1720 error. It does not error if I comment out the line that adds the printer.

+++++++++++++++++++++++++++
Const ForAppending = 8
Set FSO = CreateObject("Scripting.FileSystemObject")
'---------------------------------------------------------------------------------------
' Open the file for appending, TRUE means create if it doesn't exist, and in ASCII.
'---------------------------------------------------------------------------------------
Set TextFile = FSO.OpenTextFile _
("C:\MyLogs\SunGardPrinter.txt", ForAppending, True, 0)

TextFile.WriteLine("Starting the Add Printer script")
Set WshShell = CreateObject("WScript.Shell")

TextFile.WriteLine("Trying to stop the spooler")
WshShell.Run "CMD.EXE /C NET STOP SPOOLER", 0, True

TextFile.WriteLine("Trying to add the printer")
WshShell.Run "CMD.EXE /C rundll32.exe printui.dll,PrintUIEntry" /If /b "RGF PDF Virtual Printer v250" /f "C:\WINDOWS\system32\spool\drivers\w32x86\3\acpdf250.dll" /r "lpt1:" /m "Amyuni Document Converter 2.50"

TextFile.WriteLine("Trying to start the spooler")
WshShell.Run "CMD.EXE /C NET START SPOOLER", 0, True

TextFile.WriteLine("Add Printer script complete")
TextFile.Close
+++++++++++++++++++++++++++++

I looked in the Application Event Log and it showed an error at Line 20 Column 66. That's my "/If" switch. I think maybe because the letter "I" is capital instead of lower case. But Wise keeps automatically changing it from lower to upper.
Also, I don't know if it will be a problem that my driver file is a DLL instead of an INF.

Thanks.
Answered 08/24/2009 by: troy_in_wi
Orange Belt

Please log in to comment
0
Looking at the switches, unlike some of the others (e.g. '/S' and '/s') the '/i' switch has no different case meaning so I don't think it would care about upper- or lower-case 'i'.

Having said that, does the bare command line work outside of a Custom Action? The general idea would be to get a working command line and THEN include it in a script. I don't suppose it does work since the '/if' switch is for installing with an INF and you say there is no INF. Kinda hard to use one if it doesn't exist...
Answered 08/24/2009 by: VBScab
Red Belt

Please log in to comment
0
Hi VBScab,
I have looked very hard and can't find an inf file for the printer. All I find are DLLs and a DRV file.
Thanks.
Answered 08/24/2009 by: troy_in_wi
Orange Belt

Please log in to comment
0
I have looked very hard and can't find an inf file for the printer. All I find are DLLs and a DRV file. Er...that was my point. If there's no INF, you can't use the '/if' switch. I find it hard to imagine a driver with no INF, though. Surely there was one in your capture?
Answered 08/25/2009 by: VBScab
Red Belt

Please log in to comment
0
If the vendor deleted the named inf then all you will have is a oemxx.inf, this, if you locate the real name of the inf from inside it, can be renamed back to its correct name.

P
Answered 08/25/2009 by: Inabus
Second Degree Green Belt

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