VBScript insert string or label to Command Line

July 20, 2012 at 02:55:54
Specs: Windows 7, 4GB
Is it possible to create a vbscript, that would insert a string or label into an active Command Line with Admin Rights on...
I am using program that requires full controll of Admin. The problem is that when user insert's Administrator's password to my BATCH File. It is being saved... So..... I need that admin's password, typed in by user, to be used in RUNAS command.
I Can't use the password from the user input for the automatic command to proceed with my script...Becouse when I run a program as administrator in command prompt, it requires administrators password from user to input... So I need a batch or vbscript to insert it for user...
Is it possible? So Sorry for my bad english.....


Thz,


See More: VBScript insert string or label to Command Line

Report •


#1
July 20, 2012 at 05:19:58
Like:
CMD - COMMAND:

RUNAS /profile /user:%userdomain%\Administrator %userprofile%\D
esktop\run.bat

CMD - OUTPUT:

Enter the password for My-PC\Administrator:

Then I need to enter the password, but is it possible to use vbscript or batch script to enter it for me?


Report •

#2
July 20, 2012 at 14:56:54
http://xinn.org/RunasVBS.html

it looked reasonable, feel free to take a look.

:: mike


Report •

#3
July 26, 2012 at 02:14:33
Thz, it realy helped...

Report •

Related Solutions

#4
July 26, 2012 at 06:01:56
Hopefully it actually did. :)

:: mike


Report •

#5
July 26, 2012 at 09:45:35
Warning: If the user clicks off to some other application before the script types the password, or your application is slow to start, your administrator password will be typed into whatever happens to be up. If this may or may not be a problem if "whatever" ends up being Office, Notepad, or a web browser.

How To Ask Questions The Smart Way


Report •

#6
July 26, 2012 at 10:41:51
Thats why I always try the manual way with security issues. :)

:: mike


Report •

Ask Question