Login batch file does not run completely on Vista - need to elevate permissions on the fly
Our organization is currently migrating from XP Pro to Vista Business. Currently we have a login script that runs for all users - defined in active directory for each user under the profile tab. Some parts of the batch file work just fine. However, the net use, net time, attrib, and some copy commands do not work and yield an "Access is denied" error. I need to be able to turn the UAC off and then back on after the script runs, OR start the command window with administrator access in order for the script to run successfully. This has to be done without any user interaction, clicking on continue buttons, right clicking on the command shortcuts, etc. The batch file runs behind the scenes and is unknown to the user and we would like it to stay that way. Here is an example of some of the items that dont run when the UAC is on or run from the standard command prompt, but do run when the UAC is manually turned off or the administrator command prompt is manually turned on. :: Route printer ports to specific printers for DOS programsnet use lpt1: /dnet use lpt1: \\%4\%3net use lpt3: /dnet use lpt3: \\server1\computernew :: Update HOSTS file on workstationattrib -r %windir%\system32\drivers\etc\hosts.copy /Y \\server2\install\hosts. %windir%\system32\drivers\etc\hosts. :: Copy the latest executable and script to the application directorycopy /Y \\server3\production\application.exe "c:\program files\application\"copy /Y \\server3\production\application.bat "c:\program files\application\"copy /Y \\server3\production\application.sql "c:\program files\application\" :: Synchronize the workstations clock to the server4net time \\server4 /set /yes Any help is much appreciated.
September 30th, 2008 11:24pm

Anyone?
Free Windows Admin Tool Kit Click here and download it now
October 1st, 2008 3:18pm

So am I to assume that this is not possible? If not, what are my alternatives besides disabling the UAC?
October 2nd, 2008 3:56pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics