Good day everybody,
Just one simple question.
How do I set PATH in VC++?
This PATH is the path that, if we are to use in MS-DOS, it's set this way, 'SET PATH = C:\Windows".
Thanks in advanced.
Printable View
Good day everybody,
Just one simple question.
How do I set PATH in VC++?
This PATH is the path that, if we are to use in MS-DOS, it's set this way, 'SET PATH = C:\Windows".
Thanks in advanced.
setenv from stdlib.h should work.
I'll try it. Thanks.
Note that that won't affect any other programs. The environment you change applies to that program only.
That's right, but that may depend on the system (not sure if DOS seperated program environments).
Would using system modify the variables globally?
Z.
No, it would modify it in the environment created by the call to system().Quote:
Originally posted by Zaei
Would using system modify the variables globally?
Z.
Vicious, isn't it ;)
I know! Write a .bat file to the hard drive, and then run it with system()!
Geez, I sound like some n00b H4X0R =).
Z.
Wouldn't work either, as the batch file would then again run in the environment created by system.
But you can write a batch file and run it with ShellExecute.
Hmmm... I know! I will write a batch file to the start menu, and then... take a screen shot, search through it until I find the start menu. If not found, move the mosue to the bottom of the screen, using SetCursorPos. Then, search again. Make Mouse click on Start Button, and find the batch file, again, using a screen shot. Click on the batch file!
I R L33T HAXOR!
Z.