forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Runasdll.dll Help

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Other Product Support/Announcements
View previous topic :: View next topic  
Author Message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Mon Jan 17, 2005 3:55 am    Post subject: Runasdll.dll Help Reply with quote

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
View user's profile Send private message Send e-mail
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Mon Jan 17, 2005 1:47 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Fri Jan 21, 2005 4:16 am    Post subject: Reply with quote

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
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Fri Jan 21, 2005 8:30 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Fri Jan 21, 2005 8:40 pm    Post subject: Reply with quote

Ummm...

I just noticed that there is no option to insert the password Sad
Back to top
View user's profile Send private message Send e-mail
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Jan 22, 2005 9:50 am    Post subject: Reply with quote

Don't you get a popup window in which you can insert a password? If I right click a file here and choose the "Run As" option, I always get such a window... Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Other Product Support/Announcements All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group