View previous topic :: View next topic |
Author |
Message |
Aslan Valued Contributor
Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Mon Jan 17, 2005 3:55 am Post subject: Runasdll.dll Help |
|
|
I've been trying to use the "Run As" package from CodeScript.
Note: I'm using XP Pro
Using the example in the package, I keep getting an error:
"The system cannot find the path specified"
Anyone else had this error and/or figured out away around it?
Thanks in advance |
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Jan 17, 2005 1:47 pm Post subject: |
|
|
The example seems to work for me, inasmuch as it reports an error running the service from users that shouldn't be able to. But it tells me that login was successful even if I put a nonexistant user name or the wrong password.
But I can't seem to run another program as the impersonated user. I created a short one-line script to display the result of @env(username) to try to confirm to myself that it really was running a program as another user, but I can't run it. I even tried running C:\Windows\Explorer.exe and it said it couldn't find it. So I've given up. _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
CodeScript Moderator Team
Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Fri Jan 21, 2005 4:16 am Post subject: |
|
|
I seem to have updated the dll & posted as attachment to someones request here. Newer one has some bugs fixed although it has some mysterious issues when runs from a vds exe unlike as a standalone app using "C". I couldn't decipher why it was so and gave up ultimately. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
Back to top |
|
|
Aslan Valued Contributor
Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Fri Jan 21, 2005 8:30 pm Post subject: |
|
|
I found this on WinXP and WIN2K
Quote: |
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\%SYSTEM%\runas /?
RUNAS USAGE:
RUNAS [ [/noprofile | /profile] [/env] [/netonly] ]
/user:<UserName> program
RUNAS [ [/noprofile | /profile] [/env] [/netonly] ]
/smartcard [/user:<UserName>] program
/noprofile specifies that the user's profile should not be loaded.
This causes the application to load more quickly, but
can cause some applications to malfunction.
/profile specifies that the user's profile should be loaded.
This is the default.
/env to use current environment instead of user's.
/netonly use if the credentials specified are for remote
access only.
/savecred to use credentials previously saved by the user.
This option is not available on Windows XP Home Edition
and will be ignored.
/smartcard use if the credentials are to be supplied from a
smartcard.
/user <UserName> should be in form USER@DOMAIN or DOMAIN\USER
program command line for EXE. See below for examples
Examples:
> runas /noprofile /user:mymachine\administrator cmd
> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"
> runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""
NOTE: Enter user's password only when prompted.
NOTE: USER@DOMAIN is not compatible with /netonly.
NOTE: /profile is not compatible with /netonly.
|
I don't know if this applies to WIN9X but since there is no security it probably doesn't matter.
So something like this should work:
Code: |
If @not(@equal(%1,1))
run "runas /user:"<user>\<domain>" myapp 1"
exit
end
TITLE MYAPP
# ***Start MYAPP code here ***
|
|
|
Back to top |
|
|
Aslan Valued Contributor
Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Fri Jan 21, 2005 8:40 pm Post subject: |
|
|
Ummm...
I just noticed that there is no option to insert the password |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
Back to top |
|
|
|