• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Opposite of CMD TASKKILL?

Smoblikat

Diamond Member
I am doing some coding and found out that in CMD you can permanently kill any process by using the TASKKILL command, I am just wondering if there is a similar command called TASKSTART or whatever. The reason I like this command is because it lets me run (in this case, close) a program with different credentials. The idea here is to start a program with administrative credentials.
 
Code:
runas /u:domain\admin "c:\some dir\some prog\herewego.exe"

PERFECT, thank you!

Just to make sure I have the syntax right:

Code:
runas /my_username:my_domain\admin "c:\some dir\some prog\herewego.exe"

How do I input the password to authenticate against the domain?
 
PERFECT, thank you!

Just to make sure I have the syntax right:

Code:
runas /my_username:my_domain\admin "c:\some dir\some prog\herewego.exe"

How do I input the password to authenticate against the domain?

So your syntax can be either:

Code:
runas /user:my_domain\my_login_name "c:\some dir\some prog\herewego.exe"

Or

Code:
runas /u:my_domain\my_login_name "c:\some dir\some prog\herewego.exe"

Where my_login_name can be admin or any other username.

You can't force in the password, it has to prompt and then you type it in.

Are these remote executions or local?
 
So your syntax can be either:

Code:
runas /user:my_domain\my_login_name "c:\some dir\some prog\herewego.exe"
Or

Code:
runas /u:my_domain\my_login_name "c:\some dir\some prog\herewego.exe"
Where my_login_name can be admin or any other username.

You can't force in the password, it has to prompt and then you type it in.

Are these remote executions or local?

Thank you, these will be local executions.
 
Im trying to launch internet explorer, but when I run the code it doesnt work (just brings up the help commands)

My syntax is:
Runas /profile /env /user:domain.com\admusername C:\Program Files\Internet Explorer\IEXPLORER.exe

If I run the code without the C:\program.... and just put NOTEPAD.exe, it works fine. So I am thinking the issue is the directory path, do I need to put quotations around it? I am programming this in VB, so if so, how do I make a string include quotations as part of the string, instead of trying to start a new string?
 
If you want, you can download a tool purchased by Microsoft a long while back. Its purpose was to remotely execute programs using any specified credentials, but I believe it allows you to do local machines as well.

The problem is - if its local, you have to have PSEXEC on all the stations.

See: http://ss64.com/nt/psexec.html

Hmmmm, I would like to keep this as native as possible and dont really want a program running in the background.
 
Im trying to launch internet explorer, but when I run the code it doesnt work (just brings up the help commands)

My syntax is:
Runas /profile /env /user:domain.com\admusername C:\Program Files\Internet Explorer\IEXPLORER.exe

If I run the code without the C:\program.... and just put NOTEPAD.exe, it works fine. So I am thinking the issue is the directory path, do I need to put quotations around it? I am programming this in VB, so if so, how do I make a string include quotations as part of the string, instead of trying to start a new string?

What does your line in VB look like?

I think you'll need something like this "runas.......... ""C:\space in\my dir\file.exe"""
 
Hmmmm, I would like to keep this as native as possible and dont really want a program running in the background.

You can choose to just launch and close. By default it will wait for whatever task it kicked off to complete, but there is a parameter to just kick it off and don't wait.
 
I was always a VB novice, but I used to pull of quotes in strings with something like:

Chr(34) + "C:\Program Files\blahblah\blah.exe" + Chr(34)

I probably could have done something like this instead:

vbQuote + "C:\Program Files\blahblah\blah.exe" + vbQuote

OR

""C:\Program Files\blahblah\blah.exe""
 
Back
Top