Link to home
Start Free TrialLog in
Avatar of windylad
windyladFlag for Ireland

asked on

GPO to enable DEP and file & print sharing

Hello,

Is it possible to create a GPO that will do the following 2 tasks for computers in my domain:
1) Turn DEP on for all programs.
2) Enable file and print sharing.

Thanks,
/wl
Avatar of Brian
Brian
Flag of United States of America image

There are not Group Policies currently for those settings.  There are a couple for File and Print Sharing but only to allow it through the Windows Firewall.

Brian
Avatar of windylad

ASKER

Here's my haked solution for turning on FAPS.  I'll have a different script to turn on DEP shortly.

/wl

----
:: Turn on FAPS (kind of).  Script actually uninstalls FAPS and then re-installs.  The default for a new install of FAPS is ON.
:: This script is run as part of the computer startup scripts and has been test in WXP SP2
@echo off
set srcapp=\\domain\netlogon\snetcfg_wxp.exe
set app=%SYSTEMROOT%\system32\snetcfg_wxp.exe
set log=%SYSTEMDRIVE%\faps.log

:: test if app exists
if not exist %app% (
    copy "%srcapp%" "%app%"
)

:: test if fps has been uninstalled and reinstalled already
if exist %log% goto end

%app% -u MS_Server
%app% -c s -i MS_Server

%app% -s n | find /i "ms_server" > nul
if not errorlevel 1 (
    echo SUCCESS, %date% %time%, %computername% >> %log%
)

:end

@echo on
----

Nice workaround.

Brian
Here's the script to turn on DEP, which works in my domain.  This isn't the ideal solution for all as the script doesn't cater for multiboot systems with different operating systems mixed with Windows XP Pro.

/wl

----
@echo off
set app=%SYSTEMROOT%\system32\bootcfg.exe
set tout=5

:: test if app exists
if not exist %app% goto end

%app% | find /i "/fastdetect /noexecute=optout" > nul
if not errorlevel 1 (
    goto end
) else (
    goto configboot
)

:configboot
%app% | find /c /i "Boot entry ID" | find /i "1" > nul
if not errorlevel 1 (
    %app% | find /i "Microsoft Windows XP Professional" > nul
    if not errorlevel 1 (
        %app% /raw "/fastdetect /NoExecute=OptOut" /id 1
        %app% /timeout %tout%    
    )
)

:end

@echo on
----
ASKER CERTIFIED SOLUTION
Avatar of CetusMOD
CetusMOD
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of csilvio
csilvio

Hi!

I have been searching for snetcfg_wxp.exe and I can't find it anywehre.

Can Someone please tell me where I can get it from!

Thanks