Emulate gpedit.msc in XP Home - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Microsoft Windows and Software
Click Here to Login
Closed Thread
Thread Tools Display Modes
Old 01-01-2005, 11:09 PM   #1 (permalink)
Monster Techie
Join Date: Apr 2004
Posts: 1,842
Send a message via AIM to lazerman Send a message via Yahoo to lazerman
Default Emulate gpedit.msc in XP Home

I had to go out and purchase XP Home because Bill Gates didn't think I had already paid enough for my legally licensed copy of XP Pro... So now I am trying to get a shutdown script to work with gpedit.msc. I type it in the run box dialogue and it doesn't exist. I google gpedit in xp home and numerous people say it doesn't have it. Well that's okay since all gpedit does is add regkeys, so I could do it through regedit. I am having a real time trying to figure out where to put it in there, I don't want to screw anything up... I stuck it in the Run folder under CurrentVersion and it did something with the batch file at boot, like it ran but it didn't delete anything... I guess it needs to be a program that I have startup or are those just processes? The script I am trying to run is one that cleans crap off my computer everytime I shut it down. Here is the text from the batch file-

del "C:\Documents and settings\*\Local Settings\Temporary Internet Files\Content.ie5\*\*.*/q"
del "C:\Documents and settings\*\Local Settings\Temporary Internet Files\Content.ie5\index.dat/q"
del "C:\Documents and settings\*\Local Settings\Temp\*.*/q"
del "C:\Documents and settings\*\Local Settings\Temp\*/q"
del "C:\Windows\Temp\*.*/q"
del "C:\Windows\Temp\*/q"

That worked before through gpedit as a batch file... how do I make it an executable or leave it a batch file and have a shutdown script section in the registry. Any help is appreciated.

The Stargate MMORPG
lazerman is offline  
Old 04-21-2005, 01:17 PM   #2 (permalink)
Ultra Techie
Join Date: Apr 2005
Posts: 720

Hey, I'ma ask some of my friends about this.

SkyHi is offline  
Old 04-21-2005, 04:52 PM   #3 (permalink)
Master Techie
Join Date: Oct 2003
Posts: 2,258

I don't think it will work. The group Policy functions are not allowed on XP Home cause it's not designed for that as far as I understand it.
something you can do would be the writing a program to do this for you and then run that when you go to shutdown.

You will need shutdown.exe to do this... This is done in Perl. If you want to use it, download the perl 5.8.6 library from Activestate.org

my $sys = $ENV{SystemRoot};
my $user = $ENV{USERPROFILE};
$path1 = "Local Settings\\Temporary Internet Files";
$path2 = "Local Settings\\Temp";
rmtree(["$user\\$path1", "$user\\$path2"], 1, 1);
mkpath(["$user\\$path1", "$user\\$path2"], 1, 0711)
system ("$sys\\system32\\shutdown.exe -r -t 00 -f);
That should do it. Call the file shutdown.pl and drop it in %systemroot%. Then place a shortcut on your start menu pointing to "%SystemDrive%perl\bin\perl.exe %systemroot%\shutdown.pl"

That should do it for you.
Then when you want to reboot, click on it.
If you want to shutdown, change the following line:
system ("$sys\\system32\\shutdown.exe -s -t 00 -f);

Hope that helps...
Inaris is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 02:54 PM.

Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2018, vBulletin Solutions, Inc.