Re: Apologies if incorrect group - Mapped drive rename from batch error
- From: "Pegasus \(MVP\)" <I.can@xxxxxxxxxx>
- Date: Thu, 31 Jan 2008 13:24:39 +0100
"Richhall" <rje.hall@xxxxxxxxxxx> wrote in message
news:6e1b1449-692a-435e-ba45-764678aedd21@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
All
On Windows XP I am running the following script from a .cmd batch to
rename a drive. The problem is I have named the drive before using
this, and it seems to be remembering the previous name, and I cannot
change it. Why is this please?
setlocal
set drv=J
set drv=%drv:"=%
set nn="MY DRIVE"
set nn=%nn:"=%
set mn="%TEMP%\MapName_%RANDOM%.VBS"
if exist %mn% del /q %mn%
set er="%TEMP%\MapName_%RANDOM%.TMP"
if exist %er% del /q %er%
@echo Set oShell = CreateObject("Shell.Application")>%mn%
@echo DRIVE = "%drv:~0,1%:\">>%mn%
@echo oShell.NameSpace(DRIVE).Self.Name = "%nn%">>%mn%
call :quiet>%er% 2>&1
del /q %mn%
del /q %er%
Cheers
Rich
Your code looks like an elaborate hoax. It its current
form it won't do anything useful.
.
- Follow-Ups:
- References:
- Prev by Date: Re: how to desactivate firewall
- Next by Date: Re: change CD settings
- Previous by thread: Apologies if incorrect group - Mapped drive rename from batch error
- Next by thread: Re: Apologies if incorrect group - Mapped drive rename from batch error
- Index(es):
Relevant Pages
|
|