Endless Paradigm

Full Version: CMD Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys,

I'm trying to write a .bat that involves copying 3 dll files to the System32 root directory and registering them. It's for Windows Vista / 7 users and I know that you need admin rights to do anything to the OS drive. This is what I have so far:

Code:
@ECHO OFF
ECHO This will allow you to use BVE2 on Vista (and later) by doing the .dll register trick.
pause
copy d3drm.dll %SystemRoot%\System32
copy dx7vb.dll %SystemRoot%\System32
copy dx8vb.dll %SystemRoot%\System32
cd %SystemRoot%\System32
regsvr32 dx7vb.dll
regsvr32 dx8vb.dll
ECHO It's done now. Enjoy!
pause


The problem is that I can't get the copy procedure to work. If I run the script as admin, it says that the files cannot be copied or cannot be copied onto itself. If I don't run the script under admin, the copy works but the regsvr32 won't. Reworking it, I figured that I need to launch another cmd under admin after the copy so that the regsvr32 functions can be done. The thing is that I don't know the command for it. (If one such exists) If any of you guys can help, that would be appreciated.

-DC

create 2 seperate scripts one that copys with admin then one you run as admin for regserv
There's no way to combine them into one whole script?

I tried them separate and cmd cannot find the file specified. >.>
lol, batch.

bash for the win.
i think those D3D file are system protected, u have to take their ownership before over-write them
Yeah, Vista's security is really annoying.

runas, setacls, IDK, give them a try.
Reference URL's