
chaoticyeshua
MemberContent Type
Profiles
Forums
Events
Everything posted by chaoticyeshua
-
@kornboy82 Sorry, when I told you the StringTrimRight(@ScriptDir, 13) I was wrong. It's actually 14. I didn't take into account the "\" which needed to be trimmed also. I created this directory structure: \WPI\Install\AutoItScripts\Office_Installer.exe \WPI\Install\Office\setup.exe The contents of my script that is in the AutoItScripts folder is this: $Directory = StringTrimRight(@ScriptDir,14) RunWait($Directory & "\Office\setup.exe") The StringTrimRight(@ScriptDir,14) takes the @ScriptDir path of \WPI\Install\AutoItScripts and trims it 14 characters from the right, so you're left with: \WPI\Install Using this, it calls the setup.exe in the Office folder whether I'm running it inside or outside of WPI. Oh, and also, if you're wanting to automate button clicks, then you can't use RunWait. Use Run like you were doing originally. I didn't know that was your intention when I told you to use RunWait, so I apologize for the confusion. I hope this helps.
-
I like to maintain my ability to use unattended setups whether I'm installing 30 apps using WPI or one not using WPI.
-
First off, using the Run function could be a bad idea when combining it with WPI. If you call the AutoIT script with WPI, the RUN function does not wait for the install to finish before it continues with the next command, so WPI could continue to the next installer before Office is even finished installing. Replace Run with RunWait. As for changing the path within the AutoIT script try this: RunWait(@ScriptDir & "\path\to\OfficeSetup") The @ScriptDir changes the working directory to the folder the script is being run from. This should fix the majority of your problems entirely. As for regedit not working, it could be due to the path being weird again, so try the @ScriptDir for that as well. So: RunWait("Regedit /s " & @ScriptDir & "\path\to\RegistryFile.reg") This calls regedit with the silent switch, changes the directory to the script directory, and you supply the rest of the path as above with the Office example. If you're running WPI in Windows Vista, however, and UAC is still enabled, you may run into some issues. To fix this, just make sure you right click WPI.hta and select Run As Administrator. If UAC is disabled, you shouldn't need to do that though. Just in case this is a little confusing, here are a couple examples from scripts that I actually use. These scripts are located in the same directory as what I'm needing to call. This checks the operating system version and applies the tweaks for the one I need: If @OSVersion="WIN_XP" Then RunWait("regedit /s " & @ScriptDir & "\Tweaks-XP.reg") EndIf If @OSVersion="WIN_VISTA" Then RunWait("regedit /s " & @ScriptDir & "\Tweaks-Vista.reg") EndIf This checks if Office 2003 is installed first, then runs the command if it's not. If not FileExists(@ProgramFilesDir & "\Microsoft Office\Office11\WINWORD.EXE") Then RunWait(@SystemDir & "\msiexec /i " & '"' & @ScriptDir & "\PRO11.msi" & '"' & " TRANSFORMS=Unattended.mst /norestart /qb") EndIf The above RunWait() is more or less this batch command: 'msiexec /i "PathToScript\PRO11.msi" TRANSFORMS=Unattended.mst /norestart /qb' --- EDIT: From the directory structure you provided me, I was a little confused... Are your scripts located in their own folder, i.e. "\WPI\Install\AutoItScripts\" or did you mean that your scripts are actually IN the Install folder? If they're in their own directory then you can do this in each script to get the right path to the Install folder: Add this variable at the top of the script. This would trim the @ScriptDir path that is provided from the RIGHT by 13 characters, making the path "\WPI\Install\" instead: $Directory=StringTrimRight(@ScriptDir,13) AutoItScripts is 13 characters. From then on, instead of @ScriptDir you could use $Directory instead, so something like this: RunWait($Directory & "\Office\setup.exe") As you can see, it's easier to just have each individual script located in the same directory with the setup you're wanting it to call.
-
I use AutoIT scripts for a LOT of different things combined with WPI. Out of curiosity, give me the directory structure of something that's not working correctly and its corresponding AutoIT script. I might be able to help solve your problem. You shouldn't need batch files for anything.
-
WPI can't do this, but AutoIT can. You can get it here: http://www.autoitscript.com/autoit3/index.shtml There are several examples you can look at that are posted in the Application Installs forum here at the MSFN forums. It's stickied so it should be very easy to find. Also, the help file for AutoIT is extremely useful, and if it can't help you with what you need, there are many people at the AutoIT forums that would be more than willing to help.
-
The easiest way is to set the environment variable "SEE_NO_ZONEMASKS" to 1. If you'd rather call WPI.hta with a batch script then use this command before running WPI: SET SEE_MASK_NOZONECHECKS=1 If you'd rather call WPI.hta with an AutoIT script then use this command before running WPI: EnvSet("SEE_MASK_NOZONECHECKS",1) Either way should prevent those messages from coming up entirely. Another way is through group policy, but that requires several registry changes. Changing the environment variable is much easier. This post, within the code posted, shows the registry keys that need to be added/changed if you'd prefer to do it that way. I hope this helps.
-
Batch File not copying over to c:\drive
chaoticyeshua replied to 1to1's topic in Windows Post-Install Wizard (WPI)
In my experience, it does the same thing for msi files, but I always have my commands structured the same way you do. -
That would be great You've come up with so many awesome ideas the past few versions... This project just keeps getting better and better. Keep it up guys!!!!!
-
Need help with portables
chaoticyeshua replied to vinaypro's topic in Windows Post-Install Wizard (WPI)
To do this in WPI, just put them in your Install folder and run one of these commands, depending where you want the folder to copy to {DIRCOPY} %wpipath%\Install\FolderToCopy %systemdrive%\FolderToCopyTo <-- To copy directly to the system drive (usually C:\) {DIRCOPY} %wpipath%\Install\FolderToCopy %programfiles%\FolderToCopyTo <-- To copy directly to the Program Files directory {DIRCOPY} %wpipath%\Install\FolderToCopy %systemroot%\FolderToCopyTo <-- To copy directly to the Windows directory If it's just a single file, then use: {FILECOPY} %wpipath%\PathToFile\File.txt %systemdrive%\PathToDestination\File.txt You can still use %programfiles%, %systemroot%, etc. or not even use them at all if you know for sure the path where they will be going. -
the guide of "Using autoit for silent install"
chaoticyeshua replied to master_mtz's topic in Application Installs
If it's that big of a deal, you could always just move the window off screen using something like this: WinWait("Title","Text") WinMove("Title","Text",-1000,-1000) This way it'll wait for the window to exist, then move it off of the screen where it is no longer visible. It will show for a split second, then be moved. -
CMD doesn't wait WPI closes
chaoticyeshua replied to brenza's topic in Windows Post-Install Wizard (WPI)
Try this: -
7.2.0 Buglist...
chaoticyeshua replied to Kelsenellenelvian's topic in Windows Post-Install Wizard (WPI)
I've been talking with mritter about this and I think he's gotten it fixed for the next version already. Are you specifying a config file via the config=whatever.js command line parameter? If so, that is why it's not working. -
Couple of random WPI questions.
chaoticyeshua replied to freeAppz's topic in Windows Post-Install Wizard (WPI)
I'm not sure how to answer your question. I always used other peoples' addons since they came with updates and everything. I've never actually made an addon for IE7 myself, sorry You might want to ask on one of the forums I linked. Maybe they can even direct you to a Swedish addon, but I couldn't find one when I was looking for you. -
Couple of random WPI questions.
chaoticyeshua replied to freeAppz's topic in Windows Post-Install Wizard (WPI)
There are a few addons over on RyanVM's site for IE7 integration. The ones I've found are all in English, but it should at least give you an idea of what you can do, or what you are looking for. Here is one you could take a look at as an example. This is the one I used for a long time before OnePiece released a pack that includes Windows updates, IE7, and Windows Media Player 11... -
7.2.0 Buglist...
chaoticyeshua replied to Kelsenellenelvian's topic in Windows Post-Install Wizard (WPI)
Nope, haven't modified a thing. -
Tip for running WPI from network-share...
chaoticyeshua replied to AlBundy33's topic in Windows Post-Install Wizard (WPI)
I am by NO MEANS a good coder. In fact I'd go as far as to say I suck. But I absolutely love AutoIT, as it is extremely powerful, and I decided to write a version of this script in it. This is what works for me. Feel free to add/change things as you guys see fit, and clean it up some if you'd like. It actually works quite a bit faster than the cmd file. Please note my comments, especially the ones at the top of the script. Just copy and paste the code into SciTE and compile it once you're done editing. ;This script can run either one folder up from WPI.hta directly from the share itself or from another location if you specify the share. ;The directory structure must be like this: SomePath\SomeFolder\WPI\ where WPI.hta is in the WPI folder and this script is either in SomeFolder OR ;a share is specified with SomeFolder shared (as in, the share path would look like \\server\share\WPI with WPI.hta in the WPI folder) AutoItSetOption("TrayIconHide",1) ;Change these values to suit your needs. You can also get rid of the If/ElseIf statements in the CallWPI function if you just use one config. Global $CONFIG1="CONFIGXP.JS" Global $CONFIG2="CONFIGVISTA.JS" Global $USERNAME="" Global $PASSWORD="" Global $SHARE="" ;Global variables needed for the rest of the program... DON'T CHANGE THESE VALUES. Global $IEDebWritten=false Global $DebWritten=false Global $DRIVE="" EnvSet("SEE_MASK_NOZONECHECKS",1) SetDrive() SetDebugger() CallWPI() ResetDebugger() UnmapDrive() EnvSet("SEE_MASK_NOZONECHECKS") Exit Func SetDrive() $trimmedpath=StringTrimRight(@ScriptDir,StringLen(@ScriptDir)-2) If StringLen($SHARE)=0 Then If $trimmedpath="\\" and $USERNAME="" Then $DRIVE=DriveMapAdd("*",@ScriptDir,8) ElseIf $trimmedpath="\\" and StringLen($USERNAME)>0 Then $DRIVE=DriveMapAdd("*",@ScriptDir,8,$USERNAME,$PASSWORD) ElseIf FileExists($trimmedpath & "\WPI.exe") Then $DRIVE=$trimmedpath Else $DRIVE=@ScriptDir EndIf ElseIf StringLen($SHARE)>0 and $USERNAME="" Then $DRIVE=DriveMapAdd("*",$SHARE,8) ElseIf StringLen($SHARE)>0 and StringLen($USERNAME)>0 Then $DRIVE=DriveMapAdd("*",$SHARE,8,$USERNAME,$PASSWORD) EndIf EndFunc Func SetDebugger() $IEDebValue=RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "DisableScriptDebuggerIE") If $IEDebValue="yes" Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "DisableScriptDebuggerIE", "REG_SZ", "no") $IEDebWritten=true ElseIf @error Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "DisableScriptDebuggerIE", "REG_SZ", "no") EndIf $DebValue=RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Disable Script Debugger") If $DebValue="yes" Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Disable Script Debugger", "REG_SZ", "no") $DebWritten=true ElseIf @error Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Disable Script Debugger", "REG_SZ", "no") EndIf EndFunc Func CallWPI() If @OSVersion<>"WIN_Vista" Then RunWait(@SystemDir & "\mshta.exe " & '"' & $DRIVE & "\WPI\WPI.hta" & '"' & " config=" & '"' & $DRIVE & "\WPI\WPIScripts\" & $CONFIG1 & '"',"") ElseIf @OSVersion="WIN_Vista" Then RunWait(@SystemDir & "\mshta.exe " & '"' & $DRIVE & "\WPI\WPI.hta" & '"' & " config=" & '"' & $DRIVE & "\WPI\WPIScripts\" & $CONFIG2 & '"',"") EndIf EndFunc Func ResetDebugger() If $IEDebWritten=true Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "DisableScriptDebuggerIE", "REG_SZ", "yes") EndIf If $DebWritten=true Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Disable Script Debugger", "REG_SZ", "yes") EndIf EndFunc Func UnmapDrive() If DriveMapGet($DRIVE)=@ScriptDir or DriveMapGet($DRIVE)=$SHARE Then DriveMapDel($DRIVE) EndIf EndFunc -
7.2.0 Buglist...
chaoticyeshua replied to Kelsenellenelvian's topic in Windows Post-Install Wizard (WPI)
Using the Exit button in the lower-right of the Config or Options windows will not load my config file again once they are closed. However, if I select Config to exit Config or Options to exit Options, it will re-load the config file. Am I the only one experiencing this? -
Thanks Kel. I'll try that when I'm at work again. Seems strange though, cause I had the switches inside my quotes before and it always worked fine. I never edited the useroptions.js manually until yesterday, so I don't think it converted correctly. I'll give that a shot. Thanks again mritter, and good job to both of you on this version. It's the best yet.
-
Only one category is showing up in the category sort order box. The rest never do, but it's not entirely empty either. I just thought I had fixed it by the way, but I guess I didn't. I had just specified them manually in the useroptions.js file and then it worked... until I clicked save in the options window anyway. I'm using the Leopard theme (unmodified at the moment). Here's one of my config.js files and my useroptions.js Also, very unrelated, but maybe you know why... I had a problem running this command: "%wpipath%\Install\CodecsRuntimes\Java6u11.exe -ai" <-- RogueSpear's installer I checked the path like 8 million times. It's right. It installs fine when I do roughly the same command in a command prompt or call an AutoIT script in WPI to install it instead, but WPI always says the command fails. When I downloaded Kels's installer it worked fine, using the same command minus the "-ai". Not sure what happened. Do you know? config.js useroptions.js
-
Edit: nevermind, fixed my own problem.
-
Small 'x' on WPI CD interface buttons?
chaoticyeshua replied to nmdelrio's topic in Windows Post-Install Wizard (WPI)
Are you saying this is strictly an IE6 issue? I use IE7 and it shows up like that for me. It even does on Windows Vista machines. -
Small 'x' on WPI CD interface buttons?
chaoticyeshua replied to nmdelrio's topic in Windows Post-Install Wizard (WPI)
Thanks mritter. I really appreciate all of your hard work on this. I'm looking forward to the next version and I'm sure it'll be great. -
Small 'x' on WPI CD interface buttons?
chaoticyeshua replied to nmdelrio's topic in Windows Post-Install Wizard (WPI)
I see them on my network share as well. I use the Leopard theme, and the only thing I changed on it was the title bar (just change the image name call and nothing else). -
Some tips about xp, ie7 deployment
chaoticyeshua replied to SirHaschke's topic in Windows Post-Install Wizard (WPI)
Hmmmm... I don't know why %~dp0 doesn't work for you. It works fine for me. I put xcacls.exe in a path with spaces and it even worked by doing this: "%~dp0"xcacls.exe But your path doesn't have spaces, so it should work anyway. You could always just search for a file on the root of the CD to set the %cdrom% variable. You can do that by using this: FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\whateverfile.fil SET CDROM=%%i: If WPI.hta is the file you're searching for, then change whateverfile.fil to WPI.hta... then you can use %CDROM% as a variable pointing to the root of your CD. But if you've already got it working, then good