|
-
Jul 16th, 2010, 01:58 AM
#1
Thread Starter
Addicted Member
Change Environ using SetEnv..Var.A
Hi forum members
I am trying to add an extra folder eg C:\new to the existing path in the Environment variables using VB6.
I tried the following:
Declare Function SetEnvironVar Lib "kernel32" Alias "SetEnvironmentVariableA" (ByVal lpName As String, ByVal lpValue As String) As Long
Now_path$ = Environ("Path")
SetEnvironVar "path", Now_Path$ & ";C:\new"
but it did not work. Where did i go wrong? Help appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|