Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Run from Startup/Script group policy

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,59872
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Run from Startup/Script group policy
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Run from Startup/Script group policy - 5/6/2008 4:16:19 AM   
  _o0o_

 

Posts: 6
Score: 0
Joined: 5/6/2008
Status: offline
 
Hi to everyone ,
I want to run a script at startup , i could do it by add the script trought  gpedit.msc to Starttup/Script and it's work fine ,
my problem is how to automatize (add script to GPO) for several computers !!!
anyone could help me ?

_o0o_
 
 
Post #: 1
 
 RE: Run from Startup/Script group policy - 5/7/2008 3:50:40 PM   
  the_apostle21


Posts: 43
Score: 0
Joined: 7/29/2005
Status: offline
Hi,

Sounds like you dont have active directory, so best way i would do it is to write a vbscript/batch file to:

* read a list of all computers
* copy the script to these computers
* add a record to the startup in the registry

pstools may be handy for this also.

(in reply to _o0o_)
 
 
Post #: 2
 
 RE: Run from Startup/Script group policy - 5/7/2008 8:20:07 PM   
  _o0o_

 

Posts: 6
Score: 0
Joined: 5/6/2008
Status: offline
Hi ,
first of all thanks for your answer and sorry for my english.

* read a list of all computers                            --> OK no problem for me
* copy the script to these computers              --> OK no problem for me
* add a record to the startup in the registry  --> I think you said about add it to HKLM\...\Run key , the problem is that i need to start the script before to any user do the logon , startup folder , HKLM\...\Run key start always at the logon.
Another option would be create a win service and execute it (this way seems to be more complex)

However configuring Startup/Script trougth Local GPO allow it.
I can't to do it by adding the script to a OU on AD , i should do it on local GPO , i tested it by hand via gpedit.msc and works fine , i'm looking a way for
automatize the deploy without sucessfull , i tried to see the changes with procmon from sysinternal when you do it by hand , but then then everything that i tried to do doesn't work.
I tried to export/import full local GPO with secedit without succesfull , someone did something seemed ?

Thanks for the future answer if the come : )

_o0o_

(in reply to _o0o_)
 
 
Post #: 3
 
 RE: Run from Startup/Script group policy - 5/9/2008 12:53:40 AM   
  Rischip


Posts: 341
Score: 2
Joined: 3/26/2007
Status: online
You said you were successful using gpedit.msc

Do it again and look in this key and subkeys

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System\Scripts]


And look in this file:

C:\WINDOWS\system32\GroupPolicy\Machine\Scripts\scripts.ini

and put the script here:

C:\WINDOWS\system32\GroupPolicy\Machine\Scripts\Startup

You will need to script the entry in the registry, and the .ini file.

< Message edited by Rischip -- 5/9/2008 12:55:36 AM >


_____________________________

Rischip
Author of - The Grim Linker

(in reply to _o0o_)
 
 
Post #: 4
 
 RE: Run from Startup/Script group policy - 5/9/2008 3:30:57 AM   
  _o0o_

 

Posts: 6
Score: 0
Joined: 5/6/2008
Status: offline
 
Great !!
That's work , i was exactly what i need ,
regards
: )

_o0o_

(in reply to Rischip)
 
 
Post #: 5
 
 RE: Run from Startup/Script group policy - 5/9/2008 4:38:45 AM   
  Rischip


Posts: 341
Score: 2
Joined: 3/26/2007
Status: online
Please post your code when you get it working.

_____________________________

Rischip
Author of - The Grim Linker

(in reply to _o0o_)
 
 
Post #: 6
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Run from Startup/Script group policy Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts