Home
Join

5 Replies

  • Instead of making a standard scheduled task GPO, set it as an Immediate Task instead.

    So back to the GPO, Preferences > Control Panel Settings > Scheduled Tasks > New 'Immediate Task (At least Windows 7)' then point to your batch file and link the GPO to appropriate location in AD.

    This will run immediately and only once per machine, group policy will remove it from the machines where it has already run once.

    Spice (3) flagReport
    1 found this helpful thumb_up thumb_down
  • Try this.

    Users shouldn't be creating directories on the root of C:\. Perhaps a startup script would be better.

    If the reg file modified HKCU, then import that using login script or even better, group policy preferences.

    Killing explorer.exe and then restarting it is odd to me. That would likely cause issues if multiple people are logged in.

    Text
    @echo on
    :: check to see if directory already exists. If it does, skip to the end.
    if exist "C:\IT Helpdesk\%computername% goto end
    
    :loop
    PING google.com | FIND "time=" > NUL
    echo waiting.....
    IF ERRORLEVEL 1 goto loop
    ECHO You have active connection to the Internet
    
    rmdir C:\"IT Helpdesk" /s /q
    md C:\"IT Helpdesk"
    md C:\"IT Helpdesk"\%ComputerName%
    md C:\"IT Helpdesk"\x4357
    md C:\"IT Helpdesk"\928-340-xxx
    md C:\"IT Helpdesk"\helpdesk@comany.org
    
    mkdir C:\"Taskbar"
    
    xcopy /s "\\Cottonwood.local\shared\data\temp\toolbar.reg" C:\Taskbar
    reg import C:\Taskbar\toolbar.reg
    taskkill /f /im explorer.exe
    start explorer.exe
    
    :END
    exit
    

    Spice (3) flagReport
    2 found this helpful thumb_up thumb_down
  • I'm not a fan of root built directories either, but I submit that it is always possible to do.
    I think you mean:

    If exist <insert folder name here> goto END

    I'd imagine if 1 exists they all do.

    I am not sure exactly what the purpose of this is. Maybe I'm not real clear, but sure seems like you are creating folders for the user to use that has the helpdesk contact information in? Wouldn't it be easier to do a group policy to create a shortcut to your helpdesk tool into your browsers, and maybe use a message popup to display contact info on login to the user?

    Just spitballing here.

    Was this post helpful? thumb_up thumb_down
  • The below syntax worked but I had to move the " to before the IT as shown below. 

    if exist C:\"IT Helpdesk\%computername% goto end

    Was this post helpful? thumb_up thumb_down
  • This is what I am doing. The Taskbar folders are created in root in order to display them on the taskbar. We just want to display our contact info for everyone vs putting physical decals on their displays. 


    Was this post helpful? thumb_up thumb_down

Read these next...