Home > Archive > General Discussion > July 2001 > How do I make a basic Script ?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How do I make a basic Script ?
Ando

2001-07-25, 9:49 am

How do I make a shut down script ?

When a user switches off their PC, i want to force the computer to release its IP address back to the DHCP server (ipconfig/release).

I want to import the script into GPO, but I just never made a script before ?

thanks,
ando
Ando

2001-07-26, 9:11 am

i guess no-one knows then ... ?
Randy

2001-07-26, 9:22 am

I know all! I am the great and powerful Wizard . . . uh . . . scratch that. Try this:

http://www.sysinternals.com/ntw2k/f...sshutdown.shtml

http://www.winappslist.com/utilities/shutdown.htm

Or maybe add this to the registry:


File: LOGONOPT.REG

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\M
icrosoft\Windows NT\CurrentVersion\Winlogon]
"DontDisplayLastUserName"="1"
"PowerdownAfterShutdown"="1"
"RunLogonScriptSync"="1"
"ShutdownWithoutLogon"="1"
Joe Blacke

2001-07-26, 11:45 am

Ando,

Sorry for not getting back to you.

I'm at work right now, but as soon as I get a chance I'll walk you through it.

It's very easy.
Joe Blacke

2001-07-26, 9:39 pm

Ando,

First, this is not the best method to make DHCP clients free up ip addresses. The best method would be to issue short leases. However, since you want to know how to release ip addresses by using a script in group policy:

Open notepad.
type ipconfig /release
Save the text as whateveryouwanttocallit.bat


This just made your script. Save it in the correct path for shutdown scripts. If you don't know the path, read below.


Open the group policy for the local pc, domain, site, or ou. Under windows settings, click on scripts. In the details pane, double click shutdown. Click on browse and it shows the correct location for shutdown scripts. Made sure your file "whateveryouwanttocallit.bat" is there and select it.

Exit your group policy making sure your new shutdown scripts are saved as part of the policy. On the client computers, you can either reboot them, run secedit /refrespolicy machine_policy, or wait for the security policy time to refresh based on it's own time frame.

Bada boom, bada bing. Your clients are now releasing their IP addresses upon shutdown.

I just ran a quick test here at home, and it worked just as described.
Ando

2001-07-27, 10:21 am

thanks randy and especially joe !!

Its working great, just what i wanted !!!

thanks (again) !!
ando
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net