one end user maybe, but many other "users" too. SYSTEM, NETWORK SERVICE, LOCAL SERVICE are but a few others. Maybe this will help, i use it to identify who runs my code from a console

use Win32; my $user = Win32::LoginName();
If you can put your process into sleep for a bit and can identify it from this list this may help
use strict; use warnings; use DBI; use DBD::WMI qw/connect prepare execute fetchrow/; use Win32::OLE qw/in/; # needs DBD::WMI # http://search.cpan.org/~corion/DBD-WMI-0.07/lib/DBD/WMI.pm # corion@cpan.org http://www.perlmonks.org/?node_id=5348 # http://www.perlmonks.org/?node_id=565819 #clues from # http://www.perlmonks.org/?node_id=821593 # https://gist.github.com/aero/1260973/6efbe8684aa54c8aecb73f601e511a5 +3bfb5c6b1 # https://msdn.microsoft.com/en-us/library/aa394388(v=vs.85).aspx # https://msdn.microsoft.com/en-us/library/aa394084(v=vs.85).aspx my $dbh = DBI->connect('dbi:WMI:'); sub do_table{ my @tables=@_; table: for my $table (@tables){ my $sth = $dbh->prepare('SELECT * FROM '.$table); unless ($sth->execute()) { print 'Unable to select from:'.$table." +\n"; next table;} print 'Table:'.$table."\n"; my $rowct=0; while (my( $row ) = $sth->fetchrow) { print ' row:'.$rowct++."\n"; foreach my $object ( in($row->{Properties_}) ) { my $outline=" $object->{Name} = "; if ( ref($object->{Value}) eq "ARRAY") { $outline.="{ "; foreach my $value ( in($object->{Value}) ) {$outline.="$va +lue ";} $outline.="}"; } else { $outline.=($object->{Value} // ""); } print $outline."\n"; } # $object } # thing } # table } # do_table do_table("Win32_Process");


In reply to Re^3: VSS automation strange problem by huck
in thread VSS automation strange problem by cormanaz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.