Re: scripting runas to pass a password by Richard
Richard
Wed May 26 10:46:53 CDT 2004
Microsoft has a RunAs+.exe utility that is scriptable. I believe Mark
Manasi had it on his web site at one time.
This works very well. Remember though you still must put the password in
the script which is in clear text. One soultion I used is the following:
* Compile in an exe such as Wise (best solution)
* If you cannot compile it into an EXE, then at least make the password;
** into a complex string variable
** then encode the script.
Complex string Variable method
P1 = "byJlpas9XuShBWzEg$dcQCOr6G4hoDmJowv777wxbXtHiXS4Pas"
P2 = "W1pn9viG16FtzTYBsswcuyepLT0fuKOH8LQCADfAATDTRDNwKaw"
P3 = "T7ikhlrbxsJPj5YJwTxvpaCXordoei921T$erE03Bb7n9PyqtrN"
P4 = "iaofvioerdImikioeFEROPBnasapgr03485.wq9gnqd87e,43v-"
P5 = "Foa0ghnw30gb@&*N$BNa8a760^$%9-jdvbA54m1-8f1n14rpwre"
P6 = "-025tg0sdf;fQGH*%&Sp0jn98rf^^Uk0f0'2y-4594909HTY^&("
P7 = "@#xxd4$vty67mm9*)l09..p0;--m09(nhh*8v7thnjks$5xX567"
P8 = "$g-qjg1038jRpassword[pqkgW$gw0wgjwAdministratorQGgr"
P9 = ")O:(J&GBTR$$Kp--8gl'vx34tha8:P-09u%^5@1scx%53!@%c89"
P10 = "z2ed33c$%Gv4tg&^h6nuk((;90;_{-'iuk,$^yetyw57WQ5632q"
str1 = Mid(P2,9,1)& Mid(P7,12,3) & Mid(P3,38,1) & Mid(P4,2) & Mid(P1,29,2)
str2 = Mid(P9,24,1) & Mid(P1,1)& Mid(P12,7,1) & Mid(P9,45,1) & Mid(P8,18,1)
strEcpt = str1 & str2
"dellwood_nc" <dellwood_nc@yahoo.com> wrote in message
news:6F1EB0B5-10EC-486C-94A4-0C8FC700C51D@microsoft.com...
> I have been given a task to create a script that will allow a user to
register .dll files without being an administrator of the machine. The only
way I can think to do this is to use the runas.exe command. My problem is,
runas.exe does not allow you to pass the password to it without manually
entering the password. We cannot allow the users to have admin rights or to
know the password of an administrative account. Does anyone know of a way
to do this in a script or another free tool that would allow me to
accomplish this task? Please keep in mind, my company does not want to
spend any money other than my time to complete this task.