Solved

Can GPO startup scripts run in cscript.exe instead of wscript?

Posted on 2003-11-04
2
1,151 Views
Last Modified: 2012-06-21
Simple question- I'm trying to convert my company's login and startup scripts from .bat to .vbs.  We like to "echo" things to notify the user of whats going on.  When I wscript.echo in the startup script, it pops up messageboxes.  I'd like the cscript command window.  Is this possible?  I don't know where a setting would be to change this.

I realize I could call cscript.exe from a .bat, but I'd rather avoid that if possible.

Thanks.
0
Comment
Question by:bohiti
2 Comments
 
LVL 9

Accepted Solution

by:
svenkarlsen earned 125 total points
Comment Utility
Basically, if you have the script ready, you can call it from another script:

   Set objShell = CreateObject("WScript.Shell")
   strCmdLine = "cmd /k cscript.exe script.vbs"
   objShell.Run(strCmdLine)

You can elaborate on that to make e.g. a menu with the scripts you use..
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now