Post Reply 
CMD Help
Author Message
demonchild
Thinks Zinga Up To Something

Posts: 1,185.3522
Threads: 132
Joined: 23rd Mar 2008
Reputation: -4.56241
E-Pigs: 97.4501
Offline
Post: #1
CMD Help
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:
1
2
3
4
5
6
7
8
9
10
11
@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


‫‬‭‮‪‫‬‭‮‫‬‭‮‪‫‬‭[Image: Kamakazi.jpg]
Mr. Sim Pilot - One's Tale of Adventure - Coming Soon ... or whatever
Spoiler for SkyDX's gift.:
[Image: demonchildiq2.png] Thanks!
Assassinator Wrote:
demonchild Wrote:Because even pirates pirate free stuff.

Because pirates even pirate free stuff.

Important. Lol.
24/05/2009 05:59 PM
Visit this user's website Find all posts by this user Quote this message in a reply
squee666
Grand Warlock

Posts: 3,566.4225
Threads: 351
Joined: 4th May 2007
Reputation: 12.17831
E-Pigs: 555.8899
Offline
Post: #2
RE: CMD Help
create 2 seperate scripts one that copys with admin then one you run as admin for regserv

[Image: IuZelj2.png]
Spoiler for anime watched:
[Image: squee666.jpg]
24/05/2009 06:08 PM
Find all posts by this user Quote this message in a reply
demonchild
Thinks Zinga Up To Something

Posts: 1,185.3522
Threads: 132
Joined: 23rd Mar 2008
Reputation: -4.56241
E-Pigs: 97.4501
Offline
Post: #3
RE: CMD Help
There's no way to combine them into one whole script?

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

‫‬‭‮‪‫‬‭‮‫‬‭‮‪‫‬‭[Image: Kamakazi.jpg]
Mr. Sim Pilot - One's Tale of Adventure - Coming Soon ... or whatever
Spoiler for SkyDX's gift.:
[Image: demonchildiq2.png] Thanks!
Assassinator Wrote:
demonchild Wrote:Because even pirates pirate free stuff.

Because pirates even pirate free stuff.

Important. Lol.
(This post was last modified: 24/05/2009 06:15 PM by demonchild.)
24/05/2009 06:10 PM
Visit this user's website Find all posts by this user Quote this message in a reply
lembas
yuri princess

Posts: 4,365.2931
Threads: 184
Joined: 30th Apr 2008
Reputation: -2.56923
E-Pigs: 154.3525
Offline
Post: #4
RE: CMD Help
lol, batch.

bash for the win.

I'm gay.
Spoiler for online game stuff:
[Image: 76561198003967361.png]
[Image: thelemmingbas.png]
3DS FC: 4184-1632-9353
Spoiler:
[Image: wQZsI.jpg]
Spoiler:
In the words of the wise trademark91:
windows Proud
24/05/2009 06:10 PM
Visit this user's website Find all posts by this user Quote this message in a reply
matchung
Turok Makto

Posts: 1,744.2413
Threads: 180
Joined: 5th Mar 2007
Reputation: -1.62846
E-Pigs: 162.3154
Offline
Post: #5
RE: CMD Help
i think those D3D file are system protected, u have to take their ownership before over-write them

Woo
25/05/2009 05:16 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,023.4213
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.0333
Offline
Post: #6
RE: CMD Help
Yeah, Vista's security is really annoying.

runas, setacls, IDK, give them a try.
25/05/2009 05:20 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: