Jump to content

Mijzelf

Member
  • Posts

    464
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    country-ZZ

Posts posted by Mijzelf

  1. The closest I can think of is using MS Script Encoder.

    Create a script doing the job:

    function Mount()
    {
    var net;
    net = new ActiveXObject("WScript.Network");
    net.MapNetworkDrive("S:", "\\\\192.168.1.64\\blob$","False","user","password");
    close();
    }

    Save it as mount.js. Use the scriptencoder to encrypt it:

    screnc mount.js mountenc.js

    Create a hta file:

    <HTML>
    <HEAD>
    <script LANGUAGE="JScript.Encode" >
    </SCRIPT>
    </HEAD>
    <BODY onLoad="Mount()" >
    </BODY>
    </HTML>

    and insert the contents of the encoded file between the <script> tags. Save as mount.hta.

    Doubleclicking the .hta file should do the job.

    It wouldn't surprise me if there are script decoders around on the internet, so it isn't rocksolid.

  2. but for what I am working on I am trying to work with what comes in the box with Windows, since I dont want to add too much additional stuff.
    JScript is as available as VBScript. It's the same engine (WScript.exe or CScript.exe), only a different syntax. Your code in JScript would be:
    var strConnection = "RAS";
    var strUsername = "UserXYZ";
    var oShell;

    oShell = WScript.CreateObject ("WScript.Shell");

    // run command and wait for it to exit
    oShell.Run("rasdial.exe " + strConnection + " " + strUsername, 1, true);

    save as .js file, and it just works.

  3. A DWORD is 32-bit, which should be able to have a number as large as 2 GB, no?
    No. Strictly spoken a DWORD is unsigned, and thus can contain a number as large as 4GB.
    So I finally investigated using GetLastError() and FormatMessage(), and it turns out that the buffer I'm allocating it too small. I'm not sure why.
    The documentation of GetWindowText() says ' GetWindowText causes a WM_GETTEXT message to be sent to the specified window or control'. Reading further in the documentation of WM_GETTEXT: 'Rich Edit: If the text to be copied exceeds 64K, use either the EM_STREAMOUT or EM_GETSELTEXT message.'

    So it's not explicitely stated that GetWindowText() won't work, but it's at least discouraged to try it.

    Anf you did already find the suggested solution.

    BTW, the documentation of GetWindowTextLength() states that the returnvalue can be bigger than the actual size. So in your code you should use the returnvalue of GetWindowText() to determine the actual size.

  4. Your USB ports are 1.1. USB 1.0 is rare.

    Maybe you´d be better off putting an USB 2 PCI card in your system, as USB 1.1 is awfully slow. (About 1MB/sec, so it will cost 320000 seconds ~ 4 days to fill that 320 GB disk.)

    You can format it to one 320 GB fat32 partition, but it´s safer to create several partitions < 128GB, because W98 scandisk and defrag cannot handle bigger partitions. (It´s not a good idea to use defrag via USB 1.1 though).

    BTW, fat32 is the only choice you have.

     

  5. No, not without some extra administration. Each call of exec will have a different this pointer, so all calls have to be done. But you can write a linked list or something like that, to automate that:

    class C {
      C(): m_pNext( m_pRoot )
      {
      m_pRoot = this;
      }
      virtual void exec();

      void exec_all()
      {
      for( C *pc = m_pRoot; pc; pc=pc->m_pNext )
      pc->exec();
      }

      C *m_pNext;
      static C *m_pRoot;
    };

    C *C::m_pRoot = 0;
     
    class A : public C {
      void exec();
    };
     
    int main() {
      A a1,a2;
      a1.exec_all();
    }

    When the list is dynamic, you'll have to write a C destructor which skips the object from the list.

  6. Then I googled a bit and stumbled upon an article which said that windows that are older than XP don't work on dual core PCs (I tried installing windows 2000 just to check if that's really true and it didn't work too! I got a blue screen saying "inaccessible boot device").
    That statement isn't true. All Windows NT flavours, including W2000 support multiprocessor. That you can't install W2000 is probably caused because it doesn't natively support SATA. If you want W2000 on that laptop search the W2000 forum for installing on SATA.
  7. Also will this allow devices attached to be seen while in DOS?
    Depends on what you mean. For dos it's doesn't matter if an USB controller is onboard or on a PCI card. It's just a PCI device. So devices which are not accessable with the onboard controller, will not automagically be accessable with the PCI card.

    On the other hand, some BIOSses have 'legacy support' for certain USB devices like mass storage devices and mice. They emulate a standard IDE disk or a ps2 mouse when they detect such a device during boot. This makes this device is accessable from dos. I don't think in this case it will also accessable if plugged in the new controller.

    But if you have dos drivers for your device, it doesn't matter.

  8. No, of course not. Your USB1 host controller cannot provide USB2 speed, regardless which cable you use. If thydreamwalker gets USB2 speed, he has an USB2 controller without knowing it.

    Just plugin an USB2 controller. I wouldn't be surprised if it's cheaper than that Belkin cable.

  9. I can hardly imagine that it's a cryptographic key, because the registry keyname itself is part of the data. The only way to find the regkey if you don't know it's name is enumerating al keys in HKLM/Sw/Ms, en decide for each key if it could be the searched data. This is hard, especially if the name could be everything.

    I used regmon to find if something is reading that key. Started it from RunServicesOnce (the earliest moment to start anything). Tried to start everything in the startmenu, but it didn't find anything. (Except regedit, duh!)

  10. I suppose they will transfer slow as my computer doesn't have a USB2 slot.
    You realize that it will last 500000 seconds ~ 1 week to fill a 500GB disk with USB 1 transfer speed?

    BTW, while you can create and use 500GB partitions, W98 scandisk and defrag should not be used on partitions bigger than about 126GB (the FAT size may mot exeed 16MiB minus 64 KiB). I have read somewhere the WinME tools doesn't have this problems. This is a bit imaginary in this case, since you don't want to scandisk a 500GB partition via USB1. It will take days to finish.

×
×
  • Create New...