Results 1 to 6 of 6

Thread: Batch File Problem

  1. #1
    Member
    Join Date
    Sep 2007
    Posts
    51

    Angry Batch File Problem

    Hey Guys,

    i am trying to create a batch file to copy the required ".dll"s for a program that i have written (i.e. a kind of primitive install). but, i can't get the following batch file commands to work.

    Code:
    MD "c:\windows\winsxs\x86_microsoft.vc80.debugcrt_1fc8b3b9a1e18e3b_8.0.50727.762_none_24c8a196583ff03b\"
    COPY ".\Lib\MSVCR80D.DLL" "c:\windows\winsxs\x86_microsoft.vc80.debugcrt_1fc8b3b9a1e18e3b_8.0.50727.762_none_24c8a196583ff03b\msvcr80d.dll"
    i believe the problem is that i'm trying to create a directory in a protected system dir, and to copy a file to a protected system dir. does anyone know of a way around this, or does anyone have any ideas?

    i intend to pass this program on to people, via CD. So, if anyone knows how i could include the ".dll"s on the CD, and remove the need for any installation this would be even better. As my program is only very small, but i don't think this is possible. i am using MS Visual Studio, so if anyone knows how to force VS to use static libraries, that would be ideal.

    i would be very grateful for any help.


    thank you (in advance),

    user0182
    Last edited by user0182; May 3rd, 2008 at 08:51 PM.

  2. #2
    Senior Member
    Join Date
    Oct 2003
    Location
    MA
    Posts
    1,052
    I dont think it matters where you put the dlls as long as you run a regsvr32 on each of them

  3. #3
    Member
    Join Date
    Sep 2007
    Posts
    51
    if i use regsvr32 to register the ".dll"s, am i right in thinking that this would mean i could copy the ".dll"s to anywhere on the target machine, and then add one regsvr32 command line to the batch file for each DLL?

    - user0182

  4. #4
    Senior Member
    Join Date
    Oct 2003
    Location
    MA
    Posts
    1,052
    Correct I think it would be like
    COPY ".\Lib\MSVCR80D.DLL" "c:\windows\system32\msvcr80d.dll"
    regsvr32 /s "c:\windows\system32\msvcr80d.dll"

  5. #5
    Senior Member
    Join Date
    Jul 2001
    Posts
    420
    I don't think you need to use regsvr32 with the DLL. I think you need to modify the path statement to point to where the DLL's are copied.

    Cheers,
    D
    If you spend more on coffee than on IT security, you will be hacked. What\'s more, you deserve to be hacked.
    -- former White House cybersecurity adviser Richard Clarke

  6. #6
    Senior Member
    Join Date
    Oct 2003
    Location
    MA
    Posts
    1,052
    that would also work, yes.

Similar Threads

  1. 4 steps to making your computer immortal online.
    By ali1 in forum The Security Tutorials Forum
    Replies: 27
    Last Post: January 1st, 2004, 11:59 AM
  2. Newbies Guide to Batch Programming
    By Deimos326 in forum Other Tutorials Forum
    Replies: 3
    Last Post: December 7th, 2003, 11:18 PM
  3. Batch programing (Tips and Tricks)
    By ele5125 in forum Other Tutorials Forum
    Replies: 9
    Last Post: June 19th, 2002, 05:09 PM
  4. The Worlds Longest Thread!
    By Noble Hamlet in forum AntiOnline's General Chit Chat
    Replies: 1100
    Last Post: March 17th, 2002, 09:38 AM

Posting Permissions

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