|
ihouge
初级用户
 
积分 20
发帖 10
注册 2007-4-6
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
我寻觅已久的信息.终于有点眉目了
网络真好
The information I've been searching for for a long time has finally started to come to light. The internet is really great.
|
|
2007-4-6 13:37 |
|
|
elick
新手上路

积分 2
发帖 1
注册 2007-7-5
状态 离线
|
|
2007-7-5 14:53 |
|
|
next45
新手上路

积分 2
发帖 1
注册 2007-9-17
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
对不起! 我是新手来! 我打算创作一个 batch file. 内里要求在 当前的PATH 中加入 J:\Lotus\Notes\Data 便可以. 请问有冇师兄帮忙
由 J:\Domino\Data;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Support Tools\;C:\Program Files\QuickTime\QTSystem\
到
J:\Domino\Data;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Support Tools\;C:\Program Files\QuickTime\QTSystem\;J:\Lotus\Notes\Data
I'm sorry! I'm a newbie! I plan to create a batch file. It needs to add J:\Lotus\Notes\Data to the current PATH. Is there any senior brother to help?
From J:\Domino\Data;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Support Tools\;C:\Program Files\QuickTime\QTSystem\
To
J:\Domino\Data;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Support Tools\;C:\Program Files\QuickTime\QTSystem\;J:\Lotus\Notes\Data
|
|
2007-9-17 16:18 |
|
|
ddosdos
新手上路

积分 2
发帖 1
注册 2007-12-1
状态 离线
|
|
2007-12-1 22:04 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 20 楼』:
使用 LLM 解释/回答一下
Originally posted by next45 at 2007-9-17 04:18 PM:
对不起! 我是新手来! 我打算创作一个 batch file. 内里要求在 当前的PATH 中加入 J:\Lotus\Notes\Data 便可以. 请问有冇师兄帮忙
由 J:\Domino\Data;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Support Tools\;C:\Program Files\QuickTime\QTSystem\
到
J:\Domino\Data;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Support Tools\;C:\Program Files\QuickTime\QTSystem\;J:\Lotus\Notes\Data
@echo off
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path /t REG_EXPAND_SZ /d "%path%;J:\Lotus\Notes\Data" /f
Originally posted by next45 at 2007-9-17 04:18 PM:
Sorry! I'm a newbie! I plan to create a batch file. It needs to add J:\Lotus\Notes\Data to the current PATH. Is there any senior to help
From
J:\Domino\Data;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Support Tools\;C:\Program Files\QuickTime\QTSystem\
To
J:\Domino\Data;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Support Tools\;C:\Program Files\QuickTime\QTSystem\;J:\Lotus\Notes\Data
@echo off
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path /t REG_EXPAND_SZ /d "%path%;J:\Lotus\Notes\Data" /f
|

 |
|
2007-12-2 01:38 |
|
|
81291895
初级用户
 
积分 42
发帖 17
注册 2005-8-28
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
@echo off
Set /p Paths=输入你要添加的"Path"路径,多个路径用";"隔开:
Set Regfile=HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
For /f "tokens=3" %%i in ('Reg Query "%Regfile%" /v path^|Find /i "REG_EXPAND_SZ"') Do Set Pathf=%%i
Reg add "%Regfile%" /v path /t REG_EXPAND_SZ /d %Pathf%;%Paths% /f>nul
```
@echo off
Set /p Paths=Enter the "Path" path you want to add, separate multiple paths with ";" :
Set Regfile=HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
For /f "tokens=3" %%i in ('Reg Query "%Regfile%" /v path^|Find /i "REG_EXPAND_SZ"') Do Set Pathf=%%i
Reg add "%Regfile%" /v path /t REG_EXPAND_SZ /d %Pathf%;%Paths% /f>nul
```
|
|
2007-12-4 01:09 |
|
|
bobo2007
新手上路

积分 2
发帖 1
注册 2007-2-28
状态 离线
|
|
2008-3-11 18:39 |
|
|
axuan
初级用户
 
积分 44
发帖 20
注册 2006-12-9
状态 离线
|
|
2008-5-26 13:57 |
|
|
dato
高级用户
   
积分 916
发帖 377
注册 2004-3-8
状态 离线
|
『第 24 楼』:
使用 LLM 解释/回答一下
哎在java教学中也是老有人乱改path系统变量然后导致很多程序加载有问题。可是这个setx看半天就是没有追加功能只有替换功能,这样就导致有点麻烦。
Hey, in Java teaching, there are always people who mess up the path system variable, which causes many program loading problems. But after looking at setx for a long time, I find that it only has the replace function and no append function, which makes it a bit troublesome.
|

http://dato.ys168.com
google search bot
http://dato.minidns.net/ |
|
2008-5-26 15:36 |
|
|
soliton
新手上路

积分 2
发帖 1
注册 2008-7-4
状态 离线
|
『第 25 楼』:
使用 LLM 解释/回答一下
我也正在搞这个问题 想试试看setx
我用wimc 修改过环境变量 但是无法立刻生效
I'm also working on this problem and want to try setx. I've modified the environment variables with wimc but they can't take effect immediately.
|
|
2008-7-4 19:51 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 26 楼』:
使用 LLM 解释/回答一下
wmic修改环境变量是可以马上生效的,是不是你的命令写错了?贴出来看看?
Modifying environment variables with wmic can take effect immediately. Did you write the command incorrectly? Post it and let's see?
|

 |
|
2008-7-4 20:56 |
|
|
ywwywwjm
初级用户
 
积分 42
发帖 13
注册 2007-8-3
状态 离线
|
『第 27 楼』:
使用 LLM 解释/回答一下
1.用pathman
pathman /rs "c:\123"
pathman /as "C:\WINDOWS\system32\qqq"
pathman /as J:\Lotus\Notes\Data
2. 用WMIC
WMIC /PRIVILEGES:ENABLE ENVIRONMENT where name='PATH' set VariableValue="%PATH%;J:\Lotus\Notes\Data"
1. Use pathman
pathman /rs "c:\123"
pathman /as "C:\WINDOWS\system32\qqq"
pathman /as J:\Lotus\Notes\Data
2. Use WMIC
WMIC /PRIVILEGES:ENABLE ENVIRONMENT where name='PATH' set VariableValue="%PATH%;J:\Lotus\Notes\Data"
|
|
2008-7-6 16:04 |
|
|
afu35
新手上路

积分 1
发帖 1
注册 2008-10-22
状态 离线
|
『第 28 楼』:
修改注册表增删环境变量,是否需要重启操作系统
使用 LLM 解释/回答一下
之前我也是用reg add/delete去修改注册表(在bat脚本中),来添加或删除环境变量,但是发现,加完之后,不能即时生效,需要重启操作,不知道有没有不用重启OS的方法。
I used to use reg add/delete to modify the registry (in bat scripts) to add or delete environment variables before, but I found that after adding them, they don't take effect immediately and I need to restart the OS. I wonder if there is a way without restarting the OS.
|
|
2008-10-22 08:29 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 29 楼』:
Re 28楼
使用 LLM 解释/回答一下
wmic ENVIRONMENT where "name='path' and username='<system>'" set VariableValue="%path%;C:\test"
```
wmic ENVIRONMENT where "name='path' and username='<system>'" set VariableValue="%path%;C:\test"
```
|

 |
|
2008-10-22 09:48 |
|
|
tireless
银牌会员
    
积分 2025
发帖 1122
注册 2007-9-5
状态 离线
|
『第 30 楼』:
使用 LLM 解释/回答一下
之前我也是用reg add/delete去修改注册表(在bat脚本中),来添加或删除环境变量,但是发现,加完之后,不能即时生效,需要重启操作,不知道有没有不用重启OS的方法。
可以用命令行工具 NirCmd 刷新环境变量:
NirCmd sysrefresh environment
或使用修改环境变量的工具,如 pathman
http://upload.cn-dos.net/img/989.rar
I used to use reg add/delete to modify the registry (in a bat script) to add or delete environment variables, but I found that after adding them, they don't take effect immediately and require a system restart. I wonder if there is a method that doesn't require restarting the OS.
You can use the command-line tool NirCmd to refresh the environment variables:
NirCmd sysrefresh environment
Or use a tool to modify environment variables, such as pathman
http://upload.cn-dos.net/img/989.rar
|
|
2008-10-22 09:54 |
|