Page 1 of 1 1
Topic Options
#193515 - 2009-04-19 05:04 PM IE Setup / RunOnce and PhishingFilter
JWisham Offline
Fresh Scripter

Registered: 2009-04-19
Posts: 5
Loc: AL, USA
Hey everyone, brand new to the forums.

Have a few specific keys that we are trying to setup/create upon login that (alone) don't seem to work (while the rest of the script is perfect).

The only "common thread" I could find is that these registry keys don't exist at all. These logins are new, and have never logged into the network or locally on those machines previously - most will take place on XP machines.

The three registry keys (or commands, I should say) we have trouble with are:

WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "RunOnceHasShown", 1, "REG_DWORD")
WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "RunOnceComplete", 1, "REG_DWORD")
WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PhishingFilter", "Enabled", 2, "REG_DWORD")

This is trying to circumvent and streamline the usage of IE once they login.

Just a heads up: I did actually try searching using writevalue, runonce, and phishingfilter but didn't get any results back on the BB, so I figured I'd start a new topic in case someone else is trying these specific registry modifications and is also having trouble.

(in comparison, start page works fine):
WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page", "http://*************.com", "REG_SZ")

That one has no trouble at all. So, the only difference I could determine was the registry keys don't exist prior to opening IE for the first time. Very strange, since I know WriteValue is designed to write a registry key to start with, if it doesn't see it present at the time.

Any suggestions?

Top
#193517 - 2009-04-20 09:50 AM Re: IE Setup / RunOnce and PhishingFilter [Re: JWisham]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Are these values actually written to the registry?

I have IE8 installed on my machine and there the first two values do not exist. Only the phisingfilter setting is there.

Is this for IE7 or IE8?

[edit]
Woops, I'm beeing a bit rude Welcome to the board!
[/edit]


Edited by Mart (2009-04-20 09:52 AM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#193518 - 2009-04-20 10:19 AM Re: IE Setup / RunOnce and PhishingFilter [Re: Mart]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
These settings comply with IE7, I cant say if they do for IE8, but I suggest you try a clean install of IE8 then turn off those settings manually and check the registry if they actually are written.

RegShot should help you find out exactly what has changed. It's a free app that really helps in these cases. Just Google it.

Top
#193519 - 2009-04-20 11:42 AM Re: IE Setup / RunOnce and PhishingFilter [Re: Arend_]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Yeah, I know.

I just asked the OP about the setup he has.

For IE8 you have these keys and values:
 Quote:

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"IE8RunOnceLastShown"=dword:00000001
"IE8RunOnceLastShown_TIMESTAMP"=hex:d0,0e,71,6a,ce,b5,c9,01
"IE8RunOncePerInstallCompleted"=dword:00000001
"IE8RunOnceCompletionTime"=hex:40,c3,35,84,ce,b5,c9,01
"IE8TourShown"=dword:00000001
"IE8TourShownTime"=hex:60,65,08,61,37,b7,c9,01
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#193521 - 2009-04-20 11:22 PM Re: IE Setup / RunOnce and PhishingFilter [Re: Mart]
JWisham Offline
Fresh Scripter

Registered: 2009-04-19
Posts: 5
Loc: AL, USA
Thanks for the welcoming \:\)

Yes, this is actually for IE7, not IE8.

I did a bit of searching around, and found that these are, in fact, the correct registry settings. For example, if I create a registration file and merge it manually, these exact same settings work perfectly each time.

Its just strange that the phishing filter and runonce registry keys do not, as opposed to the start page / homepage registry key when used with kixtart.

Thanks,

Jared

Top
#193522 - 2009-04-20 11:25 PM Re: IE Setup / RunOnce and PhishingFilter [Re: JWisham]
JWisham Offline
Fresh Scripter

Registered: 2009-04-19
Posts: 5
Loc: AL, USA
.. and to answer your question,

No... the values are NOT written at all. Its like the keys don't pre-exist, so Kixtart does not write anything to them (whereas the other WriteValue, start page, changes the key appropriately).

That's why I came here - process of elimination seems to say that it is the script not changing the key as it is supposed to.

Any suggestions?

Thanks,

Jared

Top
#193524 - 2009-04-21 09:26 AM Re: IE Setup / RunOnce and PhishingFilter [Re: JWisham]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
The difference between your writevalue line that sets the homepage and the other three are the quotes.
Put the values in between quotes and everything should be working. Some times it is in the little things ;\)

 Code:
$rc = WriteValue("HKCU\Software\Microsoft\Internet Explorer\Main", "RunOnceHasShown", "1", "REG_DWORD")
? @ERROR
? @SERROR
$rc = WriteValue("HKCU\Software\Microsoft\Internet Explorer\Main", "RunOnceComplete", "1", "REG_DWORD")
? @ERROR
? @SERROR
$rc = WriteValue("HKCU\Software\Microsoft\Internet Explorer\PhishingFilter", "Enabled", "2", "REG_DWORD")
? @ERROR
? @SERROR


Edited by Mart (2009-04-21 09:26 AM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#193525 - 2009-04-21 10:50 AM Re: IE Setup / RunOnce and PhishingFilter [Re: Mart]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Mart is right, not putting it in quotes means KiX will treat it as a numeric value (like Integer, Double or Long) but the registry wants a String value, putting it in quotes makes KiX treat it as a string.
Top
#193526 - 2009-04-21 06:51 PM Re: IE Setup / RunOnce and PhishingFilter [Re: Arend_]
JWisham Offline
Fresh Scripter

Registered: 2009-04-19
Posts: 5
Loc: AL, USA
That's awesome guys - thanks for pointing out the basic syntax was incorrect (/bonk myself for not seeing that difference to start with).

On a related note, could it also be due to having spaces between separators? There's another one that is similar we have used for years, and it seems to perform just fine, but I noticed there's no spaces. Maybe this is the way Kixtart passes the string/ints properly?

i.e.:
WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1","1406",0,"REG_DWORD")

See? That one works fine. Is this mentioned anywhere in the docs about requiring/not requiring certain syntax (spaces, no spaces, quotes, no quotes, etc.)?

Top
#193527 - 2009-04-21 07:44 PM Re: IE Setup / RunOnce and PhishingFilter [Re: JWisham]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Well I have to disagree on this. Taking the EXACT code from JWisham and running it works for me. In this case the expected value in the registry is an integer however I'm certain it will take a string just fine so if it's not working I have to assume that something else is at play here.
I'm sure some of you other guys that might have more time to review it can track it down, but I've got some other projects I have to get done.

Even modifying his code a little it still works for me.

 Quote:
Variable types
In KiXtart, variables are always of one fundamental data type: Variant. The current implementation of KiXtart uses three types of variants: long integers, doubles (8-byte floating point numbers) and strings. A variant of type string can contain up to 32,000 characters. Integer variables can contain any value between 2,147,483,648 and 2,147,483,647. The type of a variable is automatically changed to the result of the expression that is assigned to it. This means that if you assign a string to a variable containing an integer, the type of the variable is changed to a string.

Works fine for me.
 Code:
$RC = WriteValue('HKCU\Software\Microsoft\Internet Explorer\PhishingFilter', 'Enabled', 2, REG_DWORD)

Also works fine
 Code:
$RC = WriteValue('HKCU\Software\Microsoft\Internet Explorer\PhishingFilter', 'Enabled', '2', REG_DWORD)

Notice that even though normally you "should" put quotes on the REG_DWORD KiX is forgiving enough to allow it with no quotes, but I believe that to be an undocumented method in KiX.

Top
#193532 - 2009-04-21 10:57 PM Re: IE Setup / RunOnce and PhishingFilter [Re: NTDOC]
JWisham Offline
Fresh Scripter

Registered: 2009-04-19
Posts: 5
Loc: AL, USA
Ok - the problem is actually not regarding the quotations after all..

It seems more like this is the result of a problem caused by this being the (excuse the caps) FIRST TIME THIS USER LOGS ON.

In other words, KixTart starts up, runs the logon scripts, THEN Windows shows the "Setting up personalized settings.. " eventually progressing to Media Player, and (gulp) IE.

So, is there any way to circumvent this that you guys can think of?

Top
#193533 - 2009-04-22 12:02 AM Re: IE Setup / RunOnce and PhishingFilter [Re: JWisham]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Not easily as that is part of the issue in that the HKCU is loaded during the logon process but KiX is starting at the front of that as well. If the script is silent you could pause the script for say 30 seconds or a minute.

Then it would automatically take off and finish up when the rest of the current user process has completed or about completed. Be careful though of items like drive mappings that need to happen often more quickly. Might let that run first then pause the script.

Top
#193538 - 2009-04-22 02:47 AM Re: IE Setup / RunOnce and PhishingFilter [Re: NTDOC]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
This is one of the reasons I run commands at the tail end of my login script. For something like this, I'd use RUN to launch another script that sleeps for 60 seconds and then does the updates, allowing the login script to complete with normal performance. This might be especially important if you run your login scripts synchronously.

This is also one of those situations where you might make a request to a server and have the server (via admin credentials) reach out and touch the workstation 30-90 seconds later. No delay during logon, yet fast, almost real-time results.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 764 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.035 seconds in which 0.014 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org