Reply to Thread

Post a reply to the thread: Set Computer Name

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 11-03-2004, 08:19 AM
    linder

    Re: Set Computer Name

    Thank you for your suggestion. Good idea. It's on the drawing board now
  • 11-03-2004, 06:25 AM
    sphair

    Re: Set Computer Name

    Calling into DLLs works like a charm yes. We use this alot in our installation script.

    But maybe it would be an idea to implement (later, not now a function which reflects the Get System Information, which is called Set System Information, which lets you select from a dropdown common system configurations settings like Set Computer Name.
  • 11-03-2004, 12:13 AM
    linder

    Re: Set Computer Name

    Hi Geoff,

    Yes, that's correct ;-) You can directly call most Windows API functions from within the script. And of course, you can add your own DLLs (unlimited number) and call into your own functions.

    Thanks,
  • 11-02-2004, 04:35 PM
    gspillane

    Re: Set Computer Name

    Hi Friedrich,

    This is great. Does this mean that I can call most API functions direct from their Windows DLL without having to go through the hassle of prototyping, creating a lib, and a Clarion DLL etc?

    Best Regards,
    Geoff Spillane
    Data Down Under
  • 11-02-2004, 06:54 AM
    linder

    Re: Set Computer Name

    You can do the following:

    1) Set Variable %NEWCOMPUTERNAME% to YourNewComputerName
    2) Use "Call DLL Function" with the following parameters:

    Library: kernel32.dll
    Function: SetComputerNameA
    Calling Convention: __stdcall
    Parameter Types: *string
    Function Parameters: %NEWCOMPUTERNAME%

    If the function succeeds, the %_SB_RETURN% value is a nonzero value.

    Applications using this function must have administrator rights. You have to reboot the machine.

    Does this help?
  • 11-01-2004, 05:49 PM
    gspillane

    Re: Set Computer Name

    Hi Sphair,

    I don't know if it's as simple as a registry entry but I suspect not because I found an API called SetComputerName. I haven't tried it but I expect it's what you want. If this is the case, unless Friedrich adds it as a function you would have to write it into a short DLL and call the function. Let me know if you need any help, the API looks pretty easy and Friedrich's DLL's are a dream.

    Best Regards,
    Geoff Spillane
    Data Down Under
  • 11-01-2004, 06:59 AM
    sphair

    Set Computer Name

    I need to set the computer name during installation. Does anyone know if I can do this through registry or something? Any tips welcome.

Posting Permissions

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