Mitsubishi Eclipse 3G Club banner

1 - 11 of 11 Posts

·
Skee Ball Champion
Joined
·
1,880 Posts
Discussion Starter #1
What I am attempting to do is create a batch file the remotely deletes profiles that have been inactive for a set period of time. I am trying to use a program called delprof from Microsoft. Everytime I try to run it with the proper arguments it prompts me to delete the profile from my local machine, not the remote machine. Does anyone have any suggestions or expierence with this?
 

·
Skee Ball Champion
Joined
·
1,880 Posts
Discussion Starter #3
I have tried this

For /f %%a in (computers.txt) Do Delprof.exe /I /Q /C:\\%%a /D:90

With a document for reference named computers.txt with the remote names

also have tried

Delprof.exe /I /Q /C\\computername /D:90
 

·
Lift and Separate
Joined
·
2,259 Posts
Well, I tried "delprof /c:\\computername" and got the error "The network path was not found." (the computer name I used isn't on my network because I didn't want to accidentally delete profiles during testing), so it seems like it was at least trying to connect to the remote machine. Your own computer name isn't in computers.txt by chance, is it? :rofl: Have you had any luck with it yet?
 

·
Skee Ball Champion
Joined
·
1,880 Posts
Discussion Starter #7
Still the same problem. When I run the command by itself (not in a .bat) it will run fine. but trying to automate the process is where it messes up at.
 

·
Lift and Separate
Joined
·
2,259 Posts
Well, I'm still stumped. I'm testing it on Windows Vista Ultimate and running into similar problems. I set up a Windows XP install in VMWare.

I tested some nonexistant computer names and got "The network path was not found."

I tested the computer name in the VM with no command line flags other than /C, and I got "Delete inactive profiles on \\FaustVM? (Yes/No)" so it has no trouble finding the computers, even with the for loop in the batch file. After typing "y" and pressing enter, I got "The network path was not found."

Perhaps the program is somewhat glitchy? Have you thought about making a local batch file and distributing it to the computers on the network, then forcing it to run via login script or startup registry key?
 

·
Lift and Separate
Joined
·
2,259 Posts
Well, I saw that you were a network administrator, so I assumed that you were operating some sort of large Windows-based domain. I unfortunately don't have that much experience with Windows networking, I've mostly used Novell for large applications. With Netware, you have login scripts for each user/group that map network drives, run applications, etc. upon login.

I was just saying, instead of using delprof.exe /C:\\<computername>, it might be easier to distribute a batch file to every machine that deletes all local profiles (instead of doing the deleting remotely, omit the /C flag) and add it to the startup items of each computer (HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run) with remote registry?

Idk, just a thought... I'd love to see it work the way you intended in the original batch file, though; it seems like the most efficient, straightforward way to do it.
 

·
Skee Ball Champion
Joined
·
1,880 Posts
Discussion Starter #11
I would like it to work from a batch file as well, I just can't get it to quit defaulting back to my machine. I'll give this startup thing a try.
 
1 - 11 of 11 Posts
Top