vroland Posted November 26, 2008 Share Posted November 26, 2008 i have a little problem, pls help if you can.i make silent software installations and some of the softwares require a reboot. how can i pop-up a dialog box to the user to notify him/her to reboot the machine and schedule this task.i tried the following:i have a vbscript, when i run it manually everything is fine pops up a window and makes the thing i choose, but i can't schedule it because the deployment runs as local system account and local system account does not have rights to run interactively and i don't know the username/password for the actual machine.here's the PromptUser.vbs:Set objShell = CreateObject("Wscript.Shell")intMessage = Msgbox("A restart required due to Software installation! If you want to restart now choose YES if you plan later choose NO ", _ vbYesNo, "Reboot prompt for the User!")If intMessage = vbYes Then objShell.Run("shutdown -r -t 20")Else Wscript.QuitEnd Ifhere's the schtasks command:c:\windows\system32\schtasks /create /tn PromptUserForReboot /tr "c:\Prompt\PromptUser.vbs" /sc MINUTEThanks for your helpregards,r Link to comment Share on other sites More sharing options...
weEvil Posted November 28, 2008 Share Posted November 28, 2008 i have a vbscript, when i run it manually everything is fine pops up a window and makes the thing i choose, but i can't schedule it because the deployment runs as local system account and local system account does not have rights to run interactively and i don't know the username/password for the actual machine.You're out of luck then. You need to get the administrative account and use task scheduler to make an event that way.Vista has very tight security controls for "unscheduled events'. Link to comment Share on other sites More sharing options...
vroland Posted November 28, 2008 Author Share Posted November 28, 2008 i have a vbscript, when i run it manually everything is fine pops up a window and makes the thing i choose, but i can't schedule it because the deployment runs as local system account and local system account does not have rights to run interactively and i don't know the username/password for the actual machine.You're out of luck then. You need to get the administrative account and use task scheduler to make an event that way.Vista has very tight security controls for "unscheduled events'.thanks for your reply, i tried it, i scheduled as an administrator user but it runs only for that user. i have another idea, i get from registry the last logged on user data with a small vbs (DOMAIN\USERNAME) but the password of the current user is still missing, so it won't work anyway thxregards,roland Link to comment Share on other sites More sharing options...
weEvil Posted November 28, 2008 Share Posted November 28, 2008 i have a vbscript, when i run it manually everything is fine pops up a window and makes the thing i choose, but i can't schedule it because the deployment runs as local system account and local system account does not have rights to run interactively and i don't know the username/password for the actual machine.You're out of luck then. You need to get the administrative account and use task scheduler to make an event that way.Vista has very tight security controls for "unscheduled events'.thanks for your reply, i tried it, i scheduled as an administrator user but it runs only for that user. i have another idea, i get from registry the last logged on user data with a small vbs (DOMAIN\USERNAME) but the password of the current user is still missing, so it won't work anyway thxregards,rolandThere must be some way to get this application permission. If you can do that, it will run for all users.Right-click, go to properties, then the security tab and mess around with the permissions. Do this under administrator. Enable this file to have permission to run for all users. Link to comment Share on other sites More sharing options...
vroland Posted December 1, 2008 Author Share Posted December 1, 2008 There must be some way to get this application permission. If you can do that, it will run for all users.Right-click, go to properties, then the security tab and mess around with the permissions. Do this under administrator. Enable this file to have permission to run for all users.There is a problem with the scheduled tasks, i tried to set the job to run whether the user is logged in or not it won't start (General tab Security options / When running the task, user the following user account: .......)it only runs when the "Run only when user is logged on" option is enabledi gave upFound a different solution (renaming original shortcuts and executables and after a reboot a runonce key runs an install.cmd file and it does the rest, renames back everything )thx for your helpregards,roland 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