EXE Packager Alt Credentials Not Working?

Use this forum to ask questions before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
User avatar
Alexander Riedel
Posts: 6920
Joined: Tue May 29, 2007 4:43 pm

EXE Packager Alt Credentials Not Working?

Post by Alexander Riedel » Wed Jun 24, 2009 8:01 pm

I did a quick test here and it worked fine, my assumption is that the domain user impersonation is what's keeping you. I am sorry that diagnosing that from here is not possible.

I personally would prefer WMI since it allows you to specify the credentials on get-wmiobject.

To specify the password you should create the credential object like this:

$pwd=convertto-securestring -string <password>
$cred=new-object -typename System.Management.Automation.PSCredential -argumentlist "domainusername",$pwd

The script inside the exe is encrypted. The encryption level depends on your Windows version and country. It has to be decrypted in memory for running.
Someone with sufficient right and access to a memory dump tool or debugger could find it. A normal user cannot simply peek into the exe and see the password.

You can also store your password in an external encrypted file using these
lines to create or read from an encrypted file in PowerShell

# Generate an encrypted version of your password
read-host -assecurestring | convertfrom-securestring| out-file Encrypted.txt

#Get a secure string
$secret = cat Encrypted.txt | convertto-securestring

Hope this helps.

Alex
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
dcdelgado
Posts: 40
Joined: Tue Mar 24, 2009 8:53 pm

EXE Packager Alt Credentials Not Working?

Post by dcdelgado » Wed Jun 24, 2009 8:38 pm

I was going to use wmi then found out you cant run it local on the same machine?, i have just tried vbs (oshel.run runs and oshell sendkey)then used it to call the ps script, then packaged it to hide the admin password, although crude it seems to have worked? the resultant .exe is secure is it not?

User avatar
Alexander Riedel
Posts: 6920
Joined: Tue May 29, 2007 4:43 pm

EXE Packager Alt Credentials Not Working?

Post by Alexander Riedel » Wed Jun 24, 2009 8:47 pm

Yes it is secure. I am wondering why you say you can't run WMI locally?
Something like
get-wmiobject win32_service -computername .
doesn't work on your machine?
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
dcdelgado
Posts: 40
Joined: Tue Mar 24, 2009 8:53 pm

EXE Packager Alt Credentials Not Working?

Post by dcdelgado » Wed Jun 24, 2009 10:54 pm

I thought you could not run alt creds with WMI on a local machine?

User avatar
Alexander Riedel
Posts: 6920
Joined: Tue May 29, 2007 4:43 pm

EXE Packager Alt Credentials Not Working?

Post by Alexander Riedel » Thu Jun 25, 2009 3:36 am

Oh. Yeah you are right. I guess you would need the runas option for your domain login. Give me a few days to look into that.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
dcdelgado
Posts: 40
Joined: Tue Mar 24, 2009 8:53 pm

EXE Packager Alt Credentials Not Working?

Post by dcdelgado » Thu Jun 25, 2009 6:51 pm

Thanks.

User avatar
Alexander Riedel
Posts: 6920
Joined: Tue May 29, 2007 4:43 pm

EXE Packager Alt Credentials Not Working?

Post by Alexander Riedel » Wed Jul 15, 2009 3:09 am

Please download the latest service build and repackage your script with that. Please let us know if that helps with your login issue.

Alex
Alexander Riedel
SAPIEN Technologies, Inc.