#196994 - 2009-12-04 09:25 PM
Final version of ini update domain-wide!
[Re: itdaddy]
|
itdaddy
Starting to like KiXtart
Registered: 2006-12-19
Posts: 145
Loc: Wisconsin
|
Thanks you experts! I was able to make this work! Thank you. Here is the program in its completion. I am able to update 150 Pcs within seconds. Fantastic. That is what scripting is all about! Speed and efficiency! -Thank you
-Robert
;********************************
; Update FSP.ini Domain-wide
;********************************
Break on
Dim $PClist
Dim $array
$PClist = "ftran1", "ftran2", "ftran3"
for each $Element in $PClist
? $Element
$Rc = WriteProfileString('\\$Element\C$\WINDOWS\fsp.ini', 'Ubs', 'PCAlias', LCase($Element) )
If @error <> 0 ? "Updated (pcAlias) successful" endif
$Rc = WriteProfileString('\\$Element\C$\WINDOWS\fsp.ini', 'Ubs', 'PortNumber','9600' )
if @error <> 0 ? "Updated (PortNumber) successful" endif
$Rc = WriteProfileString('\\$Element\C$\WINDOWS\fsp.ini', 'Ubs', 'HostName', '192.168.1.94' )
if @error <> 0 ? "Updated (Hostname) successful" endif
$Rc = WriteProfileString('\\$Element\C$\WINDOWS\fsp.ini', 'Ubs', 'SessionName', 'Original Session' )
if @error <> 0 ? "Updated (Session Name) successful" endif
shell "notepad.exe \\$Element\C$\WINDOWS\fsp.ini "
sleep 2
next
;********************************
; End of Update FSP.ini
;********************************
_________________________
Robert A+, CCNA, MCP Network Admin Credit Union Wisconsin
|
Top
|
|
|
|
#197032 - 2009-12-09 02:38 AM
Re: Glenn I need your help
[Re: itdaddy]
|
Glenn Barnas
KiX Supporter
Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
|
PSexec isn't exactly the same on a couple of points.. unless you provide user credentials to start PSexec, it runs in the System context. There are some limitations, most notably the inability to use network resources. The environment can also be different - run psexec to connect to a remote system and simply type SET > C:\P_ENV.TXT. Then log into the same system and run SET > L_ENV.TXT. Compare the two files - they may be different, and may hold a clue to why some things work differently.
I'll keep this simple - if you want to install an MSI package remotely, use the task scheduler. I use it all the time, and my SWDIST product can push software installs to hundreds of systems using this method, and with a high degree of success. I can control exactly when it is installed, and which user account performs the install, and have full network access.
I'm working on a new product that will provide the ability to trigger a local event from a remote server via login or other non-admin method. In short, a user can log in, the login script can detect that something needs to be done (with admin rights), and a request is placed on a server. Within seconds, that server delivers instructions (usually a batch file), defines an event, and triggers the event to run immediately. The process runs with whatever credentials the admin wants, and usually starts before the login script even completes.
If you can wait, the initial release should be available in early to mid January. If you need instant gratification, look at the tcLib package for a library of task control functions, or tsAdm for a GUI tool that can push and trigger task events to one or many systems. tsAdm uses the tcLib package, and has a "blast" mode that can push a task to any number of systems. You can even interactively trigger the event to "run right now".
Glenn
_________________________
Actually I am a Rocket Scientist!
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 370 anonymous users online.
|
|
|