Logon scripts

N

need

Hi,

I'm new to scripts, so i would be very happy if someone
takes a bit of his time to answer my questions.
Following Q322241 i tried to assign a logon script from
reskit (Listspace.vbs). But when the machine that is
supposed to run the script starts, it displays error
message "please run this script using Cscript. This can be
achieved by...".
I did some search and i got to jsi tip 2531.
Now i have 2 questions :
1. How do i figure out whether a script is using Csript or
Wscript?
2. Lets say the default script engine is set to Wscript.
Then when i assing logon Cscripts, what syntax do i use to
tell Windows that this is Cscript?
thanks all.
 
A

Ace Fekay [MVP]

In
posted their thoughts said:
Hi,

I'm new to scripts, so i would be very happy if someone
takes a bit of his time to answer my questions.
Following Q322241 i tried to assign a logon script from
reskit (Listspace.vbs). But when the machine that is
supposed to run the script starts, it displays error
message "please run this script using Cscript. This can be
achieved by...".
I did some search and i got to jsi tip 2531.
Now i have 2 questions :
1. How do i figure out whether a script is using Csript or
Wscript?
2. Lets say the default script engine is set to Wscript.
Then when i assing logon Cscripts, what syntax do i use to
tell Windows that this is Cscript?
thanks all.


Not much of a scripter, but the way I see it, if the default host is set to
CScript, the results will be run without prompting the user for a response.
Using WScript will popup those message boxes that the user will need to say
OK to each time.

To change the default host to Cscript:
cscript //H:script, such as this:

C:\>cscript //H:cscript
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

The default script host is now set to "cscript.exe".

Now it will use cscript to run the script.
You can also add this in the script in the beginning, then change it back to
Wscript in the end of the script.

Wscript //H:Wscript

Hope that helped.


--
Regards,
Ace

Please direct all replies to the newsgroup so all can benefit.

Ace Fekay, MCSE 2000, MCSE+I, MCSA, MCT, MVP
Microsoft Windows MVP - Active Directory
 
N

need

Thanks both !
i still got few questions, but your posts helped me answer
some of them. Thanks again.
 
N

need

Thanks both !
i still got few questions, but your posts helped me answer
some of them. Thanks again.
 
A

Ace Fekay [MVP]

In
posted their thoughts said:
Thanks both !
i still got few questions, but your posts helped me answer
some of them. Thanks again.

No prob!
Cheers!

--
Regards,
Ace

Please direct all replies to the newsgroup so all can benefit.

Ace Fekay, MCSE 2000, MCSE+I, MCSA, MCT, MVP
Microsoft Windows MVP - Active Directory
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Logon Scripts - CScript vs WScript? 4
Running a VBS script 4
Logon Scripts 1
Logon Script 1
Order of Scripts running in OU's 5
Logon Scripts in GPO 5
logon scripts 1
Logon scripts 3

Top