ProClub Posted May 12, 2006 Share Posted May 12, 2006 Hi there!I made a fancy unattended install and now wish to have my systems remotely maintained. For this reason I created a network share and a script, that checks for new "updates" on this share. If it finds a new script to be run (AKA update), it runs it.This can be used for a variety of tasks, making system wide updates a piece of cake. SMS isn't free, so I'd prefer to use this solution.However, I've run across a major problem. At the time, GP startup scripts run, there is no network yet. At thetime, shutdown scripts run, the network is allready offline. Logon/off scripts won't do it because of user right problems. Manually starting the network service via NET START won't work, because the service is started, but I still get an error for NET USE.The only solution I can think of is writing a service to download update packs while the user is loged in and then run them at shutdown time.The question is: is there ANY way to have network support with SYSTEM rights WITHOUT writing a service?Thanks in advanceJThe script would be:NET USE P: \\192.168.1.3\install /USER:myusername mypasswordFINDSTR /V /I /G:C:\WINDOWS\updates\updates.lst p:\update\updates.lst >%temp%\updatelist.txtFOR /F %%I IN (%temp%\updatelist.txt) DO p:\update\%%I.cmddel /Q %temp%\updatelist.txtCOPY /Y p:\update\updates.lst C:\WINDOWS\updates\updates.lstNET USE P: /DELETE Link to comment Share on other sites More sharing options...
cluberti Posted May 12, 2006 Share Posted May 12, 2006 (edited) You could use runonceex and autologon (with a forced reboot) as necessary, but there would be no other way I am aware of without 3rd party applications to do this during boot or shutdown. Perhaps you should consider application/update deployment software like SMS or similar. Edited May 12, 2006 by cluberti Link to comment Share on other sites More sharing options...
ProClub Posted May 13, 2006 Author Share Posted May 13, 2006 You could use runonceex and autologon (with a forced reboot) as necessary, but there would be no other way I am aware of without 3rd party applications to do this during boot or shutdown. Perhaps you should consider application/update deployment software like SMS or similar.What do you mean by autologon? Wouldn't that be a security crater? Giving my users a way to have an admin account? Even if I have Windows not load the UI, they still can use Ctrl+Shift+Esc, new task to run any app they like.So, there is no other way than writing a service... sigh... Never mind. SMS is a bit too expensive for a high school, so I guess, I'm just going to write it... Link to comment Share on other sites More sharing options...
cluberti Posted May 13, 2006 Share Posted May 13, 2006 You are correct, there would be the possibility for a security hole using autologon - looks like you're stuck with writing a service if software is too expensive. Link to comment Share on other sites More sharing options...
ProClub Posted May 14, 2006 Author Share Posted May 14, 2006 O well. I guess, I'll just have to write it. Would anyone else be interrested in such a script? Or maybe a generic script runner service? I'd be happy to help someone else out too if I'm writing this...I just did a little digging and guess what I found: http://support.microsoft.com/kb/q137890/It seems I can run a regular application (or in this case command line script) as a service. There is only the matter of scheduling. I somehow need to have that service start after login. But I guess, that's an issue I can fix. Maybe I don't have to write a service after all. I'll check back and tell how it worked out. Link to comment Share on other sites More sharing options...
gunsmokingman Posted May 14, 2006 Share Posted May 14, 2006 I do not know if this will help you but it shows how to run a script using the run as Hey, Scripting Guy! Link to comment Share on other sites More sharing options...
cluberti Posted May 14, 2006 Share Posted May 14, 2006 Yeah, srvany.exe is out there. There's also an open-source app that does the same thing called srvstart.exe:http://www.nick.rozanski.com/services_quick.htm Link to comment Share on other sites More sharing options...
ProClub Posted May 15, 2006 Author Share Posted May 15, 2006 Great, guys, that's something to get started with. If I'm done, I'll let you know! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now