Being able to call console app from cmd

keyboard1333

Member
Joined
Nov 18, 2012
Messages
11
Programming Experience
1-3
Greetings all!
I have a small exe file that I'd like to be able to call from the cmd, and an installer for this exe.
I've tried simply copying the exe into the System32 folder (using the installer), but it was throwing an error for some reason...

The second way I know how to do this is to add a value into the environmental variable "path".
I tried running this code, but it says I don't have the needed permissions to access the registery.

VB.NET:
Dim _path As String = My.Application.GetEnvironmentVariable("path")
        Environment.SetEnvironmentVariable("path", _path & ";" & System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) & "\Fldrstudios\_lib", EnvironmentVariableTarget.Machine)

(I know that bit is coded a bit weirdly... I was testing something out :p)

Is there a way I can get the required permissions for my installer? This isn't just for my computer so it has to be automated.
Or perhaps, is there a different way to do what I'm trying that wouldn't require getting those permissions?
Thanks!
keebs
 
Back
Top