zorvek (Kevin Jones)
asked on
Specifying wscript Command as a Context Menu Command with Environment Variable
I am trying to specify a wscript command as a context menu item. I am having trouble using an environment variable in the command.
What I have:
wscript.exe "%USERPROFILE%\Documents\S cripts\Scr ipt.vbs" "%1"
Produces this error from wscript:
"Can not find the script file "C:\Users\User Name\Documents\Scripts\USE RPROFILE\D ocuments\S cripts\Scr ipt.vbs"
WTF? This substitution makes no sense.
If I run the same command in DOS (with the %1 already substituted,) it works just peachy.
Any ideas?
Kevin
What I have:
wscript.exe "%USERPROFILE%\Documents\S
Produces this error from wscript:
"Can not find the script file "C:\Users\User Name\Documents\Scripts\USE
WTF? This substitution makes no sense.
If I run the same command in DOS (with the %1 already substituted,) it works just peachy.
Any ideas?
Kevin
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell
[HKEY_CLASSES_ROOT\*\shell
[HKEY_CLASSES_ROOT\*\shell
@="wscript.exe \"%USERPROFILE%\\Documents
Kevin