Jump to content

Pass system credentials to app?


 Share

Recommended Posts

I know I can use @UserName to pass windows username to logon to an app, but is there anyway to do the same with the users password?

really did not want to prompt for it or store it anywhere. also rather users logon with their credentials for usage tracking.

Also if anyone knows how I could in encapsulate the script to close if it fails so it's not hanging in the background, that would be great.

; Script Start - Add your code below here

$site = "VPN site1"
$user = @UserName
$pass = "password" ;Don't know what to do here?
$path = "C:\Program Files\ShrewSoft\VPN Client\ipsecc.exe"
$var1 = " -r "
$var2 = " -u "
$var3 = " -p "
$var4 = " -a"
$string = $var1 & $site & $var2 & $user & $var3 & $pass & $var4
;MsgBox(0, "", $string) ;For testing

ShellExecute($path ,$string)
Edited by ravaged1
Link to comment
Share on other sites

Imagine the security nightmare it would be if a script or any other application could simply access the user's password and make use of it. Windows doesn't even keep the password anywhere, only an encrypted hash of it.

Also, why would you assume the local username and password were the same as those for the Cisco VPN connect?

:x

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Imagine the security nightmare it would be if a script or any other application could simply access the user's password and make use of it. Windows doesn't even keep the password anywhere, only an encrypted hash of it.

Also, why would you assume the local username and password were the same as those for the Cisco VPN connect?

:x

Yeah, that's what I thought after I posted the question.

As for assuming, I think your the one doing that, Cisco was never named in fact I'm using a shrewsoft client.

Also yes we use domain accounts for VPN logins, that way when some one changes their domain password it's the same for VPN.

Takes some of the burden off IT to not have to change it for them in different places all the time.

Link to comment
Share on other sites

It would be like giving away a database of home security alarm passcodes with a the McBurglar meal.

"You want codes with that?"

windows passes credentials around all the time, I had just wondered about having it do the same for the script.

Wasn't until after I posted that I thought about how it couldn't be transparent like in does for network access and it wouldn't work.

Looks like no BigHac for me. :x

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...