Hi,
I need to run another program with a different user/password , than my program, from my program.
That other program have to have other right to access a server to get data, but that user/password,can't access the things that my program is using...
Is that possible?
It's something as the RUNAS-dos-command,but that one ask me the password.
Thanks
Run an other program as different user
-
- Posts: 1167
- Joined: Mon Oct 17, 2005 5:41 am
- Location: Belgium
- Contact:
Run an other program as different user
Regards,
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Re: Run an other program as different user
If I understood correctly:
There is a general user directory on the server
Full name, password, rights fields
If you run the program from your program, then all this can be passed as parameters
There is a general user directory on the server
Full name, password, rights fields
If you run the program from your program, then all this can be passed as parameters
-
- Posts: 1167
- Joined: Mon Oct 17, 2005 5:41 am
- Location: Belgium
- Contact:
Re: Run an other program as different user
No, my program can access everything from the PC.
The other user can only access data from another (OPC)-server. Only that user has access to get data from that system.
My program will call the other program(with other credentials), and that program return data(it place data on a specific place that my program can access) , that my program will use.
The reason why only that other user can access the other server, is that this is used in a chemical plant, and the normal user may not access the other server. They give me a login than I can use in my program to access that data, but the users may not know the user/password
The other user can only access data from another (OPC)-server. Only that user has access to get data from that system.
My program will call the other program(with other credentials), and that program return data(it place data on a specific place that my program can access) , that my program will use.
The reason why only that other user can access the other server, is that this is used in a chemical plant, and the normal user may not access the other server. They give me a login than I can use in my program to access that data, but the users may not know the user/password
Regards,
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
-
- Posts: 1167
- Joined: Mon Oct 17, 2005 5:41 am
- Location: Belgium
- Contact:
Re: Run an other program as different user
In the info of the runas-command:
I see that the runas() function in Autoit can handle passwords. I will try it.
There is a possibility to use the /savecred, but the I have to enter the password manualy one time.Enter the password when prompted. The RunAs program demands that you type the password manually. This was a conscious design decision. If it were possible to pass the password on the command line, people would start embedding passwords into batch files and logon scripts, which is laughably insecure
I see that the runas() function in Autoit can handle passwords. I will try it.
Regards,
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Re: Run an other program as different user
RunAs - 'is this the FW or Clipper function ? If you want to enter the password automatically, then find the handle of the window and the item on it. And enter the password(sendmessage) in this element
-
- Posts: 1167
- Joined: Mon Oct 17, 2005 5:41 am
- Location: Belgium
- Contact:
Re: Run an other program as different user
No, runas.exe is standard Microsoft commandline-program located in %windir%\System32\runas.exe...
I see that there are different alternative programs for it.
I will try those.
I see that there are different alternative programs for it.
I will try those.
Regards,
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite