Anonymous_User Absent Member.
Absent Member.
1166 views

Login Script!!

I don't know if I am in the right DF but my situation consist of trying
to come up with a login script that will actually detect an installed
file in the pc before running a batch file. What I am trying to do is
installing the zenworks agent. I've already repackaged the install but I
don't want the file to keep installing each time the user logs in. I
hope somebody can help me. I was actually thinking that I could use the
IF.. THEN.. variables but I don't know the right command, if it can be
done!!

Thanks,

Horacio
Labels (1)
0 Likes
3 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Login Script!!

Checkout this utility
http://www.novell.com/coolsolutions/tools/13556.html

--
Edison Ortiz
Novell Product Support Forum SysOp
(No Email Support, Thanks !)
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Login Script!!


here are some commands that we have in our login scritps:
#FIND /I "wsus5" c:\novell\wsus.txt
IF "%ERROR_LEVEL"="1" THEN BEGIN
#\\servername\sys\public\wsus.bat
END

This looks for the phrase wsus5 in the file specified on the local
machine.
If found, error level returned = 0, nothing is done
If not found, error level = 1, then the batch file is ran

This allows me to modify the workstation, either adding something new
or upgrading existing.

Recently, we changed our WSUS server to a new ip address, so I simply
modified the login scripts to look for wsus6, and then change the text
file that is copied down via the batch file to include wsus6. Since
wsus5 is in the file, it returns 1 as the error level, and the batch
file copies down again.

We also use this to see if clntrust.exe is located on the local
machine, and if so, we run it from there. If not, we run it from the
local server.

Caution - #FIND runs differently under Win9x than WinNT/2K/XP.
We only run these commands on WinNT/2K/XP machines.



--

0 Likes
Anonymous_User Absent Member.
Absent Member.

Login Script!!

Another method used to keep track of versions is already available, in the
Windows Registry.

Take a look and see if the agent puts a Version key in the Windows
Registry. If so, you can do a simple IF test to determine if you are
already installed or patched.

Taken from http://www.novell.com/coolsolutions/appnote/11516.html

rem-------------------------------------------------------------------
rem Look for Novell Client Version
rem-------------------------------------------------------------------

regread "HKLM,Software\Novell,CurrentVersion"

rem-------------------------------------------------------------------
rem Verify regread Value if < then Client 4.90
rem-------------------------------------------------------------------
if "%99" < "4.90" then


Another great resource to read from is:
http://www.novell.com/coolsolutions/feature/16088.html

While it talks about Windows patching, it is useful as a template for just
about any regular patching process. It also includes simple information
on how to modify the registry for your own personal tracking of
installations WHEN USING ZENWORKS….

Taken from the above, creating the Application Object:
1. Distribution Options tab
a. Registry: HKLM.Software.Your_Company_Name.Patches.MS05-039_Patch
i. Install Date: %MONTH%/%DAY%/%YEAR%
ii. Installer: %LOGIN_NAME%
All my ZENworks applications put a record in the registry to indicate who
ran what application when. You should do this too.

You can easily do the same for Defining your own Versions or any other Key
you’d like to create in the Windows Registry. Of course, the best part of
ZENWorks AO’s is that you can LOG the activities. It’s an ideal way to
find those computers which failed to update properly.

> I don't know if I am in the right DF but my situation consist of trying
> to come up with a login script that will actually detect an installed
> file in the pc before running a batch file. What I am trying to do is
> installing the zenworks agent. I've already repackaged the install but

I
> don't want the file to keep installing each time the user logs in. I
> hope somebody can help me. I was actually thinking that I could use the
> IF.. THEN.. variables but I don't know the right command, if it can be
> done!!
>
> Thanks,
>
> Horacio


0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.