![]() |
Runas Automation Utility [v1.0.3.1] |
FAQs Why don't you encrypt the password? Sanur is inherently insecure in that it simulates keypresses by sending window messages to the command interpreter. Encrypting the password may give a false sense of security. How do I run Sanur in VBScript? Because of the 'piping', you need to get the command interpreter (cmd.exe) to execute the command. You also need to quote the command. This example simply executes myprog.exe:-
Here's another example, this time the runas command contains quotes. The command executed is net localgroup administrators dom\fieldops /add:-
Note: The same principles apply if running Sanur via a Java program. That is, use cmd.exe with the /c switch to execute the runas command. How do I run Sanur in Kixtart? Because of the 'piping', the command interpreter (cmd.exe) must execute the command. This example runs myprog.exe:-
This example runs a program that has arguments:-
See KB121387 for details of the %0\..\ syntax. How can I hide the password? In short, don't use Sanur. However, if your file system is NTFS, you can partially obfuscate the password by storing it in an alternate data stream. This example shows how to 'hide' a password actually inside of a directory:-
And this example shows how Sanur can access the password:-
To learn more about ADSs, see the thread titled "Getting the MAC Address" in its entirety. How do I pipe a blank password into Runas? Create a zero byte file and use the /i switch. For example:-
How do I pipe a password that has leading or trailing whitespace? Passwords specified on the commandline will have all leading and trailing whitespace trimmed. Therefore, you'll need to put the password in a file and use the /i switch. The example below shows how this could be done with a batch file. The syntax used prevents the batch file from adding/removing whitespace:-
How do I redirect the output of the program being launched by Runas? In exactly the same way as you would when not using Sanur. For example:-
How can I determine if Runas started the target program ok? Since version 1.0.1 Sanur will only exit with a zero errorcode if Runas succeeded. You can use conditional processing or test the errorlevel to determine success or failure:-
|
|
| [Top][Home] | |