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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

installing perl modules quietly 1

Status
Not open for further replies.

sakuass

Programmer
May 18, 2006
11
CA
I am wondering if there is away to install perl module on windows quietly. I need to bypass all the standard input that perl is requesting with default values,
ex: perl path? [C:/perl/bin] -> the default is c:/perl/bin.

I need to get the installation going without being monitored, so I would supply all the expected input (ie: y,n, etc). I tried using pipes, but have no luck. I looked around the net for quiet installation, but still no luck. Can someone give me some pointers?

Thank you.

perlnoob
 
Hi,

To do this with linux I use a send/expect script ... and I think that it exists a windows version of the expect command
even if I never used it...try to search on the web "expect windows"

good luck!
 
yes i do have ppm installed. I was trying to find a flag that I could use to install ppm module quietly

thanks
 
so you have PPM, but it's not installed? I'll see what I can find...
 
no i have the actual ppm installed, I just need a way to bypass all the question that comes up when I install a perl module using ppm.
 
I think you can edit the ppm2.bat file in the perl/bin folder.

Find this section in ppm2.bat:

Code:
<PPMCONFIG>
    <PPMVER>2,2,0,0</PPMVER>
    <PLATFORM CPU="x86" OSVALUE="$Config{'osname'}" OSVERSION="0,0,0,0" />
    <OPTIONS BUILDDIR="$ENV{'TEMP'}" CLEAN="1" [b]CONFIRM="1"[/b] DOWNLOADSTATUS="16384" FORCEINSTALL="1" IGNORECASE="1" MORE="0" ROOT="$PerlDir" TRACE="0" TRACEFILE="PPM.LOG" VERBOSE="1" />
    <REPOSITORY LOCATION="[URL unfurl="true"]http://www.ActiveState.com/cgibin/PPM/ppmserver.pl?urn:/PPMServer"[/URL] NAME="ActiveState Package Repository" SUMMARYFILE="fetch_summary"/>
    <PPMPRECIOUS>Compress-Zlib;Archive-Tar;Digest-MD5;File-CounterFile;Font-AFM;HTML-Parser;HTML-Tree;MIME-Base64;URI;lib[URL unfurl="true"]www-perl;XML-Parser;SOAP-Lite;PPM;libnet;libwin32</PPMPRECIOUS>[/URL]
</PPMCONFIG>

change: CONFIRM="1" to CONFIRM="0"

that should do it. Save the file.
 
You can probably just do this from the ppm command line too:

ppm> set confirm 0



 
I should've mentioned this before, but I'm using active perl 5.8.7, which doesn't contain that ppm2.bat file anywhere in the package. Should there be a similar file for this version?
Anyone ?

Thanks
 
I am pretty sure 5.8.x all have ppm2 and maybe ppm3 also. I'm using activestateperl 5.8.0.804 and it has ppm/ppm2/ppm3. Try this, go to the command prompt and type:

c:\>ppm2

(or however you access ppm)

and see what happens. If it runs then you do have ppm2 already in your version of perl.
 
hmm, that's really odd. I don't have that file, so when I can't really run that file. I tried 'grep'-ing any batch files that might contain the word "CONFIRM", but no luck.

I tried copying over ppm2.bat and other files from an install activeperl 5.8.0 to my 5.8.7 system, and still no luck.
 
maybe they have gone to only ppm3 with your version of perl. Look for a ppm3.bat file or type:

c:>ppm3 help set

and see if that brings up the help files for the set command which you can use to set CONFIRM to 0 to install modules without needing to enter y/n.
 
no, ppm3 doesn't have any "CONFIRM" setup.
it only contains "verbose" where I turned them all off already, but it still ask for confirmation.
 
Yes, like I said on my last post, I tried changing the verbose option to 0, but it seems like by turning off the verbose, we simplu just don't see what files are being installed, but it will still seek for a confirmation when it needs to.
 
hmm... well, I tried. I don't have that vesion of perl installed and since it's a 12MB file and I'm on dial-up it's sort of a pain to download and install it just to try and solve this dilema. If I get time tonight I may go ahead and download it and see if I can figure it out. I need to upgrade my version of perl anyway.
 
wel, setting install-verbose to 0 (zero) gets rid of the y/n prompt when installing modules now that I installed the latest version of activestate perl. Do this, get ppm3 started then type:

settings

at the command prompt and post what your settings are.
 
ppm> set
case-sensitivity: 0
download-chunksize: 16384
fields: name version abstract
follow-install: 1
force-install: 0
install-verbose: 0
pager:
profile-track: 0
prompt-context: 0
prompt-slotsize: 11
prompt-verbose: 0
rebuild-html:
remove-verbose: 0
sort-field: name
tempdir: C:\DOCUME~1\user1\LOCALS~1\Temp
trace-file: ppm3.log
trace-level: 0
upgrade-verbose: 1
verbose-startup: 1

what module did you try to install anyway? maybe it depends also on the module. I was trying to install XML-LibXML
 
I just installed CGI.pm to test but I will try the module you have been trying.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top