Become a part of the TranceAddict community!Frequently Asked Questions - Please read this if you haven'tSearch the forums
TranceAddict Forums > Main Forums > Chill Out Room > What could stop a logon script from working in AD?
Pages (2): [1] 2 »   Last Thread   Next Thread
Share
Author
Thread    Post A Reply
DJ Mikey Mike
Your mum's face



Registered: Jan 2002
Location: I'm at your mums'
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.

Old Post Aug-06-2010 15:20 
Click Here to See the Profile for DJ Mikey Mike Click here to Send DJ Mikey Mike a Private Message Add DJ Mikey Mike to your buddy list Report this Post Reply w/Quote Edit/Delete Message
ziptnf
Programming your future



Registered: Jun 2008
Location: Louisville, KY

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?


___________________

Set Archive | TA DJ Challenge

Old Post Aug-06-2010 15:44 
Click Here to See the Profile for ziptnf Click here to Send ziptnf a Private Message Visit ziptnf's homepage! Add ziptnf to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Jarvmeister
Building a fire......



Registered: May 2001
Location: Trancentral

Seriously? Asking this Q in the COR?

http://social.microsoft.com/Forums/en-US/categories

Old Post Aug-06-2010 16:09 
Click Here to See the Profile for Jarvmeister Click here to Send Jarvmeister a Private Message Add Jarvmeister to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Specimen303
Senior tranceaddict



Registered: Jun 2005
Location:

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

Last edited by Specimen303 on Aug-06-2010 at 19:04

Old Post Aug-06-2010 18:34  Finland
Click Here to See the Profile for Specimen303 Click here to Send Specimen303 a Private Message Add Specimen303 to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Rinster
EDM Addict



Registered: Jan 2006
Location:
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.


Maybe you need to start it up with admin rights if you launch it from the server?..


___________________
www.soundcloud.com/rinster

Old Post Aug-06-2010 18:47 
Click Here to See the Profile for Rinster Click here to Send Rinster a Private Message Visit Rinster's homepage! Add Rinster to your buddy list Report this Post Reply w/Quote Edit/Delete Message
DJ Mikey Mike
Your mum's face



Registered: Jan 2002
Location: I'm at your mums'

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



You sexy genius.


While I've got you here perhaps you might be able to help me with one more issue I'm having. I have the following line in my script:

copy s:\IT\Technical\scripts\Office2007\NormalTemplates7\Normal.dotm c:\Users\%USERNAME%.BST\AppData\Roaming\Microsoft\Templates\Normal.dotm /Y

If I run that from command prompt on my work station it resolves the %USERNAME%.BST bit as mhoward.BST, as in my username, which is great.

However, as soon as I stick that in a .bat or .cmd file and run it as the logon script from AD, all of a sudden it won't resolve to mhoward.BST - It just stays as USERNAME.BST

Any ideas why it would do that?

Cheers mate.

Old Post Aug-09-2010 09:46 
Click Here to See the Profile for DJ Mikey Mike Click here to Send DJ Mikey Mike a Private Message Add DJ Mikey Mike to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Specimen303
Senior tranceaddict



Registered: Jun 2005
Location:

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...)

Old Post Aug-09-2010 13:30  Finland
Click Here to See the Profile for Specimen303 Click here to Send Specimen303 a Private Message Add Specimen303 to your buddy list Report this Post Reply w/Quote Edit/Delete Message
DJ Mikey Mike
Your mum's face



Registered: Jan 2002
Location: I'm at your mums'

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.

Old Post Aug-09-2010 14:30 
Click Here to See the Profile for DJ Mikey Mike Click here to Send DJ Mikey Mike a Private Message Add DJ Mikey Mike to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Specimen303
Senior tranceaddict



Registered: Jun 2005
Location:

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)

Old Post Aug-09-2010 16:50  Finland
Click Here to See the Profile for Specimen303 Click here to Send Specimen303 a Private Message Add Specimen303 to your buddy list Report this Post Reply w/Quote Edit/Delete Message
WittyHandle
Supreme tranceaddict



Registered: Jun 2008
Location:

Take the game out, blow in it, and try again. Usually works.

Old Post Aug-09-2010 17:05  United States
Click Here to See the Profile for WittyHandle Click here to Send WittyHandle a Private Message Add WittyHandle to your buddy list Report this Post Reply w/Quote Edit/Delete Message
DJ Mikey Mike
Your mum's face



Registered: Jan 2002
Location: I'm at your mums'

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)


%AppData% works great, thank you very much as always

Old Post Aug-10-2010 08:08 
Click Here to See the Profile for DJ Mikey Mike Click here to Send DJ Mikey Mike a Private Message Add DJ Mikey Mike to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Sushipunk
Flickering, I roam



Registered: Sep 2006
Location: Chateau Verdafloor

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


___________________

Old Post Aug-10-2010 08:27  Australia
Click Here to See the Profile for Sushipunk Click here to Send Sushipunk a Private Message Visit Sushipunk's homepage! Add Sushipunk to your buddy list Report this Post Reply w/Quote Edit/Delete Message

TranceAddict Forums > Main Forums > Chill Out Room > What could stop a logon script from working in AD?
Post New Thread    Post A Reply

Pages (2): [1] 2 »  
Last Thread   Next Thread
Click here to listen to the sample!Pause playbackUnknown Track [2003] [0]

Click here to listen to the sample!Pause playbackRatty - "Sunrise" [2004]

Show Printable Version | Subscribe to this Thread
Forum Jump:

All times are GMT. The time now is 05:29.

Forum Rules:
You may not post new threads
You may not post replies
You may not edit your posts
HTML code is ON
vB code is ON
[IMG] code is ON
 
Search this Thread:

 
Contact Us - return to tranceaddict

Powered by: Trance Music & vBulletin Forums
Copyright ©2000-2026, Jelsoft Enterprises Ltd.
Privacy Statement / DMCA
Support TA!