TranceAddict Forums (www.tranceaddict.com/forums)
- Chill Out Room
-- What could stop a logon script from working in AD?
What could stop a logon script from working in AD?
I've written a script and I've called it test.bat. I've placed it in the sysvol\scripts folder on the server and put test.bat in the logon script section of AD under the profile tab.
However, when I log on the script is not kicking in. What factors could stop it from running?
I know the script works because if I run it manually in cmd prompt it runs through just fine.
Any ideas?
Cheers.
Shot in the dark, because I obviously have no clue about your setup, but is the path for your script included in your environment variables?
Seriously? Asking this Q in the COR?
http://social.microsoft.com/Forums/en-US/categories
disable fast logon
With fast logon on start up skips some ad policies and startup scripts
To turn off Fast Logon Optimization, you can use the following policy setting:
Computer Configuration\Administrative Templates\System\Logon\ Always wait for the network at computer startup and logon
and remember
gpupdate on server
gpupdate /force on workstation 
Re: What could stop a logon script from working in AD?
| quote: |
| Originally posted by DJ Mikey Mike I've written a script and I've called it test.bat. I've placed it in the sysvol\scripts folder on the server and put test.bat in the logon script section of AD under the profile tab. However, when I log on the script is not kicking in. What factors could stop it from running? I know the script works because if I run it manually in cmd prompt it runs through just fine. Any ideas? Cheers. |
| quote: |
| Originally posted by Specimen303 disable fast logon With fast logon on start up skips some ad policies and startup scripts To turn off Fast Logon Optimization, you can use the following policy setting: Computer Configuration\Administrative Templates\System\Logon\ Always wait for the network at computer startup and logon and remember gpupdate on server gpupdate /force on workstation |

sorry not sure I can help here. I'm not really a scripter.
What is .bst?
Can't you just skip that part of the filepath with %appdata%?
so destination file path would be just: %appdata%\Microsoft\Templates\Normal.dotm
(same as: c:\users\%username%\appdata\roaming\Microsoft...)
Sorry, I should have specified. The .BST is our domain. When we set a user up we create a local account on the PC which gets the name 'username', for example 'jsmith', and then we add the computer to the domain, where the profile gets called 'username.domain, for example jsmith.BST
The domain account is the one the user will end up using, hence ending up with jsmith.BST as their folder.
How exactly will that %AppData% bit work? Like this?
copy s:\IT\Technical\scripts\Office2007\NormalTemplates7\Normal.dotm %AppData%\Roaming\Microsoft\Templates\Normal.dotm /Y
How would it know what drive to choose without specifying a drive path?
Cheers for your help.
like this:
copy s:\IT\Technical\scripts\Office2007\NormalTemplates7\Normal.dotm %AppData%\Microsoft\Templates\Normal.dotm /Y
here's a small list of windows environment variables:
http://www.mydigitallife.info/2009/...ment-variables/
use windows explorer (not ie) or open start menu and write on the search bar to test the environment variables. Same environment variables work whether it is xp, vista or 7. Their filepaths differ quite a bit but when you use these variables you don't need to care about that. When you use "c:\..." you have to make sure that every computer has windows installed on c:\. Using e-variables you don't need to write any of filepath before the e-variable you're using.
you could test this also:
copy s:\IT\Technical\scripts\Office2007\NormalTemplates7\Normal.dotm %userprofile%\AppData\Roaming\Microsoft\Templates\Normal.dotm /Y
cheers,
Erno (7x MCTS/4x MCITP)
Take the game out, blow in it, and try again. Usually works.
| quote: |
| Originally posted by Specimen303 like this: copy s:\IT\Technical\scripts\Office2007\NormalTemplates7\Normal.dotm %AppData%\Microsoft\Templates\Normal.dotm /Y here's a small list of windows environment variables: http://www.mydigitallife.info/2009/...ment-variables/ use windows explorer (not ie) or open start menu and write on the search bar to test the environment variables. Same environment variables work whether it is xp, vista or 7. Their filepaths differ quite a bit but when you use these variables you don't need to care about that. When you use "c:\..." you have to make sure that every computer has windows installed on c:\. Using e-variables you don't need to write any of filepath before the e-variable you're using. you could test this also: copy s:\IT\Technical\scripts\Office2007\NormalTemplates7\Normal.dotm %userprofile%\AppData\Roaming\Microsoft\Templates\Normal.dotm /Y cheers, Erno (7x MCTS/4x MCITP) |
See, this is why I love the COR.
Mike may be, in fact, the biggest cunt to ever wander these forums. The sheer amount of crying and butt-hurtedness he's left in his wake is surely likely to be worthy of an award or two, possibly even a world record.
Yet, his regular computer/tech/coding questions are almost always answered, with speed and a smile.
We all just love to hate 
| quote: |
| Originally posted by WittyHandle Take the game out, blow in it, and try again. Usually works. |
| quote: |
| Originally posted by Sushipunk See, this is why I love the COR. Mike may be, in fact, the biggest cunt to ever wander these forums. The sheer amount of crying and butt-hurtedness he's left in his wake is surely likely to be worthy of an award or two, possibly even a world record. Yet, his regular computer/tech/coding questions are almost always answered, with speed and a smile. We all just love to hate |
Powered by: vBulletin
Copyright © 2000-2021, Jelsoft Enterprises Ltd.