Michael,
Microsoft's new Windows Scripting Host 5.6 allows you create a session and capture the
STDOUT and STDERR, as well as write to STDIN.
James
use Win32::OLE;
$objShell = Win32::OLE-new(WScript.Shell);
# // Generates 'Could Not Find...' on STDERR
$objExec = $objShell-Exec(CMD /c DEL
Brad,
You where almost there. Try inserting a section break instead of a page break, then
select the range following the section break for the margin change. This is like
choosing 'From this point forward' in the 'Apply To' combo box in Page Setup.
use Win32::OLE;
use Win32::OLE::Const
A MAC will only be in the ARP cache if the machine is in you local subnet, and it will
not stay there very long. If you are trying to acquire this information on a WAN that
permits NetBIOS, you can harvest it in NT/2k/XP from the NBTSTAT console command and
redirect the output back to PERL.
Mark,
Here is a way to make a shortcut to a file or URL using OLE.
James
use Win32::OLE;
$WSH = Win32::OLE-new('Wscript.Shell');
$SC = $WSH-CreateShortcut($WSH-SpecialFolders('AllUsersDesktop').\\Sample.lnk);
$SC-{WindowStyle} = 4; # 3=Maximized 4=Normal 7=Minimized
$SC-{TargetPath} =
-Description('Reports');
#$LINK-ShowCMD(SW_SHOWNORMAL);
$LINK-Save($Dir98\\Reports.lnk);
}
#
Mark
-Original Message-
From: Krummel, James C - PGGC-6 [mailto:jckrummel;bpa.gov]
Sent: Friday, October 25, 2002 2:47 PM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL
Eric,
Here is another way to do This:
use Win32::OLE;
$vbOKOnly = 0;
$vbYesNo = 4;
$vbCritical = 16;
$vbWarning = 48;
$vbInformation = 64;
$WSHShell = Win32::OLE-CreateObject('Wscript.Shell');
$Return = $WSHShell-Popup(Windows could not finish a system task and needs
to restart.\n\nNOTE: You
Dick,
This is a feature of the OS. All file and path names that do not conform to
the eight dot 3 format need to be surrounded by quotes when invoked in
console commands. The exception is ChDir which will parse the command
either way. For a description of this behavior, type 'CD /?' in a dos
: Friday, May 10, 2002 5:33 AM
To: 'Krummel, James C - PGGC-6';
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: GetTcpTable API?
Hi. Great script. I'm just starting to get into API calls.
I tried this script, and it's dumping the IP info correctly, however,
the ports are all
Mike,
Jenda Krynicky has a script on his site that changes PE of an executable
from console to GUI. This should make your file do what you want with a
little modification.
James
http://jenda.krynicky.cz/perl/makeGUIperl.pl.txt
-Original Message-
From: Mike DeWolfe [mailto:[EMAIL
Ricky,
This will create a empty file.
Cheers,
James
use Win32::OLE;
# 1 = Jet 1.0, 2 = Jet 1.1; 3 = Jet 2.0, 4 = Jet 3x, 5 = Jet 4x
$FileFormat = 5;
# Jet v4 is used by MS Access 2000
$FileName = C:\\Test.mdb;
$objCat = Win32::OLE-CreateObject(ADOX.Catalog);
Bryan,
I have been using Jan Krynicky Mail::Sender for years. It is easy and works
great.
James
http://jenda.krynicky.cz/#Mail::Sender
use Mail::Sender;
$sender = new Mail::Sender{
smtp = 'MAIL02',
from = '[EMAIL PROTECTED]'};
$sender-MailFile({
to = '[EMAIL
Till,
This code will allow you to create and execute a process on a remote Win2k
machine. Perhaps you can start Internet Explorer or Notepad pointing to a
file on your LAN.
James
use Win32::OLE;
$RemoteMachine = WksName;
$WMI =
Rick,
Here is one way to do it using the Windows Management Interface.
James
use Win32::OLE qw(in);
$WMI = Win32::OLE-GetObject(winmgmts:);
$enum = $WMI-ExecQuery(SELECT * FROM Win32_Printer);
foreach $obj ( in $enum ){
if (($obj-Attributes 4) ne 0 ){
print
13 matches
Mail list logo