RE: Logging output of command.com

2003-10-12 Thread Krummel, James C - PGGC-6
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

RE: Where am I going wrong with OLE and MS Word?

2003-09-02 Thread Krummel, James C - PGGC-6
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

RE: I want your MAC!

2002-11-06 Thread Krummel, James C - PGGC-6
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.

RE: Desktop shortcut

2002-10-25 Thread Krummel, James C - PGGC-6
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} =

RE: Desktop shortcut

2002-10-25 Thread Krummel, James C - PGGC-6
-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

RE: Adding a Timer in Win32::GUI

2002-10-08 Thread Krummel, James C - PGGC-6
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

(no subject)

2002-08-20 Thread Krummel, James C - PGGC-6
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

RE: GetTcpTable API?

2002-05-10 Thread Krummel, James C - PGGC-6
: 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

RE: Perl Compiler

2002-03-25 Thread Krummel, James C - PGGC-6
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

RE: MSAccess file format question...

2002-02-28 Thread Krummel, James C - PGGC-6
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);

RE: sending a file as an e-mail Attachment using Perl

2002-02-27 Thread Krummel, James C - PGGC-6
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

RE: remotely invoked win32 popup box

2002-02-22 Thread Krummel, James C - PGGC-6
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 =

RE: Windows Default Printer

2002-01-30 Thread Krummel, James C - PGGC-6
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