Sign in to follow this  
Followers 0
Davidz39

Nancy Drew!

4 posts in this topic

My daughter got a new nancy drew game for christmas. The issue is that the game requires an admin account to run and she uses a limited account on windows XP.

Currently, when she wants to play the game, we parents right click the icon and do a runas and then type in our username/password.

I was hoping to automate this so she could play it at anytime. To this end, I downloaded and tried to create script to do this. Sadly, my little .exe file does nothing. No errors, no program, no nothing. I'm hoping someone can help me out. The help file example doesn't help, I've also spent time browsing the example scripts, but they are all much more complicated than what I need.

Here is the script I tried to use(The Username, Password and the DOMAIN values have been changed to protect the innocent! This PC is not on a domain, but is in a workgroup):

-----------------------------------------------

Local $sUserName = "USERNAME"

Local $sPassword = "PASSWORD"

; Run a command prompt as the other user.

RunAs($sUserName, "WORKGROUPNAME", $sPassword, 0, "Game.exe", "C:\Program Files\Nancy Drew\Message in a Haunted Mansion\")

-----------------------------------------------

If someone could please help me with this it would be MUCH appreciated!

Share this post


Link to post
Share on other sites



Try this:

Local $sUserName = "USERNAME"
Local $sPassword = "PASSWORD"

; Run a command prompt as the other user.
RunAs($sUserName, "WORKGROUPNAME", $sPassword, 0, "C:\Program Files\Nancy Drew\Message in a Haunted Mansion\Game.exe", "C:\Program Files\Nancy Drew\Message in a Haunted Mansion\")

Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic]

Share this post


Link to post
Share on other sites

My daughter got a new nancy drew game for christmas. The issue is that the game requires an admin account to run and she uses a limited account on windows XP.

Currently, when she wants to play the game, we parents right click the icon and do a runas and then type in our username/password.

I was hoping to automate this so she could play it at anytime. To this end, I downloaded and tried to create script to do this. Sadly, my little .exe file does nothing. No errors, no program, no nothing. I'm hoping someone can help me out. The help file example doesn't help, I've also spent time browsing the example scripts, but they are all much more complicated than what I need.

Here is the script I tried to use(The Username, Password and the DOMAIN values have been changed to protect the innocent! This PC is not on a domain, but is in a workgroup):

-----------------------------------------------

Local $sUserName = "USERNAME"

Local $sPassword = "PASSWORD"

; Run a command prompt as the other user.

RunAs($sUserName, "WORKGROUPNAME", $sPassword, 0, "Game.exe", "C:\Program Files\Nancy Drew\Message in a Haunted Mansion\")

-----------------------------------------------

If someone could please help me with this it would be MUCH appreciated!

Workgroups do not contain any authentication mechanism. They are joined and listed by a NetBIOS broadcast mechanism, with no authentication required (as opposed to a domain).

The username and password are actually in the context of the local computer, so use the @ComputerName macro:

Local $sUserName = "USERNAME"
Local $sDomainName = @ComputerName
Local $sPassword = "PASSWORD"
Local $sGameDir = "C:\Program Files\Nancy Drew\Message in a Haunted Mansion"
Local $sGameExe = $sGameDir & "\Game.exe"

; Run a command prompt as the other user.
RunAs($sUserName, $sDomainName, $sPassword, 0, $sGameExe, $sGameDir)

:)


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

Share this post


Link to post
Share on other sites

That fixed it, thanks alot!

Share this post


Link to post
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
Sign in to follow this  
Followers 0