GrowBigTrees Posted March 18, 2006 Share Posted March 18, 2006 (edited) Sometimes I use WPI on an US Windows XP, sometimes on a Dutch Windows XP.I now need to use duplicate code:prog[pn]=['RegShot v1.72']//STATUS: *** PROBLEM: a new Variable %StartMenuPrograms% in the WPI scripts would avoid multiple cmdlines....cmd1[pn]=['"%SHARE%UTIL\\REG\\RegShot\\RegShot.exe" /y -o"%programfiles%" ']//for Dutch Windows XP:cmd2[pn]=['CMD /C IF EXIST "%ALLUSERSPROFILE%Menu Start\\Programma\'s" mkdir "%ALLUSERSPROFILE%Menu Start\\Programma\'s\\IT Utilities\"']cmd3[pn]=['CMD /C IF EXIST "%ALLUSERSPROFILE%Menu Start\\Programma\'s" xxmklink.exe /q "%ALLUSERSPROFILE%Menu Start\\Programma\'s\\IT Utilities\\RegShot" "%PROGRAMFILES%RegShot\\RegShot.EXE']//for US Windows XP:cmd4[pn]=['CMD /C IF EXIST "%ALLUSERSPROFILE%Start Menu\\Programs" mkdir "%ALLUSERSPROFILE%Start Menu\\Programs\\IT Utilities\"']cmd5[pn]=['CMD /C IF EXIST "%ALLUSERSPROFILE%Start Menu\\Programs" xxmklink.exe /q "%ALLUSERSPROFILE%Start Menu\\Programs\\IT Utilities\\RegShot" "%PROGRAMFILES%RegShot\\RegShot.EXE']//add desktopicon to US windows XP:cmd6[pn]=['CMD /C IF EXIST "%ALLUSERSPROFILE%Start Menu\\Programs" xxmklink.exe /q "%ALLUSERSPROFILE%Desktop\\RegShot" "%PROGRAMFILES%RegShot\\RegShot.EXE']//add desktopicon to Dutch windows XP: (but no 7th cmd available)//cmd7[pn]=['CMD /C IF EXIST "%ALLUSERSPROFILE%Menu Start\\Programma\'s" xxmklink.exe /q "%ALLUSERSPROFILE%Desktop\\RegShot" "%PROGRAMFILES%RegShot\\RegShot.EXE']..uid[pn]=['REGSHOT']pn++I tried to use these numbers to no avail:; Shell Special Folders;; 16409 %ALLUSERSPROFILE%\Desktop; 16407 %ALLUSERSPROFILE%\Start Menu\ProgramsOr am i missing an obvious way to accomplish this? (i prefer creating the shortcuts from WPI rather than from a separate CMD file)Some other things on my wish-list:1) a variable for the harddisk which has the most free disk space. Reason: if there are multiple harddisk partitions, e.g. a C: containing the SYSTEM, and a D: containing the DATA, I want to install some games rather on the D:\GAMES\ than on the C:\GAMES2) an EXPORT tool, to create a WPI subset on one or more DVD's for instance. I now have a networkshare to run WPI from, and which is backed up to a large USB hard disk used for home installations. The Export tool now should display the normal screen with the available programs to install, but the selected programs and all else in the source folder they are in, are copied to a separate destination folder, together with a copy of WPI with it's config.js changed accordingly.3) I like to put hyperlinks in the description, but for the moment there is no way to click on them and open the link in a separate browser window:desc[pn]=[' <B><u>2006-03-05</B> </u>Small and secure browser with a built in popup stopper, security update feature, and custom theme support. See<UL><LI> Homepage: <a href="http://www.mozilla.com/firefox/"http://www.mozilla.com/firefox/><LI> Silent install 1: <a href="http://www.msfn.org/board/index.php?showtopic=20271">http://www.msfn.org/board/index.php?showtopic=20271</a><LI> Silent install 2: http://www.msfn.org/board/index.php?act=Print&client=printer&f=80&t=26240<LI> Silent install 3: <a href="http://www.madhon.co.uk/firefox/firefox08.msi">http://www.madhon.co.uk/firefox/firefox08.msi</a></UL> ']4) Install condition TRUE when newer version:I check wheter a file is present, to decide if WPI should show an item as installable:cond[pn]=['FileExists("%CDROM%INSTALL\\DNTU5x.msi") && !FileExists("%ProgramFiles%DameWare Development\\DameWare NT Utilities\\DNTUCnvt.exe")']I would like a mechanism that checks the version of the installed file. And if the source in WPI is more recent, it should display.5) Install condition FALSE when a registry hack is already there: I would like to do this in one way or another in cond[pn] prog[pn]=['Default Tweaks -- 1 --']//STATUS: to be verifieddflt[pn]=['yes']cond[pn]=['FileExists("%SHARE%UTIL\\REG\\Tweaks\\ComputerName.reg")']desc[pn]=['<BR><BR>Must-have <B>Default Tweaks -- 1 --</B>:<BR><BR><OL><LI>ComputerName<LI> DisableErrorReporting.reg<LI> DisableBrowseWebForProgramsToOpenUnknownExtensions.reg<LI> DisableHibernation.reg<LI> DisableSearchDriversonWU.reg<LI> DisableSecurityWarningPopupWhenRunningFiles.reg<LI> DisableAccFilterKeys.reg<LI> DisableAccStickyKeys.reg</OL><BR><BR>']regb[pn]=['%SHARE%UTIL\\REG\\Tweaks\\ComputerName.reg'] //OK after rebootcmd1[pn]=['regedit /s "%SHARE%UTIL\\REG\\Tweaks\\DisableErrorReporting.reg"']cmd2[pn]=['regedit /s "%SHARE%UTIL\\REG\\Tweaks\\DisableBrowseWebForProgramsToOpenUnknownExtensions.reg"']cmd3[pn]=['regedit /s "%SHARE%UTIL\\REG\\Tweaks\\DisableHibernation.reg"']cmd4[pn]=['regedit /s "%SHARE%UTIL\\REG\\Tweaks\\"DisableSearchDriversonWU.reg'] //OKcmd5[pn]=['regedit /s "%SHARE%UTIL\\REG\\Tweaks\\DisableSecurityWarningPopupWhenRunningFiles.reg"'] //NOKcmd6[pn]=['regedit /s "%SHARE%UTIL\\REG\\Tweaks\\DisableAccFilterKeys.reg"'] //rega[pn]=['%SHARE%UTIL\\REG\\Tweaks\\DisableAccStickyKeys.reg']configs[pn]=['Basic']cat[pn]=['Tweaks']uid[pn]=['DEFAULTTWEAKS1']//see info on registry on // http://programmerworld.net/win/registry.htm// http://www.tweakhound.com/xp/xptweaks/tweakbench.htmpn++6) Documentation: the condition for testing you're on a Windows 2003 server should be "03" instead of "2003":cond[pn]=['(getOSver()=="03" || getOSver()=="XP" || getOSver()=="2K") && FileExists("%SHARE%MicroSFT\\Windows Installer 3.1 (v2).fre\\WindowsInstaller-KB893803-v2-x86.exe") && !FileExists("%ProgramFiles%Java\\jre1.5.0_06\\Readme.txt")'] Edited March 19, 2006 by GrowBigTrees Link to comment Share on other sites More sharing options...
BoardBabe Posted March 19, 2006 Share Posted March 19, 2006 You can use AutoIT to install your apps as AutoIT has a built in variable for the path you are looking for. The variable @ProgramsCommonDir points to that dir. 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