|
|
|||||||
I would like to know how I can put a string in my kix script that will be added to the registry's runonce so that the command can execute at windows bootup. the string that will be added to the registry, and it's fnction is to renames a file._bk to file.dll in the c:\windows\system32 directory. Can someone help please |
||||||||
|
|
|||||||
Hello Wal, How about something like this: code:IF @INWIN=2 ; Windows 9x systems |
||||||||
|
|
|||||||
what I am doing is removing mcafee and when I do that, after the reboot it renames the c:\windows\system32\shlwapi.dll FOR WINNT c:\windows\system32\shlwapi.dll FOR WIN9X to shlwapi._bk Now that causes some windows program not to work like Internet explorer. What I want to do is after my script runs and I reboot the computer I want to rename that file back to shlwapi.dll so I don't get error messages. Any ideas |
||||||||
|
|
|||||||
This method does rename files during the reboot. Give it a try and let me know. code:IF @INWIN=2 ; Windows 9x systems |
||||||||
|
|
|||||||
I tried it but it did not rename the shlwapi._bk to shlwapi.dll so when windows booted it gave me the message that the file is missing. this is what was added to the wininit.ini |
||||||||
|
|
|||||||
Hello Wal, Please post the exact code that you used. The $SF is a variable to get the current directory for Windows 9x or NT. Perhaps you are missing a part of the code I wrote. I tested it on a couple of systems and the code posted appears to work fine on these systems. Please post your code and I will take a look at it for you to see what may be missing... [ 20 August 2001: Message edited by: NTDOC ] |
||||||||
|
|
|||||||
doc, have you tested this script? there are two might be's I encountered when I looked at this topic approx. 5secs. so can't be sure but. one thing is that wal didn't use whole script (lacking the line $sf = %windir). other is what I think is the cause, uttleast some versions of kix does not allow variable used in that way in scripts. and not even one version should (like kix-doc's say). so the line: WRITEPROFILESTRING("%windir%\wininit.ini","RENAME","$SF\system32\shlwapi.dll","$SF\system32\shlwapi._bk") should be: cause there ain't such variable named as: anyways, I might myself use and this way avoid totally the use of $sf. just my 1.5 cents... |
||||||||
|
|
|||||||
true, true... I thought of the %windir%, but wrote the $SF first. Also, this may not work for NT/2000 I only tested it on a Win95 and Win98 box. I am using KiXtart v3.63 Wal, Please post your code so we can look, and if it does not work we may have to look at another way. Not sure the RUN ONCE will work or not... depends if the .DLL get loaded or not first. Don't worry though, it can be done one way or another... |
||||||||
|
|
|||||||
Hi guys, This is the code all works fine only I am not sure how to bypass the shlwapi file that mcafee renames to ._bk i tried to do it in the runonce but the file is used at the time that the runonce execute. DOC your code worked but I don't know why on NT4 using IE5 I get this problem. Anyhow, Thanks in advance. BREAK ON ;Variable Declaration Section $UninstNT = ("C:\PROGRA~1\NETWOR~1\VIRUSS~1\SETUP.EXE /NODIALOG -SMS -fC:\PROGRA~1\NETWOR~1\VIRUSS~1\UNINST.INS") $User = @USERID $NewName = ($User + ".log") $Logdir = "%windir%" $LogName = ($Logdir + "\" +$NewName) ;---------------------------------------------------------------------------------------------------------------- ; Uninstalling 4.03 can sometimes cause problems with SHLWAPI.dll file used by Internet Explorer 5.x SELECT CASE @INWIN = 1 ;copy "%windir%\system32\shlwapi.dll" "%windir%\system32\shlwapi._bk" CASE @INWIN = 2 ;copy "%windir%\system\shlwapi.dll" "%windir%\system\shlwapi._bk" CASE 1 :WIN9x IF EXIST ("C:\PROGRA~1\NETWOR~1\MCAFEE~1\uninst.ins") "UNINSTALLING MCAFEE 4.03...PLEASE WAIT." CASE @ERROR = 259 CASE @ERROR <> 259 ENDSELECT ENDIF ;End condition for IF EXIST ("C:\PROGRA~1\NETWOR~1\VIRUSS~1\uninst.ins")
IF @INWIN = 1 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;If OS is Windows NT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IF EXIST ("C:\PROGRA~1\NETWOR~1\VIRUSS~1\uninst.ins") "UNINSTALLING MCAFEE 4.03...PLEASE WAIT." CASE @ERROR = 0 ;;;;;;;;;;;;;If the Uninstall is Successfull cls ENDSELECT ELSE ENDIF ;End condition for IF EXIST ("C:\PROGRA~1\NETWOR~1\VIRUSS~1\uninst.ins")
:THEEND |
||||||||
|
|
|||||||
what about syncing the logonscript? then it might not be used... or, if you want to prevent it from being changed, use open(). it can't be changed if it is exclusively opened by your kix-process. well these are my 0.32 cents... |
||||||||
|
|
|||||||
Well see the changes take effect during the reboot, so the file is not in use at that time. |
||||||||
|
|
|||||||
well, I got it done like this. I killed process explorer.exe and renamed/deleted file. worked fine. then just rerun explorer or logon again. |
||||||||
|
|
|||||||
could you send me the code please. |
||||||||
|
|
|||||||
What is poaginst.exe ? I assume you are changing the Antivirus program being used by your company... Sorry, I don't have McAfee installed any more, so I'm not sure what you mean by Windows 95 works but NT has a problem. I don't remember having this problem when I removed McAfee a year ago from our systems. Sounds like Lonkero may know what your experiencing and perhaps he can shed some light and code for you. Otherwise I will have to break out my McAfee Killer --- and see if it can be updated. |
||||||||
|
|
|||||||
No worries DOc I was able to find out what string in the registry mcafee was removing so I deleted it it and created my own registry patch to correct the problem. Thanks for all the help IT'S BEER TIME. |