473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

looking for a small script

1
Hello,

I am new to the forum.

I am wondering if anyone can help this.

I 'd like to create a start up script that when the network user login, this script will permanently delete a file (i.e. c:\temp.txt)

So the next time who ever login, this file is gone.

Can anyone help a little bit?



thanks alot.

DW
Jul 18 '08 #1
3 1341
Stang02GT
1,208 Expert 1GB
have you tried searching the net for this?

There a tons of little scripts out there that do what you are looking for or pretty close to it.
Jul 18 '08 #2
This is not very difficult to do. Simply just create a group policy in your active directory domain and assign it to the out your users are in. Then create the following file named "login.cmd". Inside that file should be the following:

Login.cmd
@echo off
del "c:\temp.txt"

Attach this script to the user login script section of the group policy you created above.
Aug 18 '08 #3
jg007
283 100+
if you don't want to use batch files just enter the code below into a .vbs file

Expand|Select|Wrap|Line Numbers
  1. strfile = "c:\temp.txt"                         ' name of file
  2.  
  3. Set objFSO = CreateObject("Scripting.FileSystemObject") 
  4.  
  5.  if objFSO.FileExists(strfile) Then
  6.         objFSO.DeleteFile(strfile)   ' If the temp file is found, delete it
  7.  
  8.  end if
fairly simple code and you should file plenty of stuff on ' file system object ' & VBS files if you need it
Aug 18 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: David Winter | last post by:
I'm not a developer myself, but I am looking for something that maybe one of you guys - has done - knows about - would like to do - yes, I have a small budget for this. :) The basic idea: A...
1
by: Ren? M?hle | last post by:
I have a psp script with a procedure just to run an update on one table. The Problem occurs when I try to compile this script with pspload: ORA-20006: "frsys_updatereport.psp": compilation...
7
by: Sharon | last post by:
Hiya I have a small question, I saw this piece of code somewhere (it's for creating a customized context menu) and I was wondering: Why is it that the STYLE and SCRIPT-tags are broken up into...
1
by: OttawaTrade | last post by:
I need to translate short sentences, maybe at most 100 per day. I know google has one, but it can not be crawled http://world.altavista.com/tr http://www.google.com/translate_t Is there a...
2
by: Kenneth McDonald | last post by:
I'm not trying to persuade my company to offer Python as a scripting language for their product, but I am trying to give them examples of things that Python can do easily that cannot be done easily...
7
by: Tim Rogers | last post by:
Hi folks, this is a resolution-detect script that I used on a site. As you can see it is designed to detect when the screen resolution falls below a certain level then load an alternative style...
13
by: Alan Silver | last post by:
Hello, MSDN (amongst other places) is full of helpful advice on ways to do data access, but they all seem geared to wards enterprise applications. Maybe I'm in a minority, but I don't have those...
1
by: luispunchy | last post by:
I have a .swf file that is going in the web page for the logo. It is supposed to be 610px wide and 81px in height when rendered in the HTML. The actual .swf file, when viewed standalone, appears much...
4
by: kpierce8 | last post by:
I'm a novice developer at best and often work with the R statistical programming language. I use an editor called TINN-R which allows me to write a script, then highlight a few lines and send them...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.