April 27, 200521 yr I am curious why all the examples I have seen use a CMD file for setting up RunonceEx stuff? I am thinking about building an install CD that builds RunOnceEx stuff based on machine name (wks_01-20 are admin machines, wks_21-XX are graphics machines with different apps), and I would rather handle the conditional stuff in VBScript, assuming I could even do it in a CMD.So, is there some reason why WSH isn't being used here? Best,Gordon
April 27, 200521 yr Because you build your ROE at T-12 and I am not sure (maybe you could test it?) if WSH is available at the moment. Building stuff based on computer name isnt hard from cmd - just use pipe and find command.For example:echo %computername% | find /i "wks_01" && If %errorlevel% EQU 0 Call wks_adm.bat
April 27, 200521 yr My cmdlines.txt and all of my RunOnceEx stuff is done in VBscript. I'm actually getting it all together in preparation to post here. As far as cmdlines.txt you need to be aware the you can only use cscript, not wscript. Also WMI is not available at that point either.
April 27, 200521 yr Author As far as cmdlines.txt you need to be aware the you can only use cscript, not wscript. Also WMI is not available at that point either.So it would seem that I can use the language I am familiar with, but I am still going to see a bit of a command line dialog. Oh well, not a big deal really.Thanks,Gordon
April 27, 200521 yr For what's it's worth, I wanted to use some vbs scripts for my application installs using the runonce. cmd method. We have our applications (MSIs) using transform files that we code through a vbs file. Could not get it to work, my guess is that the windows script handler is not available, although we haven't tried copying this to say... the system32 folder and executing from there.Experience tells me that the vbs currently fails using this method at the T-12 mark, so we went back to batch files instead (for the time being).If anyone has had any luck, I would be interested as well.
April 27, 200521 yr It's a little earlier than what I was hoping for, but I'll try to get all my stuff together and post with 24 hours. I just wanted to make sure everything was properly documented first. But the short answer is that yes you can run a vbscript from cmdlines.txt.
April 27, 200521 yr who said that WMI is not available.? the reason why you don't a lot of scripts here because people don't know how to do itif you have a winxp installed in your machine, it is available. you simply have to install WMI from MS for other machines.i know WMI and all MS scripts. i will see what i can do.
April 27, 200521 yr What I said is that WMI is not available during that part of Windows XP setup (cmdlines.txt).
April 28, 200521 yr VBS works at T-12 ...My cmdlines.txt file : [COMMANDS]"WScript cmdlines.vbs"and cmdlines.vbs is the script :Dim VarShell, VarIESet VarShell = CreateObject("WScript.Shell")......Like cmdlines.txt, cmdlines.vbs is located in $OEM$
April 29, 200521 yr i have a problem running WMI script using CIM_DATAFILE class on my winxp SP2 computer.i wonder if you have the same problem. If Anybody here knows what CIM_DATAFILE class in WMI is, can you run a small script which contains this class to see if you have any problem.?thank you
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now