Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Discussions

RichardRudek RichardRudek So what do you expect for nothin'... :P
  • VS 2008 build time increased by factor of 50 over VS2005

    To post an image, you first need to upload the image to site accessible from the Internet. For example, I use imageshack.us.

    Once it's uploaded, you then recover the link (URI) for it, then in the C9 editor, switch to the HTML view (see the two tabs below, where it says Design and HTML), then find the point where you want to paste the image, and paste in the actual HTML.

    When you switch back to the Design view, you should be  able to see the image.

    Anyway, here is a screenshot of the same thing in in VS2005 Pro (Click the image to see it full size):




    And here are the Links to the appropriate documentation for [VS2008] and [VS2005]

  • Create Shared Folder Using Batch File or VBS

    Greg M wrote:
    

    Hi again, Richard!

     

    First of all, many thanks for all the effort you're putting into helping me with this.  I posted this query on one or two other forums & not only did I not get help, I didn't get even a response!

    Sorry, I should have mentioned that I'm using XP Home Edition, so features such as gpedit.msc just don't exist.  Similarly, the link you posted regarding Group Policies isn't applicable, as I don't have any such policies.

    Yeah, that's fine. I'm merely stating that on an XP Pro system, the 'Everyone' permissions no longer applies to the 'Guest' account (or the Guests group ?).

    However, knowing that, I'm not sure what the situation is with Home. But given that Home forces all network users to 'impersonate' a Guest, doing this would stop networking altogether, because of the default behaviour of the sharing wizard(s) - using 'Everyone' when setting the ACL.

    Anyway..

    Greg M wrote:
      Another point (I don't know if it's relevant or not) is that there's nothing listed ("there are no items to show in this view") in the Sessions panel of the Computer Management tree.

    Yes, you need to have an active session. It also does not refresh itself, so you do have to use the refresh option. This shot is from XP Home, which I have running in a Virtual PC :


    Greg M wrote:
    
    I've searched through the registries on each pc & the entries are quite consistent - i.e. wherever there's an entry for Folder A1 on pc A, there's an equivalent one for folder B1 on pc B; likewise for folders A2 & B2.

    And your searching the Registry because ?

    Greg M wrote:
    
    The thing that puzzles me is the fact that folder A2 is openable on pc B, but folder B2 is not openable on pc A.  As far as I'm aware, each pc has the same "status" - i.e. there's no master/slave or client/server arrangement, and each folder has been set up in an identical manner on each pc.


    I thought I'd answered that. Have you tried adding 'Everyone' to B2's Access Control List (ACL) ?

    Here an example session I just did on my XP Home Virtual PC:


    C:\...>cacls c:\temp
    c:\TEMP Everyone:(OI)(CI)C
    BUILTIN\Administrators:(OI)(CI)F
    NT AUTHORITY\SYSTEM:(OI)(CI)F
    VPC-XPH-1\rr:F
    CREATOR OWNER:(OI)(CI)(IO)F
    BUILTIN\Users:(OI)(CI)R
    BUILTIN\Users:(CI)(special access:)
    FILE_APPEND_DATA

    BUILTIN\Users:(CI)(special access:)
    FILE_WRITE_DATA



    C:\...>cacls c:\temp /e /r Everyone
    processed dir: c:\TEMP

    C:\...>cacls c:\temp
    c:\TEMP BUILTIN\Administrators:(OI)(CI)F
    NT AUTHORITY\SYSTEM:(OI)(CI)F
    VPC-XPH-1\rr:F
    CREATOR OWNER:(OI)(CI)(IO)F
    BUILTIN\Users:(OI)(CI)R
    BUILTIN\Users:(CI)(special access:)
    FILE_APPEND_DATA

    BUILTIN\Users:(CI)(special access:)
    FILE_WRITE_DATA


    C:\..>cacls c:\temp /e /g Everyone:C
    processed dir: c:\TEMP

    C:\...>cacls c:\temp
    c:\TEMP Everyone:(OI)(CI)C
    BUILTIN\Administrators:(OI)(CI)F
    NT AUTHORITY\SYSTEM:(OI)(CI)F
    VPC-XPH-1\rr:F
    CREATOR OWNER:(OI)(CI)(IO)F
    BUILTIN\Users:(OI)(CI)R
    BUILTIN\Users:(CI)(special access:)
    FILE_APPEND_DATA

    BUILTIN\Users:(CI)(special access:)
    FILE_WRITE_DATA

    First I list the current ACL of a folder that was shared using the Sharing wizard.

    I then revoke 'Everyone' from it's ACL.

    Then I add "Everyone' back.

  • Converting bits and bytes

    evildictaitor wrote:
    
    RichardRudek wrote:
    Others, though, may prefer them to be written with their least signicant bit on the left  - left to right style.


    That would be bizzare. We don't write numbers in left to right significantness (e.g. two-hundred and thirty-seven isn't 732) and your processor doesn't expect that for binary either.

    [RFC791] is one I came across, recently. Section 3, header ASCII art, etc ... :O
    evildictaitor wrote:
    
    Now processor word-endianness is another matter entirely...

    So I take it you subscribe to the notion of there being too many chiefs, and not enough endians, then ... Cool

  • Converting bits and bytes

    This works for me:

        Dim data(0) As Int32
    data(0) = &HA0311A80
    Dim myBits As New BitArray(data)
    Dim myBytes(((myBits.Length + 7) \ 8) - 1) As Byte 'Use Integer Division ; zero-based.
    myBits.CopyTo(myBytes, 0)

    Dim s As String, t As String
    For Each d As Byte In myBytes
    s = s & Hex(d) & " "
    Dim a(0) As Byte
    a(0) = d
    Dim ba As New BitArray(a)
    For Each b As Boolean In ba
    t = CStr(IIf(b, "1", "0")) & t
    Next
    t = " " & t
    Next
    s = s & t

    The console output being:

    80 1A 31 A0  10100000 00110001 00011010 10000000

    One to note is that the binary to string converstion required me to build from right to left (classical/numerical style), which is the way I write my binary numbers. Others, though, may prefer them to be written with their least signicant bit on the left  - left to right style.


  • Create Shared Folder Using Batch File or VBS

    Greg M wrote:
    

    Hi Richard,

    Complicateder and complicateder!

    Security is a PITA.

    Greg M wrote:
    
    Thanks for your reply, but it seems I'm not out of the woods yet.

    The home network is quite simple - pc A and pc B connected directly using a crossover cable.  Pc A connects directly to the internet, pc B connects to the internet via pc A.  Windows XP with SP2 is installed on both pc's.

    What versions of XP: Home, Professional, Media Center ?

    This can be important because Home has limited networking features. For example, all Network accesses get  'down-graded' to "Guest" user account access. You can see this yourself using the "Sessions" console, under Shared Folders of the Managment Console - right-click My Computer, Manage, then drill down to it on the left.

    Greg M wrote:
    
    There are two folders on pc A, called A1 and A2, and two folders on pc B, called B1 and B2.

    Folder A1 was set as shared using Explorer, with the sharename A1share; folder A2 was set as shared using the command line statement: Net Share A2share=G:\A2

    Folder B1 was set as shared using Explorer, with the sharename B1share; folder B2 was set as shared using the command line statement: Net Share B2share=G:\B2

    OK, so clearly the NET SHARE command is not a replacement for the Shell's Share wizard. I've not experimented to confirm this, but it appears that it simply retains any existing 'default' permissions. Those defaults will then depend upon what folder your sharing, and whether it's been though the Shell's Sharing wizard already or not.

    Greg M wrote:
    
    Folders A1share and A2share are visible and "openable" on pc B

    Folders B1share and B2share are visible on pc A, but
    Folder B1share is "openable" on pc A
    Folder B2share is NOT "openable" on pc A

    [snip]
    Greg M wrote:
    
    On pc B the command Cacls G:\B1 produces the following output:
    g:\B1 Everyone:(OI)(CI)C
          BUILTIN\Administrators:(OI)(CI)F
          NT AUTHORITY\SYSTEM:(OI)(CI)F
          GREGSCOMPUTER\Greg:F
          CREATOR OWNER:(OI)(CI)(IO)F
          BUILTIN\Users:(OI)(CI)R
          BUILTIN\Users:(CI)(special access:)
                FILE_APPEND_DATA
          BUILTIN\Users:(CI)(special access:)
                FILE_WRITE_DATA

    On pc B the command Cacls G:\B2 produces the following output:
    g:\B2 BUILTIN\Administrators:(OI)(CI)F
          NT AUTHORITY\SYSTEM:(OI)(CI)F
          GREGSCOMPUTER\Greg:F
          CREATOR OWNER:(OI)(CI)(IO)F
          BUILTIN\Users:(OI)(CI)R
          BUILTIN\Users:(CI)(special access:)
                FILE_APPEND_DATA 
          BUILTIN\Users:(CI)(special access:)
                FILE_WRITE_DATA
     
    Any suggestions regarding the different output from the Cacls command on the two pc's, or regarding what needs to be tweaked in order to have folder B2share "openable" on pc A?

    Best regards,

    Greg M



    I've highlighted the fact that B1 has the 'Everyone' user account listed in it's ACL, with change permissions. As mentioned earlier, XP Home wil downgrade the user account being used via the Network, back to Guest account access.

    If my memory is correct, the 'Everyone' user account usually includes Guests, though with recent security updates (perhaps not with Home, I'm not sure), Guest accounts are specifically excluded from the 'Everyone' account via Group Policy. On an XP Pro system, you can check this via the Group Policy console: Start, Run: gpedit.msc

    When I do this on one of my XP Pro systems, I can't find a specific entry that I remember (I'm getting old, though). I did find this one, though, under Security options:

  • Converting bits and bytes

    Looks like a Big endian/Little endian problem.

    You could explain how you obtain the Actual Result. Is this after some kind of comms between the PC and device ?  Over what type of interface, etc.

  • .NET Advantages

    amit_trehan wrote:
    
    Before coming to this forum, I had collected ample information. I just wanted to validate the info or get some new points.

    And about implementation, people do that too. People who doesn't want to share information this is not the place for them.


    Ha ha. So where is your 'ample' information... Expressionless

  • Issues with IE6 secondary windows

     Are you sure about the CPU load  when filtering ? For example, here's one of my systems, when filtering out uninteresting  processes.



    Similarly, you can just disable the File and Process activities, limiting yourself to just Registry events.

    In terms of debugging, there also a slew of other things you can do, starting with the obvious, built-in auditing, through to [registering for WMI events]. It all comes down to your capabilities, and desires...

  • Create Shared Folder Using Batch File or VBS

    Greg M wrote:
    Hi Richard,
    As far as I can tell, NETSHARE doesn't set any permissions for the shared folder & I think this is the stumbling block.  I would like "Everyone" to have full access to the folder.

    Any ideas on how to proceed?


    Try CACLS for CMD/Batch:
    C:\...> cacls

    Displays or modifies access control lists (ACLs) of files

    CACLS filename [/T] [/E] [/C] [/G user:perm] [/R user [...]]
    [/P user:perm [...]] [/D user [...]]
    filename Displays ACLs.
    /T Changes ACLs of specified files in
    the current directory and all subdirectories.
    /E Edit ACL instead of replacing it.
    /C Continue on access denied errors.
    /G user:perm Grant specified user access rights.
    Perm can be: R Read
    W Write
    C Change (write)
    F Full control
    /R user Revoke specified user's access rights (only valid with /E).
    /P user:perm Replace specified user's access rights.
    Perm can be: N None
    R Read
    W Write
    C Change (write)
    F Full control
    /D user Deny specified user access.
    Wildcards can be used to specify more that one file in a command.
    You can specify more than one user in a command.

    Abbreviations:
    CI - Container Inherit.
    The ACE will be inherited by directories.
    OI - Object Inherit.
    The ACE will be inherited by files.
    IO - Inherit Only.
    The ACE does not apply to the current file/directory.

  • Issues with IE6 secondary windows

    I don't know.

    In terms of debugging, use filters on Process Monitor to limit what it logs to just things involving those DLL's, and/or their respective Registry keys.

    You could also try changing the permissions on their Registry keys so only one particular (adminstrative) account has the appropriate permissions to delete/modify them - the rest only getting 'Read' permissions (Query, Notify, Enum, Read).

    Of course I'm assuming this is not a Domain-related issue.