中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-01 19:02
48,037 topics / 350,122 posts / today 2 new / 48,249 members
DOS批处理 & 脚本技术(批处理室) » [Help] How to achieve automatic execution of scripts at boot in Group Policy
Printable Version  2,075 / 4
Floor1 hyuanqing Posted 2006-06-11 12:17
新手上路 Posts 3 Credits 14
My system is XP. I want to use a script to create an.ini file to implement the function of automatically executing the script at startup in Group Policy. But the text of the.ini file written by echo something >1.ini has all become garbled due to different encoding mechanisms. While first using echo something >1.txt and then renaming it to 1.ini, the text is the same when opened. And after placing it in C:\WINDOWS\system32\GroupPolicy\Machine\Scripts, I can see the file I added in the Group Policy Editor, but the system does not execute it.
How should I solve this? Please ask all the experts for guidance.

[ Last edited by willsort on 2006-6-14 at 16:54 ]
Floor2 3742668 Posted 2006-06-11 13:09
荣誉版主 Posts 718 Credits 2,013
In my previous tests (xp sp1), simply adding an ini file cannot achieve the purpose of starting up at boot. Generally, modifying the registry directly works much better for this kind of self-startup method.



After adding the startup here, not only can't it be viewed with msconfig, but even wmic startup can't find its trace. My previous method was using Gpresult /v | findstr "Name" |findstr /v "Site" | findstr /v "Domain" (the test environment was sp1 at that time, and the method of using two findstrs was quite funny). In fact, as long as you check whether there are Startup or shutdown under scripts in the registry, you can know whether there are scripts that start up at boot or run at shutdown.
Floor3 hyuanqing Posted 2006-06-11 23:34
新手上路 Posts 3 Credits 14
Thanks, moderator. I'll test it when I have time. :)
I really don't know how many methods for self-startup I still don't know, heh heh
Floor4 willsort Posted 2006-06-14 16:54
元老会员 Posts 1,512 Credits 4,432

───────────────── Moderation Record ─────────────────
Performed by: Will Sort
Operation: Modify Title - Help with methods to modify ini files~~~
───────────────── Moderation Record ─────────────────
Floor5 不得不爱 Posted 2006-06-15 20:02
超级版主 Posts 2,044 Credits 5,310 From 四川南充
3742668:
Is it effective in WIN2000? There is no State under [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\! What should I do?
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023