Jump to content

MrJinje

Developer
  • Posts

    1,031
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Posts posted by MrJinje

  1. I've uploaded 1.4.7 which just adds credits to Aviv00. I've noticed how bad/messy/un-organised the code is. :(

     

    So if anyone is interested, I'm willing to tidy it up a bit? Possibly add a GUI to it (but still have the same commands).

     

    I wrote this a week or three ago, the packages tabpage is basically an install_wim_tweak gui.  It does wildcards, unhides single packages, pre-populated drop-down list, etc.  All credits to Lite8 / Aviv00 for the original idea back in 2008 that everyone has since stolen. 

     

    380467687a69e22308fee990e334135c.png

  2. 1) No they are not duplicated.  

    2) Yes of course.

     

    Here is a powershell snip that prints out net use commands for proof of concept.

    $MAPS = Get-Item HKCU:\Network\*ForEach ($MAP in $MAPS) {    $KEY = ($MAP).name    $UNC = (Get-ItemProperty -Path "registry::$KEY" -Name "RemotePath").RemotePath    $LETTER = Split-Path -Path $KEY -Leaf    Write-Host "Net Use "$LETTER": "`"$UNC`"    Write-Host "Net Use "$LETTER": /DELETE /YES"}
  3. The top key is a letter and the value "RemotePath" is the path.  Those two values are all you need. 

    Windows Registry Editor Version 5.00[HKEY_CURRENT_USER\Network][HKEY_CURRENT_USER\Network\Z]"RemotePath"="\\\\vmware-host\\Shared Folders"

    So from a programming stand point, just loop through HKCU\Network, look for top level keys (which are single letters), and read it's RemotePath value.   Use the net mapping API as it will perform faster than "Net Use".   ad infinitum OnLoad event. A second loop removes them during the OnClose event.

     

    That setting Andre mentions requires a reboot before it takes effect, re-mapping of pre-existing drives on the fly does not.  The effect is instantaneous.  Very easy to do.  No need to make permanent settings on every machine.

    Net Use Z: \\vmware-host\Shared Folders

    EDIT: I read the article you linked, it seems they back up my story, but for different reasons.

     

    Update for Windows 8

    It appears that the EnableLinkedConnections setting is not always working correctly on Windows 8: if a standard user has created a mapped network drive pointing to a subfolder of a shared folder (for example, drive Z: connected to //server/share/subfolder), then the elevated user will see the drive Z:, but it will be pointing to the root share, //server/share/, not to the subfolder.
     

    If this error creates a problem for you, then it’s better not to use the EnableLinkedConnections registry fix at all. Instead, just create the mapped network drive twice: first time using a standard user’s account, and the second time using an administrator account. Sure, it’s twice the work, but it should work correctly in all situations.

  4. Test box is a Windows 8.1 x86 inside vmware.    Opened NTLite after installation, attempted to browse.  Did not see the mapped Z: drive which is mapping to shared folder on host machine.

     

    I manually mapped the drive via net use command in elevated cmd.exe window and NTLite could see the drive.

  5. On every machine I plug this into ?  Last I checked, it's $249 for the USB corporate version.   Imagine some of my clients won't like me introducing another 24/7 security risk to their domains.

     

    Why not a loop routine during the onopen and onclose events.   Temporary mapping, only for the duration of NTLite, un-map them afterwords, leaving no trace.

  6. Threw that p/invoke inside an add-type so you might not need an external.exe for this trick. 

    Add-Type -Language CSharp -TypeDefinition @"using System;using System.Runtime.InteropServices; namespace FejesJoco{    public class Program    {        [DllImport("shell32.dll", EntryPoint = "#262", CharSet = CharSet.Unicode, PreserveSig = false)]        public static extern void SetUserTile(string username, int whatever, string picpath);         [STAThread]        public static void Main(string[] args)        {            SetUserTile(args[0], 0, args[1]);        }    }}"@[FejesJoco.Program]::Main("Maxxpsoft" "%systemdrive%\Install\Maxxpsoft.jpg")
×
×
  • Create New...