Jerry_Peoples Posted August 23, 2016 Share Posted August 23, 2016 here is my problem. I have about 90 users who are not on our network and spread throughout the united states, canada and latin america. without all the crappy details we need to install a new vpn client that is compatible with out network. now i can use logmein to remote into everyones computer (along with two coworkers) but aside from being time consuming will take away from other tickets that need addressed. I would like to use Autoit to create an executable that will have our administrator password hidden since all our users are standard users and cannot install things on their own. i have the download of the vpn client but am unsure how to enter our administrator credentials to automate this process. any help you can give me will be greatly appreciated Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 23, 2016 Moderators Share Posted August 23, 2016 (edited) @Jerry_Peoples welcome to the forum. If they have no network connectivity, you would have to embed the password into the script. Something like this: Local $sPW = "MyAdminPassword!" Realize, of course, that anyone who wants to spend 5 minutes trying to pull the password from your compiled executable will be able to do so with ease. Edit: I missed the part about your users having no access to install apps. So you would embed the password, then do a RunAs and pass those credentials to the script. Look at the example for RunAs in the help file. Edited August 23, 2016 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
marknlh Posted August 23, 2016 Share Posted August 23, 2016 I found this on the forum. Use SciTE to compile the code into an exe so it hides account info. This doesn't embed the program you wish to install, just points to it with admin credentials. Hope this helps. $strCmd = "\\server\folder" $strDomain = "Domain" $strUser = "Admin" $strPass = "Password" runaswait($strUser, $strDomain, $strPass, 0, $strCmd) Link to comment Share on other sites More sharing options...
Jerry_Peoples Posted August 23, 2016 Author Share Posted August 23, 2016 it is my understanding (this software was recommended from spiceworks) that once you compile the executable it will run automatically. most if not all the users are not very computer savvy so i dont think they would try to edit the exe at all i also should have been more clearer. i would like to use Autoit to run the exe with our admin password without the user being prompted to enter anything other than just running the exe itself thanks for you help btw Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 23, 2016 Moderators Share Posted August 23, 2016 (edited) So, then your script would look something like this (assuming the setup executable is in the same directory as your script): RunAsWait("Administrator", "MyDomain", "MyPassword", $RUN_LOGON_NETWORK, @ScriptDir & "\Setup.exe") Your users would simply have to double click your script and let it run. If you want to further simplify, you could use FileInstall to embed the setup executable into your script file, so they have only one executable to click on. Edited August 23, 2016 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
marknlh Posted August 23, 2016 Share Posted August 23, 2016 JLogan, can you please explain the FileInstall? I have a similar sitituation as Jerry that I need to deploy an MSI ran from a command prompt with token information. Right now I have setup with a batch command to start the setup. What I want is to make it as easy as possible for the enduser to install the software and make the installation as portable as possible. Perfect scenario would be to eliminate the batch script, one executable, portable, and with domain admin credentials. Is this possible? Thanks Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 23, 2016 Moderators Share Posted August 23, 2016 Yes, @marknlh it is. The help file is very clear about FileInstall, and provides you with an example script to demonstrate its functionality. What are you confused about, exactly? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
marknlh Posted August 23, 2016 Share Posted August 23, 2016 I guess I am confused on how I would compile everything I need. Here are the variables: MSI with external .cab file Must be ran from cmd using the following msiexec /i Standalone.msi SERVERURL="https://nsa.nuancehdp.com/basic" ORGANIZATIONTOKEN="your_organization_token" SUPPORTEDLANGUAGES="en-US" SUPPORTEDTOPICS="GeneralMedicine|Cardiology|ClinicalAdministration" USERINTERFACELANGUAGE="en-US"done Need to create a shortcut with a specified name Compiled into one executable I wish I had more time and experience with AutoIT but unfortunately I am under a tremendous time constraint. Any help with a solution would be greatly appreciated! Link to comment Share on other sites More sharing options...
Jerry_Peoples Posted August 23, 2016 Author Share Posted August 23, 2016 Jlogan, thanks for the response i made a directory called batch in that directory i placed both the batch file and exe for the vpn client made the batch file simple for now RunAsWait("Administrator", "Ardex", "OurNetworkPassword", $RUN_LOGON_NETWORK, @ScriptDir & "\FortiClientOnlineInstaller.exe") double clicked the batch and the window shows for a second then disappears with nothing happening i should also note i am a beginner with batch files so i am not even sure how to troubleshoot this :/ Link to comment Share on other sites More sharing options...
marknlh Posted August 23, 2016 Share Posted August 23, 2016 Jerry, try adding the full server path example: \\server\folder\installername.exe Link to comment Share on other sites More sharing options...
Jerry_Peoples Posted August 23, 2016 Author Share Posted August 23, 2016 RunAsWait("Administrator", "Ardex", "AdminPassword", $RUN_LOGON_NETWORK, @ScriptDir & "C:\Batch\FortiClientOnlineInstaller.exe") still no luck. the folder Batch is on the C:\ drive i am wondering if the @ScriptDir might have something to do with it? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 23, 2016 Moderators Share Posted August 23, 2016 @scriptdir is a macro for the location of your script. So if you have the script in C:\Temp, it will resolve to that. So, your code above, in this case, would resolve to C:\TempC:\Batch\FortiClientOnlineInstaller.exe. See now why it is failing? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Jerry_Peoples Posted August 23, 2016 Author Share Posted August 23, 2016 its like a veil is lifted thanks Link to comment Share on other sites More sharing options...
Jerry_Peoples Posted August 23, 2016 Author Share Posted August 23, 2016 ok, i should have slowed my roll i changed the part of the code from C:\Batch\FortiClientOnlineInstaller.exe to just \FortiClientOnlineInstaller.exe put the folder batch back on the desktop and ran it still nothing looking at the code @ScriptDir & "C:\Batch\FortiClientOnlineInstaller.exe" the ScriptDir is saying, where ever that script is at the exe has to be in the same folder. which in this case they are in the same folder so it should resolve to it once i made the adjustment or am i being dense, i have been known to be dense Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 23, 2016 Moderators Share Posted August 23, 2016 If the install executable is in the same folder as your script then @ScriptDir & "\FortiClientOnlineInstaller.exe" should work. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Jerry_Peoples Posted August 23, 2016 Author Share Posted August 23, 2016 should the quotes be around the exe? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 23, 2016 Moderators Share Posted August 23, 2016 I guess I am not understanding your question? @ScriptDir is a macro, so you would not surround it with quotes. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Jerry_Peoples Posted August 23, 2016 Author Share Posted August 23, 2016 @ScriptDir & "\FortiClientOnlineInstaller.exe" this was the code i cut and pasted and adjusted accordingly to what i later posted Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 23, 2016 Moderators Share Posted August 23, 2016 So are you saying Run(@ScriptDir & "\FortiClientOnlineInstaller.exe") does not launch the executable? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Jerry_Peoples Posted August 23, 2016 Author Share Posted August 23, 2016 1 hour ago, JLogan3o13 said: So are you saying Run(@ScriptDir & "\FortiClientOnlineInstaller.exe") does not launch the executable? should the ( ) be around the @ScriptDir and the .exe" the initial code i copied from you did not include that RunAsWait("Administrator", "MyDomain", "MyPassword", $RUN_LOGON_NETWORK, @ScriptDir & "\Setup.exe") Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now