-
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
-
I dont think it matters where you put the dlls as long as you run a regsvr32 on each of them
-
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
-
Correct I think it would be like
COPY ".\Lib\MSVCR80D.DLL" "c:\windows\system32\msvcr80d.dll"
regsvr32 /s "c:\windows\system32\msvcr80d.dll"
-
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
-
that would also work, yes.