Results 1 to 8 of 8
  1. #1
    Star Lounger
    Join Date
    Jan 2003
    Location
    San Francisco, California, USA
    Posts
    93
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Identifying Corporate Computer (VBA/Windows 2000/Word 2000)

    Hello All,

    How can I identify if my global template is installed on one of our corporate computers? I know there is a dll, api, or other reference that I can access under Tools, References but I don't know which one to pick. I basically want prevent people from stealing my template and using it at other companies. Is this possible?

    Thanks,

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Identifying Corporate Computer (VBA/Windows 20

    Can you describe the scenario in a bit more detail?

    Example: when the template loads or a procedure is called, I want to check the path of the template and, if it is on a local computer (not a networked drive), take some action.

    Example: when the template loads or a procedure is called, I want to check that the company name in File>Properties...>Summary tab>Company matches our company, otherwise take some action.

  3. #3
    Star Lounger
    Join Date
    Jan 2003
    Location
    San Francisco, California, USA
    Posts
    93
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Identifying Corporate Computer (VBA/Windows 20

    Okay I'll try. I'm not a network administrator but here goes:

    My global template exists in Word's Startup folder. I was wondering when Word starts and my AutoExec procedure runs if there was a way I could validate or identify the network or if the computer is owned by our corporation.

  4. #4
    Star Lounger
    Join Date
    Jan 2003
    Location
    San Francisco, California, USA
    Posts
    93
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Identifying Corporate Computer (VBA/Windows 20

    Also,

    If the network/computer could not be validated (or identified) then my macros would not run.

  5. #5
    4 Star Lounger
    Join Date
    Dec 2003
    Location
    Zoetermeer, Zuid-Holland, Netherlands
    Posts
    559
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Identifying Corporate Computer (VBA/Windows 20

    A simple and by no means hacker-proof solution that I use for the same purpose:
    1. all PC's in our company have a little text file containing, among other things, the IT-department's hardware identification number of that PC, the version of the OS, etc. This hidden file exists in the root of the C-drive of all our company PC's and notebooks.
    2. in code, the existence of that file, which has always the same name, is checked. If not present, then display a warning message and quit the code.
    3. the VBA project code is protected with a password (which I don't give to anybody, not even system administrators! It's only stored in a sealed envelope in a safe, to be opened only in an emergency' by one of the managers.)

    As I said, not very sophisticated, but effective. I've had a few requests from co-workers to reveal why it did not work on their home PC...

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Identifying Corporate Computer (VBA/Windows 20

    Such a scheme is effective only if you have well-behaved users.
    It is all too easy to bypass, pun intended, the password protection of a VBA project.

    A bit better would be to encode the info, rather than use straight text in the file.

    To better protect the code used to validate the file, you really need to compile the critical code into a VB 6 DLL.

  7. #7
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Identifying Corporate Computer (VBA/Windows 2000/Word 2000)

    To protect the template, one needs to use a front-end protection product such as ProtectionPlus from http://www.sotwarekey.com.
    Even then, there are no guarantees.

  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Identifying Corporate Computer (VBA/Windows 20

    I think there are many ways to do this, but there is one big catch: the "password" protection on code in templates is extremely weak. If, for example, you open the template in StarOffice 6.0, the VBA modules are imported to StarBasic modules, with every line prefixed with REM (if I recall correctly). You might need to compile your code as a COM Add-in after you've chosen your method of phoning home.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •