Need advice for logon script win98 clients
#1 issue, deltree /Y still prompts when run from a batch. Irritating indeed. This is what I have for the final portion of my logon scripts. :nukemsn if exist c:\program files\msn messenger\msnmsgr.
#1 issue, deltree /Y still prompts when run from a batch. Irritating indeed. This is what I have for the final portion of my logon scripts.
:nukemsn
if exist "c:\program files\msn messenger\msnmsgr.exe" goto renmsn
exit
:renmsn
ren "c:\program files\msn messenger\msnmsgr.exe" msnmsgr.ex_
ren "c:\program files\msn messenger\msmsgs.exe" msmsgs.ex_
Now the issue. If they reinstall msn, then msnmsgr.exe will exist, and it will be unable to rename to msmsgs.ex_ because the filanem will be taken.
So my Q: Is there a way in a batch to delete without prompt (/Y does not work)
or, to rename msmsgs.exe to a random filename generated. Like rename to a random txt stroing of 6 characters or so.
Or, a better suggestion to deal with this.
This is an NT 4 domain (And it is not going to be 2k/2k3 anytime soon) and Win98SE clients.
Also if they install it while logged on and use it, that is OK, I just want it to go away every logon so it will be too much hassle for them to keep reinstalling. (Plus this will be very good for giggles when their msn keeps disappearing.)
TIA for input.
A .vbs script could also be an options too, but I'm unfamiliar with the syntax for vbs, advice on this would be apreciated too. If a vbs file then all I need to do is nuke msn, and map drives. (\\net use x: \\server\share)
No group policy, no NTFS, plain old-school hackaway style.
:nukemsn
if exist "c:\program files\msn messenger\msnmsgr.exe" goto renmsn
exit
:renmsn
ren "c:\program files\msn messenger\msnmsgr.exe" msnmsgr.ex_
ren "c:\program files\msn messenger\msmsgs.exe" msmsgs.ex_
Now the issue. If they reinstall msn, then msnmsgr.exe will exist, and it will be unable to rename to msmsgs.ex_ because the filanem will be taken.
So my Q: Is there a way in a batch to delete without prompt (/Y does not work)
or, to rename msmsgs.exe to a random filename generated. Like rename to a random txt stroing of 6 characters or so.
Or, a better suggestion to deal with this.
This is an NT 4 domain (And it is not going to be 2k/2k3 anytime soon) and Win98SE clients.
Also if they install it while logged on and use it, that is OK, I just want it to go away every logon so it will be too much hassle for them to keep reinstalling. (Plus this will be very good for giggles when their msn keeps disappearing.)
TIA for input.
A .vbs script could also be an options too, but I'm unfamiliar with the syntax for vbs, advice on this would be apreciated too. If a vbs file then all I need to do is nuke msn, and map drives. (\\net use x: \\server\share)
No group policy, no NTFS, plain old-school hackaway style.
Participate on our website and join the conversation
This topic is archived. New comments cannot be posted and votes cannot be cast.
Responses to this topic
Just use DEL to delete the msnmsgr.ex_ and msmsgs.ex_ before you do the rename. DEL does not ask for confirmation. You could also use the /F option so it will force the delete of a file if it is set to 'read only'.
What about this... Been a while since I've used batch files, but this may trigger some ideas:
Code:
Code:
deltree *.* | echo y
Well now feel kind of dumb now.
Del does not prompt, so problem solved. I just del msnmsgr.exe
I assumed del wanted a prompt, so I pulled up deltree /? and it said /Y Skip delete prompt. I tried /Y with deltree and it doesnt work when run from a batch (lame)
Del works spiffy.
The only reason I was renaming was because of the lack of no prompt deleting.
Sw3etx0r.
Del does not prompt, so problem solved. I just del msnmsgr.exe
I assumed del wanted a prompt, so I pulled up deltree /? and it said /Y Skip delete prompt. I tried /Y with deltree and it doesnt work when run from a batch (lame)
Del works spiffy.
The only reason I was renaming was because of the lack of no prompt deleting.
Sw3etx0r.