Welcome Guest.   Make a donation to an author on the site September 30, 2014, 06:56:34 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Free DonationCoder.com Member Kit: Submit Request.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: IDEA: "Runas" standard programs and own tools  (Read 21896 times)
AbteriX
Charter Honorary Member
***
Posts: 1,050


Member #520

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: September 20, 2005, 10:05:21 AM »

Hi,
i think it would be nice to have an little tool
for starting all this standard windows tools
and our own apps we need for administration issues.

Maybe one want to wrote something like this
or one have an link to such an tool.
Also i search for an list of all standard installed windows tools (an .CPL list i got already)
The standard folder i could read from the registry.



I think about an tool how
- have an dialog for user name and password
- read the local user names and view them for choosing
- allow domain login (dom\user or user@dom)
(like the commandline tool but with an GUI and some aid)

There should be:
- buttons to start all the standard windows apps we need for admin issues
- buttons to start the default system and user folders
- buttons to start our own tools

All settings should be stored in an INI (NO registry access)
There should be no installation needed, just unpack and use


-----
With this tool we could work without admin rights
and quick start an program with admin rights (for W2k users too  smiley )

Or we could work as admin
and start e.g. the browser with less rights (like DropMyRights)

----
I have already found an tool who starts
mostly all tools they came with windows
but have no user name box and no appility for own apps.

XP Syspad from http://www.xtort.net/xtort/xpsyspad.php

Right now i had to make an shortcut from it
and set in the proberties "Run as other User..."

-----
And iam in hard discusse with Dirk
to improve his own tool what cames
very near what i dream of
but he have less joy to improve his tool further more
than i instigate him till now  smiley

There is no officical web side right now any more
but an blog we "discusse" right now (i suggest and he says yes or no)
The conversation is current in german but you could stay in in english if you want.
http://www.paehl.de/blog/index.php
 ===> Saturday, August 20, 2005, 06:58 PM
Welche Erweiterungen sollen in dem ...


Here is an screenshot from his tool:


* SysProgs.jpg (43.57 KB, 521x404 - viewed 1032 times.)
« Last Edit: September 21, 2005, 03:37:45 AM by Stefan » Logged

Greetings, Stefan.
skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: September 21, 2005, 07:57:10 PM »

 smiley Here's a user definable one!

RunAsTools - Collect your system tools and run them as another user.

Features:
- Edit the ini-file to change the settings.
- Show or hide the window by doubleclicking the tray icon.
- Won't run as a user without a password.



You'll find the downloads and more info at Skrommel Software.

Skrommel
Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
AbteriX
Charter Honorary Member
***
Posts: 1,050


Member #520

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: September 22, 2005, 03:42:08 AM »

> Here's a user definable one!

 ohmy tellme you are unbelievable, skrommel¬† Grin
Thank you.
Logged

Greetings, Stefan.
Carol Haynes
Waffles for England (patent pending)
Global Moderator
*****
Posts: 7,955



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #3 on: September 22, 2005, 05:03:17 AM »

Hi Skrommel,

Not sure if I have this right but if I run your app and enter the wrong password for Administrator the tools still run.

They appear to be running under my current user.

I'm not sure what should happen with RunAs for Favourites but I suspect if you run as another user it should show the relevant Favourites - as it is it doesn't matter who you RunAs you get the current user favourites ???
Logged

skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #4 on: September 22, 2005, 05:39:55 AM »

 smiley In AutoHotkey's help file, it says: "While the RunAs feature is in effect, Run and RunWait will not able to launch documents, URLs, or system verbs. In other words, the file to be launched must be an executable file."

Also, if the password is left empty, the RunAs part is ignored.

Don't you get an error message when the password is wrong?

Skrommel
« Last Edit: September 22, 2005, 05:42:34 AM by skrommel » Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
Carol Haynes
Waffles for England (patent pending)
Global Moderator
*****
Posts: 7,955



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #5 on: September 22, 2005, 06:00:43 AM »

I can run this with no password, wrong password, non-existent users without any effect.

If I runAs Administrator with the correct password the %USERPROFILE% etc. should be set to the Administrator's profile - not current user. So when you display Favourites (eg.) it should display Administror's favourites.

Here is an example:

If I run the command:

%windir%\system32\runas.exe /user:computer\Administrator cmd

from a command window it opens a DOS type window with the title "cmd (running as computer\Administrator)".

This is documented in the MS Help file under RunAs.

I have added the line:

Command Window, cmd,cmd.exe,,,,

under [Tools] in the ini file

When I run "cmd" from RunAsTools with the correct Administrator credentials I get a CMD window entitled "C:\WINDOWS\system32\cmd.exe".

I can only presume than that the RunAs command is not being constructed correctly.

How are you passing the password to the command. The symtax displayed in MS help files doesn't seem to offer the option of passing the password as a parameter ???

Here is Microsofts syntax for RunAs - it doesn't mention passwords and the description suggests you will be prompted for the password (which is my experience):

http://www.microsoft.com/...proddocs/en-us/runas.mspx
« Last Edit: September 22, 2005, 06:04:48 AM by CarolHaynes » Logged

skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #6 on: September 22, 2005, 03:32:46 PM »

 embarassed Is the Seondary Logon service running? Just added info about this on the web page.

Skrommel
Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
Carol Haynes
Waffles for England (patent pending)
Global Moderator
*****
Posts: 7,955



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #7 on: September 22, 2005, 03:46:14 PM »

Yes - and it is started
Logged

skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #8 on: September 22, 2005, 06:40:01 PM »

 smiley When I fill in an existing username and a password and run cmd.exe, I can check in Task Manager that cmd is running as a different user. And the userprofile variable is pointing to the other user. And a wrong password will show up an ugly AHK error message.

But cmd.exe does not show the "running as" info. The password is stored in a the editbox' variable and passed when run.

Just added RunAsTools v1.2! It includes a command line.

Skrommel
« Last Edit: September 22, 2005, 07:11:11 PM by skrommel » Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
Carol Haynes
Waffles for England (patent pending)
Global Moderator
*****
Posts: 7,955



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #9 on: September 22, 2005, 07:16:52 PM »

But cmd.exe does not show the "running as" info. And systemvariables are expanded prior to running the program, so they won't point to the other user's paths. Does RunAs' variables really expand to the other user?

Try this:

Make a desktop shortcut, and put in this line for the filename

%windir%\system32\runas.exe /user:Administrator cmd

click next, give the shortcut a name, and then click OK.

Double click it and enter your password.

Now a window should open with title cmd (running as ...\Administrator) where ... is you computer network name.

Type SET followed by return and look at the list of variables.

At the bottom USERNAME and USERPROFILE are set to Administrator's credendtials.

Effectively RunAs is running programs as another user so it is essential that the other user has access to their resources. I'd guess RunAs is the basis for the Fast User Switching in Windows XP/2003
Logged

skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #10 on: September 23, 2005, 01:25:34 AM »

 embarassed Sorry about that! I edited my previous post while you were writing your reply!

What I ment to as was wether RunAs expands the variables PRIOR to running? So that a runas.exe /user:Administrator %userprofile%\desktop\notepad.exe would run the other users' Notepad.exe stored on the desktop?

Can you still not run RunAsTools properly?

Skrommel
Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
Carol Haynes
Waffles for England (patent pending)
Global Moderator
*****
Posts: 7,955



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #11 on: September 23, 2005, 03:12:43 AM »

No it expands variables after execution so:

runas.exe /user:Administrator %userprofile%\desktop\notepad.exe

will expand %userprofile% for the user executing RunAs.

While notepad is excuting for Administrator %userprofile% is that belonging to Administrator.

By the way quotes are needed for correct expansion too:

runas.exe /user:Administrator "%userprofile%\desktop\notepad.exe"

otherwise this will be interpreted as:

runas.exe /user:Administrator C:\Documents

and so generate an error.

I can run RunAs and it does work, but it doesn't trap error conditions so if you enter an incorrect user name or password it just runs the command as the current user. Is that the intention? Given that you only want to use this to run applications under different credentials I would have thought knowing that you are still running as the current user was essential ??
Logged

skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #12 on: September 23, 2005, 03:41:48 AM »

 huh Anyone else getting this behaviour?

On my XP Pro system I get an error message if the user doesn't exist, or the password is wrong.

What are you running?

Skrommel
Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
Carol Haynes
Waffles for England (patent pending)
Global Moderator
*****
Posts: 7,955



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #13 on: September 23, 2005, 04:12:38 AM »

WinXP Pro SP2

Maybe the issue arises because my normal user ID is part of the Admin group ??
Logged

skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #14 on: September 23, 2005, 07:54:39 AM »

 huh No, mine is too.

Skrommel
Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
AbteriX
Charter Honorary Member
***
Posts: 1,050


Member #520

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #15 on: September 23, 2005, 08:55:45 AM »

sorry for making you all that work, skrommel.  Sad
I will try later over the weekend, but iam a little bit ill this days.
Logged

Greetings, Stefan.
Carol Haynes
Waffles for England (patent pending)
Global Moderator
*****
Posts: 7,955



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #16 on: September 23, 2005, 09:37:36 AM »

Sorry to hear that, hope you are feeling better soon (I thought it had been a bit quiet lately Wink)
Logged

mouser
First Author
Administrator
*****
Posts: 33,419



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #17 on: September 23, 2005, 09:45:20 AM »

get better soon stefan - our thoughts are with you! smiley
Logged
Carol Haynes
Waffles for England (patent pending)
Global Moderator
*****
Posts: 7,955



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #18 on: September 23, 2005, 10:04:28 AM »

Stefan, Is that why your avatar changed again? stars
Logged

Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.044s | Server load: 0.17 ]