Doc Symbiosis Posted July 16, 2005 Posted July 16, 2005 (edited) [edit]This is just one BIG EDIT and so these edit quotes will never appear again. I mixed the whole thing a little bit up, so now from scratch.[\edit]Hi there,I thought, this might interst someone. This is a guide howto run WPI from a network share (works with 3.6 and 4.3.5 combined with XPSP2):Assuming you have a fileserver named "server" a share on it named "software". Further one folder "swinstall" with two subfolders "WPI" and "setupfiles".Follow these instructions to be able to run wpi i.e. out of command line or runonceex.cmd with "\\server\software\wpi\wpi.cmd".I think it is system-language-independent, works at least with englisch and german system language.I attached both files I modified.At first use the attached WPI.cmd and just change the names of the networkshare, the setup-files-directory and the WPI-directory (lines 4-6) and perhaps make other modifications for your special needs.By the way in the WPI.cmd in the comment connect to the "last" free drive and write it to drvlet, means that windows searches for free driveletters backwards and those letters to which a local device was assigned anytime ago, are left out for the first.Second thing is to use the attached generate.js or to add to your generate.js the following function:function FindSWPath(){ position = "generate.js" swpath = WshShell.regRead("HKCU\\Software\\WPI\\SWPath"); swpath = swpath +'\\' return swpath;}and to the function replpath in generate.js you add the lines swdir = FindSWPath(); rs = rs.replace(/%swpath%/gi, swdir);the second one of course placed afterrs = new String();rs = u;That's it, now you can use %SWPATH% in your config.js as path to your setupfiles, e.g.prog[pn]=['Mozilla 1.7.11']uid[pn]=['MOZILLA']desc[pn]=['Installs Mozilla 1.7.11']ordr[pn]=[405]cmd1[pn]=['%SWPATH%\\Mozilla.exe -ma -ira']dflt[pn]=['yes']cat[pn]=['Apps']pn++generate.jsWPI.cmd Edited September 15, 2005 by Doc Symbiosis
Kelsenellenelvian Posted July 16, 2005 Posted July 16, 2005 Thank you Doc for this little tid-bit it will definately have to be added to the manual.
Sonic Posted July 18, 2005 Posted July 18, 2005 Good idea to use regedit to store path/retrieve !Personnaly, I just modify the batch to create a network drive and all runs fine
Earthcoder Posted July 19, 2005 Posted July 19, 2005 (edited) Hi,FSUTIL does not work with Windows 2k is there a alt i can use.'fsutil' is not recognized as an internal or external command,operable program or batch file.Basically I wanna make a windows 2k install with all software in a wpi with the software running from our server here in office. Edited July 19, 2005 by Earthcoder
Doc Symbiosis Posted July 19, 2005 Author Posted July 19, 2005 Perhaps try to copy the fsutil.exe from a XP system and put it into your system32 folder. I don't know if this works, but I think, it's worth a try.
Krim Posted September 13, 2005 Posted September 13, 2005 (edited) Hello,I am trying to get the changes in the first post to work although i am having no such luck with 4.3.5If i run WPI through a virtual machine that has a mapping to a read/write share i keep receiving the following error message:edit: ok i didnt map to the share but since i have i receive the following errormessage: 'swdir' is undefinedurl: file//Y:\WPI_4.3.5\WPI.htafile: api.jsline: 135and when i run it a second time i receivemessage: 'swdir' is undefinedurl: file//Y:\WPI_4.3.5\WPI.htafile: generate.jsline: 135If i run WPI on the local machine with a network mapping to itself WPI seems to hang and not install anything.Do these instructions even work with WPI 4.x.x versions ?If they do can someone confirm where the extra function and line of code should go in generate.js file. eg. which lines.---Lastly, i have searched and searched and searched but cannot find any definitive guide on how to use WPI using network shares. Instead of creating a new thread I would greatly love and appreciate anyone able to point me in the right direction on how to set this up properly !!! Thanks in advance and keep up the good work ! Edited September 13, 2005 by Krim
Doc Symbiosis Posted September 13, 2005 Author Posted September 13, 2005 Hi there,I'm sorry, but I missed one line:In the generate.js in the function replpath(u) you've got to insert the following line:swdir = FindSWPath();With this it should work. Thanks for the hint. I edited my first post.
Krim Posted September 13, 2005 Posted September 13, 2005 Hi there,I'm sorry, but I missed one line:In the generate.js in the function replpath(u) you've got to insert the following line:swdir = FindSWPath();With this it should work. Thanks for the hint. I edited my first post.<{POST_SNAPBACK}>Hiya,Thanks for the reply.I thought that was it but i cannot get it to work that way either using that function.If i specify a static drive like so: swdir = "W:";WPI will install the application correctly.If i use: swdir = FindSWPath();doesnt work ...Any ideas, something in my wpi.cmd ?Cheers,Krim.
Doc Symbiosis Posted September 13, 2005 Author Posted September 13, 2005 The function FindSWPath() reads your softwarepath out of the following regkey: HKCU\Software\WPI\SWPath. So in your WPI.cmd you have to ensure, that you write the SWpath to the registry, which is done in my example with the following lineREG ADD HKCU\SOFTWARE\WPI /v SWPATH /t REG_EXPAND_SZ /d "%drvlet%\%Appdir%" /fHope this helps, if not, don't hesitate to ask again.
Krim Posted September 13, 2005 Posted September 13, 2005 (edited) The function FindSWPath() reads your softwarepath out of the following regkey: HKCU\Software\WPI\SWPath. So in your WPI.cmd you have to ensure, that you write the SWpath to the registry, which is done in my example with the following lineREG ADD HKCU\SOFTWARE\WPI /v SWPATH /t REG_EXPAND_SZ /d "%drvlet%\%Appdir%" /fHope this helps, if not, don't hesitate to ask again.<{POST_SNAPBACK}>hi doc,I changed your line to:REG ADD HKEY_CURRENT_USER\SOFTWARE\WPI /v SWPATH /t REG_EXPAND_SZ /d "%drvlet%\%Appdir%" /fI can now see the reg key appear in the registry location as expected although WPI still seems to do nothing when i click begin install.Any other ideas?Could you send me a copy/post on here your WPI files?edit: I ran the following in its own .cmd file:REM put the sharename and the application directory into variablesset share=\\IBM-99TWCXV\software$set appdir=REM detect the first free drive letter and set it to drvletfor %%a in (c d e f g h i j k l m n o p q r s t u v w x y z) do (fsutil fsinfo drivetype %%a:|find "No such Root Directory">nul 2>&1&&call :check %%a:)REM Connect the softwareshare to drvletnet use %drvlet% %share%REM Write the app-path to the regsitryREG ADD HKEY_CURRENT_USER\SOFTWARE\WPI /v SWPATH /t REG_EXPAND_SZ /d "%drvlet%\%Appdir%" /fECHO doneIt populates the registry key SWPATH with the contents following:" /fThat aint right ?! edit 2:I guess the question is, what should be the correct contents of the SWPATH key in registry as it seems the automatic assigning of a drive letter isnt working in my situation. A workaround is to hard code it but id rather use your l337 method of dynamic drive assignment edit 3:sorry for so many edits but im sure this is the final thing that is stopping it from working. When running the above code for each iteration of the loop i receive:The system cannot find the batch label specified - check Edited September 13, 2005 by Krim
Kelsenellenelvian Posted September 14, 2005 Posted September 14, 2005 Personally I have no experience with networks so I can not help.
Doc Symbiosis Posted September 14, 2005 Author Posted September 14, 2005 Which system language do you use? I ask, because the command to find the first free drive letter only works on english systems. Check, if "No such Root Directory" is contained in the output, when you use "fsutil fsinfo drivetype x: " with a not existing drive x:. I'm working right now on a way to make it independent from the system language.therefo, you can use net use * \\server\share, which automatically uses the first free drive letter to connect the share to, but I till now, I can't get the drive letter out of the output of the command.Should be solved in a few hours at most days.
Krim Posted September 14, 2005 Posted September 14, 2005 (edited) Hey again,I am using Windows XP english version.If i change:fsutil fsinfo drivetype %%a:|find "No such Root Directory">nultofsutil fsinfo drivetype %%a:|find "No such Root Directory">null(notice the extra l on null)If i dont include the extra l the file doesnt get produced. Should a file named 'null' and 'call' be produced when you run the command?---I still dont understand what this part of the command is doing:2>&1&&call :check %%a:Is that even right with all the ampersands in there? (&1&&)---I get this for the fsutil command:C:\Documents and Settings\Administrator>fsutil fsinfo drivetype x:x: - No such Root Directory---Hey doc, still havent received your wpi.cmd via email yet. Did you send ? Edited September 14, 2005 by Krim
Krim Posted September 14, 2005 Posted September 14, 2005 Can you tell me the code which is assigning a drive letter to the variable %drvlet% ta.
Krim Posted September 14, 2005 Posted September 14, 2005 hiya,I blame it on 4hrs of sleep and 15hr days !!!Ive been running wpi.cmd and wpi.hta like it was the same thing.It just clicked that wpi.cmd is calling wpi.hta and not vice versa.No wonder ive had so many problems !!!It may have been worth it as i think its important to add to the original post that you need to map any drive to where WPI is located and run the wpi.cmd from there.If you use start->run to connect to the shared drive it will give you errors.Now your seperation of WPI and appplication storage makes much more sense !!Thanks for all your patience in this thread. You will now be seeing alot of posts from me regarding full software automation/unattended installs
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now