Batch Scripting Question - Accessing file on domain server share
Forgive me guys if this is basic stuff, I've never had to do any batch scripting in my life and now all that is changing. My question is really two fold:
I'd like to know how to execute an .exe in a batch script as a postinstall task but the file lives on a domain server share, and the pc during the time of the postinstall task may or may not be part of the domain, but definately will need the domain admin credentials to access. IE: "\\server\share\file.exe domain\administrator password". Not sure if I would use net use or not.
And secondly, whats a good reference or learning guide/site you would recommend for a crash course in scripting?
Answers (1)
On the k2000 you can use the "net use" to map a share. The best thing to do if you are doing this on a regular basis is to use the KBE manipulator and place the net use command in the pxe boot env file.
You can create a read\execute user for that share and map it either as a task or complie it into your boot files.
you then have a mapped drive you can make all your install calls to. this will allow you to do a share install as system or local admin.
Comments:
-
The only problem with this would be our workstations have to finish the wsname postinstall task. The file I'm attempting to automate is our auditing tool for Numara Trackit. We use our own naming convention with our asset management tools. If the name isn't correct then the audit would run and add an entry we couldn't recognize, or at least not conveniently which would defeat the purpose. - aaronr 11 years ago
-
have the machine autologin after joining the domain and add the task as a run once in your last lines of your k2000 script
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v mytask /d "\\server\share\task.exe /1 /2 /3" - SMal.tmcc 11 years ago
-
a like for batch ideas http://stackoverflow.com/questions/245395/hidden-features-of-windows-batch-files#259882 - SMal.tmcc 11 years ago
-
this may give you some k2000 ideas also
http://www.itninja.com/blog/view/windows-7-image-process-for-the-college-s-classrooms - SMal.tmcc 11 years ago-
Smal you flippin rock dude. - aaronr 11 years ago