How do I edit the path statement and add some new text
Moderators: JRL, Dorian (MJT support)
How do I edit the path statement and add some new text
I have a path statement on a computer. I want to edit this path statement and add the following - C:\LOTUS\NOTES;C:\LOTUS\NOTES\DATA at the "end" of the path:
\....\;....\;.....\;C:\LOTUS\NOTES;C:\LOTUS\NOTES\DATA.
How can I do this with Macro Scheduler??
Thanks for any hints.
John
\....\;....\;.....\;C:\LOTUS\NOTES;C:\LOTUS\NOTES\DATA.
How can I do this with Macro Scheduler??
Thanks for any hints.
John
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Let>RP_WAIT=1
Run Program>command.com /c SET path=%path%;C:\LOTUS\NOTES;C:\LOTUS\NOTES\DATA
Let>RP_WAIT=0
Note: use command.com for WIN9x systems, use cmd for NT/XP/2X systems
-------------------
Edited per Lumumba's following reminder. Added the very important SET command in front.
Last edited by Bob Hansen on Fri Aug 20, 2004 8:27 pm, edited 5 times in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
To get the complete picture, have a look at the DOS command set /? at the commandline ...
-----
Hi Bob,
That one's for you
Let>COMSPECs=Note: use command.com for WIN9x systems, use cmd for NT/XP/2X systems
Send>%COMSPECs%
With AHK it would be (press F2 to fire it as often you like - once the script has been executed)
F2::Note:`nuse command.com for WIN9x systems`nuse cmd for NT/XP/2X systems
-----
Hi Bob,
That one's for you

Let>COMSPECs=Note: use command.com for WIN9x systems, use cmd for NT/XP/2X systems
Send>%COMSPECs%
With AHK it would be (press F2 to fire it as often you like - once the script has been executed)
F2::Note:`nuse command.com for WIN9x systems`nuse cmd for NT/XP/2X systems
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Re: Editing Path Statement
.Bob Hansen wrote:Let>RP_WAIT=1
Run Program>command.com /c
SET path=%path%;C:\LOTUS\NOTES;C:\LOTUS\NOTES\DATA
Let>RP_WAIT=0
Note: use command.com for WIN9x systems, use cmd for NT/XP/2X systems
-------------------
Edited per Lumumba's following reminder. Added the very important SET command in front.
When I tried this code snippet, I get the following error message:
"Specified Window "Path=%path%;c:\lotus\notes;c:\lotus\notes\data" not present. Any subsequant key sends in script may cause exceptions.
I only have the options of Abort or Ignore. If I ignore, nothing happens.
Am I doing something wrong?
John
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Sorry, this may be from a display problem on the forum. Looks OK in preview mode, but is wrong in final display.
The following is a single line of script, should all be on one line:
There is a space character after SET, before path=
Also remember if doing cut/paste from forum to remove any trailing spaces from lines of code. you can do this in Macro Scheduler Editor, Edit, Show All Chars, and Remove Trailing Spaces.
The following is a single line of script, should all be on one line:
==============================Run Program>command.com /c SET path=%path%;C:\LOTUS\NOTES;C:\LOTUS\NOTES\DATA
There is a space character after SET, before path=
Also remember if doing cut/paste from forum to remove any trailing spaces from lines of code. you can do this in Macro Scheduler Editor, Edit, Show All Chars, and Remove Trailing Spaces.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Re: editing path statement
Bob Hansen wrote:Sorry, this may be from a display problem on the forum. Looks OK in preview mode, but is wrong in final display.
The following is a single line of script, should all be on one line:
==============================Run Program>command.com /c SET path=%path%;C:\LOTUS\NOTES;C:\LOTUS\NOTES\DATA
There is a space character after SET, before path=
Also remember if doing cut/paste from forum to remove any trailing spaces from lines of code. you can do this in Macro Scheduler Editor, Edit, Show All Chars, and Remove Trailing Spaces.
Thanks Bob, I made this code snippet all one line - that elminated the previous error. However when I check the path under the environment variables for the system path I still do not see any new entries. I even restarted the computer to see if this helped - no go.
As an alternative approach, I have tried using pathman from the w2k resource kit - it "does" seem to append new entries to the path statement quite easily.
I am finding all kinds of uses for Macro Scheduler - a really great product!
Thanks again.
John
I guess you're trapped by a "nice to have" in Bob's advise - the standard environment variable named path !. As MSched ignores those variables (it uses its own "system variables" and "path" isn't one of it) the following "replacement section" seems not to work:
path=%path%;C:\LOTUS\NOTES;C:\LOTUS\NOTES\DATA
Other scripting tools are working with DOS vars. MSched not directly (check if accessible via VBScript). But maybe I'm wrong.
path=%path%;C:\LOTUS\NOTES;C:\LOTUS\NOTES\DATA
Other scripting tools are working with DOS vars. MSched not directly (check if accessible via VBScript). But maybe I'm wrong.

- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Sorry, I never tested the one line script in Macro Scheduler. I thought it was a "gimmee."
SET path=%path%;C:\LOTUS\NOTES;C:\LOTUS\NOTES\DATA runs fine in a command prompt window.
But does not appear to work in Macro Scheduler with Run Program>.....do not know why, needs to be understood....why not?
In meantime, check out Xset
======================
From notes I copied when first used about a year ago:
SET path=%path%;C:\LOTUS\NOTES;C:\LOTUS\NOTES\DATA runs fine in a command prompt window.
But does not appear to work in Macro Scheduler with Run Program>.....do not know why, needs to be understood....why not?
In meantime, check out Xset
======================
From notes I copied when first used about a year ago:
XSET allows you to put EVERYTHING you want in a variable of the current DOS, Windows, Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP or OS/2 environment and use it as if you had assigned it the value with the standard command SET. You will be able to write very efficient batch files including string manipulation, calculation, ...
XSET is the most powerful environment variable manipulation program you have ever seen. It also has a very easy and intuitive user interface (very close to the SET command) you only need to use the functionality you need, you do not have to worry about the functionality you do not use. It is not a resident program; so it will not interfere with any of your other applications.
XSET is fully compatible with MS-DOS (from 3.30), DR-DOS, NDOS, 4DOS, OS/2, all Windows.
XSET is a shareware program. Just try it for free (this is a full-featured version - no limitation) and register if you like it. Otherwise, just delete it.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!