Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

VBS instead of CMD for RunOnceEx?

Featured Replies

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

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

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.

  • 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

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.

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.

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 it

if 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.

:)

What I said is that WMI is not available during that part of Windows XP setup (cmdlines.txt).

VBS works at T-12 ...

My cmdlines.txt file :

[COMMANDS]

"WScript cmdlines.vbs"

and cmdlines.vbs is the script :

Dim VarShell, VarIE

Set VarShell = CreateObject("WScript.Shell")

...

...

Like cmdlines.txt, cmdlines.vbs is located in $OEM$

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

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.