objWshell.Run"%COMSPEC%/ C ren topoX.jpg topo_cliente.jpg",0,TRUE ??? [英] objWshell.Run "%COMSPEC% /C ren topoX.jpg topo_cliente.jpg", 0, TRUE ???
问题描述
大家好,
我正在使用:
<%Set objWshell = Server.CreateObject(" WScript.Shell")
objWshell.Run"%COMSPEC%/ C ren topoX.jpg topo_cliente.jpg",0,TRUE%>
但是命令COMSPEC消除了我们所有的机器
ms-windows 2000安装!
所以现在没有一台机器可以继续运行我的例程,这些例程通过
ASP
可以通过主题发送电子邮件给我发送comspec命令:
Comspec to WScript.Shell
???
obs.:我在aspfaq.com上有这些样本?
http://www.aspfaq.com/show.asp?id=2059
谢谢,
-
Sem mais,
????????????????????? ??
Vlmar Braz?o de Oliveira
Desenvolvimento Web
HI-TEC
命令解释程序可执行文件的路径,cmd.exe。
右键单击我的电脑
点击属性
高级选项卡
环境变量
在系统变量框中,ComSpec应该是列出的第一个,在
默认的W2K服务器上。如果不存在,请添加它。
变量名称:ComSpec
变量值:C:\ Winnt \System32 \ cmd.exe
请注意,对于该值,这适用于安装在C上的W2K服务器,其中包含
%systemroot%的C:\ Winnt。如果你根本没有环境变量,你可以在microsoft.public.win2000.general或
..win2000.cmdprompt.admin中询问这个.b $ b。 br />
雷在工作
Vilmar Braz?o de Oliveira < TE *** @ teste.teste.teste>在消息中写道
news:u2 ************* @ TK2MSFTNGP12.phx.gbl ...
大家好,我正在使用:
<%Set objWshell = Server.CreateObject(" WScript.Shell")
objWshell.Run"%COMSPEC%/ C ren topoX.jpg topo_cliente.jpg",0 ,TRUE%>
但是COMSPEC的命令已经消除了我们安装了ms-windows 2000的所有机器!
所以现在没有一台机器可以继续运行我的例程通过ASP访问ms-dos
可以通过电子邮件发送给我comspec命令主题:
Comspec to WScript.Shell
???
obs.:我在aspfaq.com上有这些样本?
http://www.aspfaq.com/show.asp?id=2059
谢谢,
-
Sem mais,
?Vlmar Braz?o de Oliveira
Desenvolvimento Web
HI-TEC
太懒了试试,但是你可以在定义中使用%sysdir%或%systemroot%
另一个环境变量吗?我不确定这些变量是按顺序或整体初始化的......但是它不会像那个价值那样改变了价值。无论如何现有的环境。
-
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Ray at<%= sLocation%> [MVP] QUOT; < myfirstname at lane34 dot com>写在
消息新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...%compspec %isn''ta命令。它是一个环境变量,表示命令解释程序可执行文件的路径,cmd.exe。
右键单击我的电脑
单击属性
高级选项卡<环境变量
在系统变量框中,ComSpec应该是
默认W2K服务器上列出的第一个。如果不存在,请添加它。
变量名称:ComSpec
变量值:C:\ Winnt \System32 \ cmd.exe
注意对于该值,这适用于安装在C上的W2K服务器,其中系统根目录%为C:\ Winnt。如果您根本没有环境变量,
您可能想在microsoft.public.win2000.general或
.win2000.cmdprompt.admin中查询。
Ray at工作
Vilmar Braz?o de Oliveira < TE *** @ teste.teste.teste>在消息中写道
新闻:u2 ************* @ TK2MSFTNGP12.phx.gbl ...大家好,
我在使用:
<%设置objWshell = Server.CreateObject(" WScript.Shell")
objWshell.Run"%COMSPEC%/ C ren topoX.jpg topo_cliente.jpg",0,TRUE%> ;
但是COMSPEC的命令已经消除了我们安装了ms-windows 2000的所有机器!
所以现在没有一台机器可以继续运行我的例程dos
byASP
任何人都可以通过电子邮件向我发送comspec命令:
Comspec to WScript。壳牌
???
obs.:我在aspfaq.com上有这些样品?
http://www.aspfaq.com/show.asp?id=2059
谢谢,
-
Sem mais,
Vlmar Braz?o de ??????????????????????????????????????????????????????????????????????? Oliveira
Desenvolvimento Web
HI-TEC
我相信你可以,因为环境的实际价值
$ b像%windir%这样的$ b变量实际上是%systemroot%。但是,由于它存储为
a REG_EXPAND_SZ,当您在任何地方查看变量时,
%systemroot%的扩展值就是显示的内容。 />
%comspec%实际上是%systemroot%\system32 \ cmd.exe。所以,我想我给了
关于重新创建该变量的错误说明。对不起Vilmar。
我想如果var存储为REG_SZ,你必须输入文字
路径。
雷在工作
Aaron Bertrand [MVP]" < AA *** @ TRASHaspfaq.com>在留言中写道
新闻:e2 ************** @ TK2MSFTNGP10.phx.gbl ...太懒了试试,但是你可以在另一个环境变量的
定义中使用%sysdir%或%systemroot%吗?我不确定这些变量是按顺序还是按顺序进行初始化......但是,无论如何,在现有环境中改变这个值都不会是
。
-
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
" Ray at<%= sLocation%> [MVP] QUOT; < myfirstname at lane34 dot com>在消息新闻中写道:%2 **************** @ TK2MSFTNGP10.phx.gbl ...%compspec%isn'' ta命令。它是一个环境变量,
表示命令解释程序可执行文件的路径,cmd.exe。
右键单击我的电脑
单击属性
高级选项卡<环境变量
在系统变量框中,ComSpec应该是第一个列出的,在
a默认的W2K服务器上。如果不存在,请添加它。
变量名称:ComSpec
变量值:C:\ Winnt \System32 \ cmd.exe
注意对于该值,这适用于安装在C上的W2K服务器,其中系统根目录%为C:\ Winnt。如果你根本没有环境变量,
你可能想在microsoft.public.win2000.general或
.win2000.cmdprompt中查询。管理员工作。
Vilmar Braz?o de Oliveira < TE *** @ teste.teste.teste>在消息中写道
新闻:u2 ************* @ TK2MSFTNGP12.phx.gbl ...大家好,
我在使用:
<%设置objWshell = Server.CreateObject(" WScript.Shell")
objWshell.Run"%COMSPEC%/ C ren topoX.jpg topo_cliente.jpg",0,TRUE
%>
但是COMSPEC的命令已经消除了我们安装了ms-windows 2000的所有机器!
所以现在没有一台机器可以继续运行我访问的例程
ms-dos byASP
任何人都可以通过电子邮件向我发送comspec命令:
Comspec to WScript。壳牌
???
obs.:我在aspfaq.com上有这些样品?
http://www.aspfaq.com/show.asp?id=2059
谢谢,
-
Sem mais,
Vlmar Braz?o de ??????????????????????????????????????????????????????????????????????? Oliveira
Desenvolvimento Web
HI-TEC
Hi all,
I was using:
<% Set objWshell = Server.CreateObject("WScript.Shell")
objWshell.Run "%COMSPEC% /C ren topoX.jpg topo_cliente.jpg", 0, TRUE %>
BUT the comand COMSPEC disapeared of all my machines which we have
ms-windows 2000 installed!
So now no-one machine can continue run my routines which accessed ms-dos by
ASP
COULD anybody send me the comspec command by e-mail whith the subject:
Comspec to WScript.Shell
???
obs.:I got these samples in aspfaq.com ??
http://www.aspfaq.com/show.asp?id=2059
thanks,
--
Sem mais,
??????????????????????
Vlmar Braz?o de Oliveira
Desenvolvimento Web
HI-TEC
%compspec% isn''t a command. It''s an environment variable that represents
the path to your command interpreter executable, cmd.exe.
Right click My Computer
Click Properties
Advanced tab
Environment Variables
In the System Variables box, ComSpec should be the first one listed, on a
default W2K Server. If it is not there, add it.
Variable name: ComSpec
Variable value: C:\Winnt\System32\cmd.exe
Note that for that value, this is for a W2K Server installed on C with a
%systemroot% of C:\Winnt. If you have no environment variables at all, you
may want to inquire about this in microsoft.public.win2000.general or
..win2000.cmdprompt.admin.
Ray at work
"Vilmar Braz?o de Oliveira" <te***@teste.teste.teste> wrote in message
news:u2*************@TK2MSFTNGP12.phx.gbl...Hi all,
I was using:
<% Set objWshell = Server.CreateObject("WScript.Shell")
objWshell.Run "%COMSPEC% /C ren topoX.jpg topo_cliente.jpg", 0, TRUE %>
BUT the comand COMSPEC disapeared of all my machines which we have
ms-windows 2000 installed!
So now no-one machine can continue run my routines which accessed ms-dos by ASP
COULD anybody send me the comspec command by e-mail whith the subject:
Comspec to WScript.Shell
???
obs.:I got these samples in aspfaq.com ??
http://www.aspfaq.com/show.asp?id=2059
thanks,
--
Sem mais,
??????????????????????
Vlmar Braz?o de Oliveira
Desenvolvimento Web
HI-TEC
Too lazy to try, but can you use %sysdir% or %systemroot% in the definition
of another environment variable? I''m not sure if the variables are
initialized in order or en masse... but it''s not like that value is going to
change in the existing environment anyway.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:%2****************@TK2MSFTNGP10.phx.gbl...%compspec% isn''t a command. It''s an environment variable that represents
the path to your command interpreter executable, cmd.exe.
Right click My Computer
Click Properties
Advanced tab
Environment Variables
In the System Variables box, ComSpec should be the first one listed, on a
default W2K Server. If it is not there, add it.
Variable name: ComSpec
Variable value: C:\Winnt\System32\cmd.exe
Note that for that value, this is for a W2K Server installed on C with a
%systemroot% of C:\Winnt. If you have no environment variables at all, you may want to inquire about this in microsoft.public.win2000.general or
.win2000.cmdprompt.admin.
Ray at work
"Vilmar Braz?o de Oliveira" <te***@teste.teste.teste> wrote in message
news:u2*************@TK2MSFTNGP12.phx.gbl...Hi all,
I was using:
<% Set objWshell = Server.CreateObject("WScript.Shell")
objWshell.Run "%COMSPEC% /C ren topoX.jpg topo_cliente.jpg", 0, TRUE %>
BUT the comand COMSPEC disapeared of all my machines which we have
ms-windows 2000 installed!
So now no-one machine can continue run my routines which accessed ms-dos
byASP
COULD anybody send me the comspec command by e-mail whith the subject:
Comspec to WScript.Shell
???
obs.:I got these samples in aspfaq.com ??
http://www.aspfaq.com/show.asp?id=2059
thanks,
--
Sem mais,
??????????????????????
Vlmar Braz?o de Oliveira
Desenvolvimento Web
HI-TEC
I do believe that you can, because the actual value of an environment
variable like %windir% is actually %systemroot%. But, since it''s stored as
a REG_EXPAND_SZ, when you view the variable anywhere, the expanded value of
%systemroot% is what''s displayed.
And %comspec% is actually %systemroot%\system32\cmd.exe. So, I guess I gave
false instructions about recreating that variable. Sorry Vilmar.
I guess if the var is stored as a REG_SZ, you''d have to type the literal
path.
Ray at work
"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:e2**************@TK2MSFTNGP10.phx.gbl...Too lazy to try, but can you use %sysdir% or %systemroot% in the definition of another environment variable? I''m not sure if the variables are
initialized in order or en masse... but it''s not like that value is going to change in the existing environment anyway.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:%2****************@TK2MSFTNGP10.phx.gbl...%compspec% isn''t a command. It''s an environment variable that represents the path to your command interpreter executable, cmd.exe.
Right click My Computer
Click Properties
Advanced tab
Environment Variables
In the System Variables box, ComSpec should be the first one listed, on a default W2K Server. If it is not there, add it.
Variable name: ComSpec
Variable value: C:\Winnt\System32\cmd.exe
Note that for that value, this is for a W2K Server installed on C with a
%systemroot% of C:\Winnt. If you have no environment variables at all,
youmay want to inquire about this in microsoft.public.win2000.general or
.win2000.cmdprompt.admin.
Ray at work
"Vilmar Braz?o de Oliveira" <te***@teste.teste.teste> wrote in message
news:u2*************@TK2MSFTNGP12.phx.gbl...Hi all,
I was using:
<% Set objWshell = Server.CreateObject("WScript.Shell")
objWshell.Run "%COMSPEC% /C ren topoX.jpg topo_cliente.jpg", 0, TRUE %>
BUT the comand COMSPEC disapeared of all my machines which we have
ms-windows 2000 installed!
So now no-one machine can continue run my routines which accessedms-dos by
ASP
COULD anybody send me the comspec command by e-mail whith the subject:
Comspec to WScript.Shell
???
obs.:I got these samples in aspfaq.com ??
http://www.aspfaq.com/show.asp?id=2059
thanks,
--
Sem mais,
??????????????????????
Vlmar Braz?o de Oliveira
Desenvolvimento Web
HI-TEC
这篇关于objWshell.Run"%COMSPEC%/ C ren topoX.jpg topo_cliente.jpg",0,TRUE ???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!