cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
d_i_saunders
Engaged Sweeper III
Hi all,

I need to find a way to get all the actions to prompt for a user name and password before running..

The reason been we run as normal users. Admin actions are done using "run as" the admin accounts cant be used to logon with to prevent the spread of nastly things on the network.. We also cant give Workstation admin to Standard accounts.

Normaly I would right click and run IE as admin. Then the actions work...

But this then prrevents IE working on the internet as the accounts dont have access. 😞

Any one know of a program i can place between the action and the user...

eg:

"pc uptime" --> Authenticate --> uptime.exe (as admin) --> result displayed

hope this makes sence.
5 REPLIES 5
Hemoco
Lansweeper Alumni
vbscript doesn't know what {actionpath} or {computer} is, you will need to pass them to the script as parameters.
Hemoco
Lansweeper Alumni
You can replace lansweeper\administrator by another user (this is just an example)

You can also create your own vbs script that prompts for username and password and starts "runas.exe" with the correct parameters.
d_i_saunders
Engaged Sweeper III
Lansweeper wrote:
You can replace lansweeper\administrator by another user (this is just an example)

You can also create your own vbs script that prompts for username and password and starts "runas.exe" with the correct parameters.


Ok, come up with this...:

username = inputbox("Please enter a username.")

if username = "" then
msgbox("You need to enter a username")
else
cmd = "runas.exe /profile /env /user:DOMAIN\"& username &" {actionpath}lsremote {computer}"

set win32 = createobject("Wscript.Shell")

win32.run cmd
end if


I get a box that appears for second then closes..

Any help is greatly recived.


dave


Hemoco
Lansweeper Alumni
You can use the "runas.exe" tool that comes with windows.

Example:

runas.exe /profile /env /user:lansweeper\administrator "{actionpath}lsremote {computer}"
d_i_saunders
Engaged Sweeper III
Lansweeper wrote:
You can use the "runas.exe" tool that comes with windows.

Example:

runas.exe /profile /env /user:lansweeper\administrator "{actionpath}lsremote {computer}"


Thanks for the quick reply..

will that not run it as lansweeper\administrator

I need to have it ask for each person..