Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Script
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
PaulM  
View profile  
 More options Nov 5 2009, 10:54 pm
Newsgroups: microsoft.public.scripting.vbscript
From: "PaulM" <N...@NONO.COM>
Date: Thu, 5 Nov 2009 17:54:44 -0500
Local: Thurs, Nov 5 2009 10:54 pm
Subject: Script
Why does this script work:

' Description: Demonstration script that uses the FileSystemObject to delete
a file. Local computer
' For Vista

Set WSHShell = WScript.CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")

objFSO.DeleteFile("F:\Users\TestUser\AppData\Local\test.vbs")

And this script does not work:

' Description: Demonstration script that uses the FileSystemObject to delete
a file. Local computer
' For Vista

Dim Windir
Dim Users
Dim UserProfile
Dim AppData
Dim Local

Set WSHShell = WScript.CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Windir = WshShell.ExpandEnvironmentStrings("%SystemRoot%")
Users =  WshShell.ExpandEnvironmentStrings("%Users%")
UserProfile = WshShell.ExpandEnvironmentStrings("%UserProfile%")
AppData = WshShell.ExpandEnvironmentStrings("%AppData%")
Local = WshShell.ExpandEnvironmentStrings("%Local%")

objFSO.DeleteFile("%SystemRoot%\%Users%\%UserProfile%\%AppData%\%Local%\tes t.vbs")


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google