batch file

Discussion in 'OT Technology' started by Bob from Marketing, Aug 13, 2004.

  1. Bob from Marketing

    Bob from Marketing OT Supporter

    Joined:
    Jul 11, 2004
    Messages:
    29,608
    Likes Received:
    1
    Location:
    A traveler of both time and space
    I need to make a batch file that will copy files from a remote computer.

    Then after it copies them, I need it to register certain files with microsoft register server.

    Then I need the machine to reboot.

    I can copy the files fine with the batch, but I dont know how or if its possible to register the files then have the computer reboot.

    I need this to work on 98 and 2000 machines.

    Any help with this would be great. :bowdown: :bowdown:
     
  2. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    a) resetting the computer is easy. You can use the shutdown.exe command in windows 2000, and in windows 98:

    Win98/ME RUNDLL32 SHELL32.DLL,SHExitWindowsEx n

    See Remarks n can be any combination (sum) of the following numbers:
    0 Logoff
    1 Shutdown
    2 Reboot
    4 Force
    8 Poweroff (if supported by the hardware)

    Or if you want a tool to do any Windows 95 + machine:

    http://users.pandora.be/jbosman/pwroff30.zip

    b) I don't know what you mean by registering the files. I know you can force registry settings to be applied without prompting by using

    regedit /s regentry.reg

    if that's what you were asking
     
  3. Bob from Marketing

    Bob from Marketing OT Supporter

    Joined:
    Jul 11, 2004
    Messages:
    29,608
    Likes Received:
    1
    Location:
    A traveler of both time and space
    basically I am updating software on the computer, I am copying over a bunch of .dll files that need to be registered. Instead of clicking each one and registering it I want to do it automated
     
  4. Scoob_13

    Scoob_13 Anything is possible, but the odds are astronomica

    Joined:
    Oct 5, 2001
    Messages:
    73,783
    Likes Received:
    38
    Location:
    Fort Worth. Hooray cowgirls.
    I think he means that he wants to use regsvr32 whatever.dll within a batch file.

    As long as you know the names of the files you need to register, you can use it in a batch file.
     
  5. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    How do you manually register a .dll?
     
  6. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    Oh I get it - yeah has a /s switch too.
     
  7. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    And if you didn't know the filenames, you could create a batch file to create another batch file with a list of dll's in a specific directory. Then you call the second batch file from within the first one.

    Got it ;)
     

Share This Page