XmangiaX Posted June 1, 2012 Share Posted June 1, 2012 Hi All! I am trying to install Google Chrome across my network. I do not like the functionality (or lack thereof) of installing applications via GPO's. So I want to create an .exe and drop it it my GPO instead.I have created a script that I think is pretty simple, but I keep getting an error. If FileExists("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe") Then exit ENDIF If FileExists("C:\Program Files\Google\Chrome\Application\chrome.exe") Then exit ENDIF SplashTextOn("Google Chrome Installation", "This PC is currently installing Google Chrome. Please be patient. Thank you. Office of Information Technology", 500, 100, 5, 5, 4, "Gothic", 14) BlockInput(1) ShellExecuteWait("msiexec /i '\\DOMAINNAME\NETLOGON\Deployment\GoogleChrome\GoogleChromeStandaloneEnterprise.msi'") BlockInput(0) SplashOff() exit I get the Splash Screen to pop up then I get an error message When it tries to run my "ShellExecuteWait" statement. Any help is appreciated. Thank you in advance **Attached is a screenshot of error message** Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 1, 2012 Moderators Share Posted June 1, 2012 Hi, XmangiaX. The error is telling you what you've done wrong. In this line:ShellExecuteWait("msiexec /i 'DOMAINNAMENETLOGONDeploymentGoogleChromeGoogleChromeStandaloneEnterprise.msi'")First off, you need to separate the executable and the parameters with a comma, like this:ShellExecuteWait("msiexec.exe", '/i "DOMAINNAMENETLOGONDeploymentGoogleChromeGoogleChromeStandaloneEnterprise.msi"')Secondly, it is telling you it cannot find DOMAINNAMENETLOGONetcetc. You have to put in a real path to your msi, not just DOMAINNAME. Try something like this:ShellExecuteWait("msiexec.exe", '/i "<Name of your Server><Name of the Share>DeploymentGoogleChromeGoogleChromeStandaloneEnterprise.msi"') "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...
XmangiaX Posted June 1, 2012 Author Share Posted June 1, 2012 Hi JLogan. Thanks for the super fast reply. I just ommited my domain name on purpose for some reason. I did not know about seperating with the comma I will go try this now. Again thanks! Link to comment Share on other sites More sharing options...
XmangiaX Posted June 1, 2012 Author Share Posted June 1, 2012 *Update* I altered my script as you suggested and that got rid of the error. However I got a new error. It seems to think I dont have access to the file on the server share. And as you can see in my screenshot i can browse to the directory where the .msi resides. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 1, 2012 Moderators Share Posted June 1, 2012 (edited) Can you show your updated code please? You can put in <mydomainname> for the first part of the path. Edited June 1, 2012 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...
XmangiaX Posted June 1, 2012 Author Share Posted June 1, 2012 I've left work now. I will update tomorrow. Thanks Link to comment Share on other sites More sharing options...
XmangiaX Posted June 3, 2012 Author Share Posted June 3, 2012 (edited) If FileExists("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe") Then exit ENDIF If FileExists("C:\Program Files\Google\Chrome\Application\chrome.exe") Then exit ENDIF SplashTextOn("Google Chrome Installation", "This PC is currently installing Google Chrome. Please be patient. Thank you. Office of Information Technology", 500, 100, 5, 5, 4, "Gothic", 14) BlockInput(1) ShellExecuteWait("msiexec.exe", '/i "\\cluster1\shared\Deployment\GoogleChromeStandaloneEnterprise.msi"') BlockInput(0) SplashOff() exit Edited June 3, 2012 by XmangiaX Link to comment Share on other sites More sharing options...
XmangiaX Posted June 3, 2012 Author Share Posted June 3, 2012 I changed the deployment area from Netlogon to a server share. In my prior post you can see that the computer can navigate to the server share, but its telling me I dont have access..... Thanks again for any assistance. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted June 4, 2012 Share Posted June 4, 2012 *Update*I altered my script as you suggested and that got rid of the error. However I got a new error. It seems to think I dont have access to the file on the server share. And as you can see in my screenshot i can browse to the directory where the .msi resides.That looks like it could be a messagebox from the Windows Installer service, which runs under the LocalSystem user. Can it browse the folder too? .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
XmangiaX Posted June 4, 2012 Author Share Posted June 4, 2012 Will check this in a moment. Link to comment Share on other sites More sharing options...
XmangiaX Posted June 4, 2012 Author Share Posted June 4, 2012 OK ive altered my script even more.... I copied the file to the root of C: now. Does "ShellExecuteWait" run on windows 7? If FileExists("C:Program Files (x86)GoogleChromeApplicationchrome.exe") Then exit ENDIF If FileExists("C:Program FilesGoogleChromeApplicationchrome.exe") Then exit ENDIF SplashTextOn("Google Chrome Installation", "This PC is currently installing Google Chrome. Please be patient. Thank you. Office of Information Technology", 500, 100, 5, 5, 4, "Gothic", 14) BlockInput(1) FileCopy("cluster1SHAREDDeploymentGoogleChromeGoogleChromeStandaloneEnterprise.msi", "c:") ShellExecuteWait("msiexec.exe", '/i "C:GoogleChromeStandaloneEnterprise.msi"') BlockInput(0) SplashOff() exit Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 4, 2012 Moderators Share Posted June 4, 2012 (edited) Yes ShellExecuteWait runs on Windows 7. Try this, and let us know if you see the MSI installing: If FileExists(@ProgramFilesDir & "GoogleChromeApplicationchrome.exe") Then Exit Else SplashTextOn("Google Chrome Installation", "This PC is currently installing Google Chrome. Please be patient. Thank you. Office of Information Technology", 500, 100, 5, 5, 4, "Gothic", 14) BlockInput(1) FileCopy("cluster1SHAREDDeploymentGoogleChromeGoogleChromeStandaloneEnterprise.msi", "c:") ShellExecuteWait("msiexec.exe", '/i "C:GoogleChromeStandaloneEnterprise.msi" /qb') BlockInput(0) SplashOff() EndIf Edited June 4, 2012 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...
BrewManNH Posted June 4, 2012 Share Posted June 4, 2012 You could also do it this way: ShellExecuteWait("C:GoogleChromeStandaloneEnterprise.msi" , "/qb") Because ShellExecute uses the program assigned to the filetype automatically, there's no need to execute the msiexec program inside the command, just let Windows run the program assigned to running .msi files. Either way should work, but there's less typing when you don't put things in the command that are unnecessary. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
XmangiaX Posted June 4, 2012 Author Share Posted June 4, 2012 @JLogan3of13 It is not installing..... I have a brand new Windows 7 machine I am testing on. It is on the network and in the group I assigned for the GPO to run the setup file I compiled. If I take the actual .exe file I made and run it on the machine it will work. When I make it a part of the Computer Configuration under PoliciesWindows SettingsScriptsStartup it will not run... Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 4, 2012 Moderators Share Posted June 4, 2012 Ok, if the file is running fine when you do it manually, it is not a problem with your script but with the GPO. "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...
BrewManNH Posted June 4, 2012 Share Posted June 4, 2012 When you run it on the computer, not using GP, does it display any GUIs when it's run? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
XmangiaX Posted June 4, 2012 Author Share Posted June 4, 2012 when i run the file locally on the computer I see my window with the message I created and a staus bar.... thats it.. then it unlocks the keyboard and I have Chrome installed. Why it wont run in a GPO is KILLING ME!!! Link to comment Share on other sites More sharing options...
XmangiaX Posted June 4, 2012 Author Share Posted June 4, 2012 THanks everyone for your help.. My script works perfectly now.. I know this isnt a place for MS help, so I will continue on my own now. THis place is awesome by the way and I am sure I will be utilizing it more in the future... Thanks for all of your help to everyone who assisted me! Link to comment Share on other sites More sharing options...
BrewManNH Posted June 4, 2012 Share Posted June 4, 2012 Well, first of all, if you're running it from a GP at boot up, get rid of the splashscreen because no one is going to see it. Get rid of the BlockInput, because no one is able to interact with the computer at this point anyways so it's pointless. You don't need the /qb in the ShellExecute line, because you can't interact with the program while it's installing so use /qn which eliminates any user interface as well. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 4, 2012 Moderators Share Posted June 4, 2012 Actually, I think BrewManNH may have hit the nail on the head. If I recall correctly from my MCSE days, applications deployed via GPO default to the SYSTEM account. If you put in things like Splash images and BlockInput, I don't think it will work correctly. I would suggest stripping everything but the MSI line itself and see if it deploys correctly. Then you can play around with re-adding your file check. "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...
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