Can't change the wsh version installed 
Author Message
 Can't change the wsh version installed

Hi All.
I have a script that I put in the netlogon on the server.
The script write to a text file in the server the space left in the
users "c" drive.
All the users that have wsh ver 5.1 run the script with no errors.
Users with
Wsh ver 5.6 (I installed there IE6) can't run the script and report an
error "the user didn't log on"
Why?...
Next I downloaded the wsh ver 5.1 from Microsoft site and installed
it, the installation was o.k but when I run a script to check the wsh
ver it keeps's telling me
That the ver. Is 5.6 . What should I do to install ver 5.1 or to fix
the script so it will run
On ver 5.6 here is the script
Thanks eran.
****************************************************
dim objfs
dim objfile
dim objts
dim wshobject

dim sinfofile
dim sinfo
dim wshnetname

dim drv
dim x
dim y
dim z

set wshobject=CreateObject("WScript.Network")
wshnetname=wshobject.username

set objfs=createObject("scripting.filesystemobject")
sinfofile=("\\xxx\test\test.txt")

set objfile =objfs.getfile(sinfofile)

set drv=objfs.getdrive("c")

x=drv.AvailableSpace

z= x/1050607

sinfo ="By the chack that was made at : " & now & vbcrlf & "The user :
" & wshnetname & vbcrlf & "Has: " & z & "freespace in drive C" &
vbcrlf & vbcrlf
set objts=objfile.openastextstream(8)
objts.writeline(sinfo)
objts.close
set objts=nothing



Sun, 26 Sep 2004 15:15:27 GMT  
 Can't change the wsh version installed

Quote:

> Hi All.
> I have a script that I put in the netlogon on the server.
> The script write to a text file in the server the space left in the
> users "c" drive.
> All the users that have wsh ver 5.1 run the script with no errors.
> Users with
> Wsh ver 5.6 (I installed there IE6) can't run the script and report an
> error "the user didn't log on"
> Why?...

Hi

What OS?

For Win9x, you should do this in a login script and see if it helps:

set wshobject=CreateObject("WScript.Network")
wshnetname = ""
On Error Resume Next
Do While wshnetname = ""
    wshnetname=wshobject.username
    Wscript.Sleep 10
Loop
On Error GoTo 0

--
torgeir



Sun, 26 Sep 2004 15:52:37 GMT  
 Can't change the wsh version installed

Thanks, it helped but I dont understand yet why the users with whs 5.1
didnt had this
Problem (win 98), if you have more info about it ill be glade to here
For now its working, thanks .

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sun, 26 Sep 2004 18:46:01 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Incompatible version of the RPC stub error after installing wsh 5.6

2. Detect version of IE Before Installing WSH..

3. how to detect wsh installed version?

4. Installing wsh on a computer that doesn't have it

5. what's the newest version of WSH?

6. wsh 5.0 won't install

7. Just installed WSH, don't see samples

8. Using WSH (VBScript) to change a folder's settings

9. Detect if WSH is installed, and if not install it (from command line)

10. Detect if WSH is installed, and if not install it (from command line)

11. INF Install Failure when install WSH on WIN2000

12. BUG in WSH 5.6 install if Wscript.exe is running while updating WSH

 

 
Powered by phpBB® Forum Software