Jump to content

InTheFlow

Member
  • Posts

    35
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Posts posted by InTheFlow

  1. I had a program running called 'Iconoid'. It is used to keep track of where icons are on the desktop so that you can easily put them back where you want them in the event of a resolution change. It was causeing the problem. As soon as I shut it down the problem went away. Started it back up and once again had the problem. I've un-installed it as it doesn't work with Shell Object 'icons' anyway.

    Resolved! :thumbup

  2. Hello All.

    Any windows that are open do not blink out only the Background, Icons, & Taskbar. It happens after about 3-4 seconds. This is a fresh install of WinXP Pro that was slipstreamed with SP2, RyanVMs updates, dx 9.0c, & raid drivers.

    SP32-20080330-151701-1.jpg

    SP32-20080330-151717-1.jpg

    Has anyone seen this happen before? What is the cause/fix? I'd really rather not have to do a full re-install again as I'm almost done setting things up. :ph34r:

  3. I searched this forum/google for 'icon' and went through the posts. I found that you are supposed to put in a 0 for the IconTitleWrap value to keep the icon text from wrapping. I searched through the registry and changed all those values to '0'.

    However, even after a reboot the text is still being wrapped instead of truncated. I have large fonts and large icons enabled.

    Anyone have a fix for this problem?

  4. I found the fix for my last problem. I must have accidentally turned off 'Enable Pinned Items on Start Menu'. In case someone else runs into this problem, here is the reg info to fix it:

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]

    "NoStartMenuPinnedList"=dword:00000000

    I ran a repair install of Windows and so far this evening I haven't noticed any of the weird problems I was having before. I'm inclined to believe that the IE7 update hosed up my system pretty good and that the repair install fixed whatever was up. If the problems prove to in fact not be resolved, I'll post back asking for help.

  5. I used nLite to update/slim down an XP install CD & add RAID drivers. I'm experiencing some weird things happening in Windows now and am wondering if anyone has insight into why?

    Intermittently I have a problem where if I'm viewing an open window (doesn't matter which one...it could be a configuration screen, firefox, thunderbird etc.) everything outside of the window goes black. The taskbar and all icons just dissapear. Then if I move my mouse outside of the window, it all comes back.

    The unlock computer message comes up saying that only I or an administrator can unlock it. However, when I type in the correct password it comes back with the same message. It happens at intermittent times. Sometimes happens when I unplug a USB device, other times when I look at the screen sideways. Seems to be random. Unlike when it comes out of the screensaver mode and prompts for the password, it doesn't have my username pre-populated in that field of the log in box. Thats when I know I'm in trouble. Ctrl-Alt-Del does nothing at this point. I have to reset the computer to get back in.

    If I go to the Start Menu Properties, click 'customize' and check the boxes under Show on Start menu 'internet' & 'email', click 'OK', 'apply', & then 'OK' again...windows pauses a few moments while the changes are applied. However, when I then press 'Start' they are not shown as I had requested. If I then go back into properties it shows like I had never checked the items to begin with. The same thing happens if I reboot in between checking the boxes and clicking on the start menu.

    I added SP2, RyanVM's hotfixes & the Dx9c addition in addition to the RAID drivers with nLite. I also did a number of the tweaks available in nLite but haven't added anything other than that.

    If anyone can help with some or all of these problems, I'd be most appreciative. They currently have me stumped. :wacko:

  6. Then some very nice "Gnome' " came to my rescue and put all the critical tweaks into one little registry script.

    Now, it only takes a second or two to incorporate my 'Tweaks' and there's no longer the threat of me screwing it up somehow.

    Shutting down redundant Services is now in a neat little batch file. Touche!

    I also use my own "cleanup.bat" file to remove all the old temp files, etc. from the HD.

    Using scripts, batch files, etc., greatly speeds up the process of tuning up a PC. :thumbup

    Cheers!

    OG

    Sheesh OldGoat43, stop teasing us like that already and share how to make the Gnome's script & bat file! ;) I re-built my system last week and am STILL tweaking it...

  7. I've put hours into making my unattended install disc and I started wondering...for a home user with one PC to re-do, what is the point? It seems like even when things go perfectly, that there will be some programs that need to be installed manually anyway. :crazy:

    Now, I admit...it is VERY cool to have a disc do this for you and there is great personal satisfaction in having it work. But, I got to thinking that the amount of time I'm putting into making this thing work correctly is going to be significantly longer than just installing it the 'old fashioned' way, updating with windows update, tweaking it how I want it and then just imaging the disc.

    Are there other reasons why its better to go the Unattended route? One thing I thought of is that there may not be as many temp files laying around going the unattended route. But then again, you could always use CCleaner to remove that stuff before imaging the disc.

    Anyone have any thoughts on this? Why do you go through all the effort of making one of these?

  8. The $99 includes one year of support and upgrades. You don't have to pay the $75/year after the first year, but you won't get "free" upgrades or support.

    Well then, its not as bad as I had originally thought...

    I started evaluating the different ones I listed above. Textpad, EmEditor, Programmer's Notepad, & jEdit really aren't going to do it for me. From what I've seen so far, they just don't hold a candle to Notepad ++ . Tomorrow I'll compare it with Kixtarter and ASE to see which I like better. Notepad ++ actually does have built in support for kixstart, lets you customize it (I think it will let me set up block formatting but won't know until I play with it more.) and has a number of plug-ins that can be added. One of my favorite features is that it allows you to easily make the text larger...that is REALLY nice on hi-res displays!

    To NOT go 'bug-eyed' while coding is a huge benefit! :lol:

  9. Do those other editors have proper color coding for KiX? The trick...other scripting languages.

    I have no idea if they have those features because I haven't actually checked them out yet. I watched the video...that is a really cool feature ASE has! The only thing that gets me about that program is that they charge $99 for it and then on top of that want $75 a year for 'upgrade protection'. Seems a little jacked up to me. But who knows, I might wind up going with it anyway...

  10. Hmmm...yeah, I'll have to figure something out for deleting older save games. I have a few ideas though.

    I remembered another editor that I've used before. The previous editors I mentioned are good for editing KiX scripts, VB scripts, XML, HTML, CMD scripts, etc, etc. This one is geared specifically towards KiX only and is free. It require's .NET 2.0, but so does AdminScriptEditor.

    Thanks for the link! I d/led and installed it. I've been reading up on different editors. I've seen Textpad, EmEditor, Notepad ++, Programmer's Notepad, jEdit, & now kixtarter which all seem like worthy programs. They are also either open source or charge a nominal fee. :) So many options...so little time!

    I had an idea on the deleting old save game issue...maybe we could have the script check the backup directory for the most recent backup date/time, have it subtract 60 days and then delete anything older than that. How to implement that is another story though...hahahaha

  11. PainKiller is a game I play so I'll see if I can come up with some good code for doing backups for that.

    How long do you want to keep the backups for? Like say the last 2 months worth? I have some code in my backup scripts at work that only keeps the last six months worth of backup logs...it does a check and automatically deletes anything older than 180 days.

    Yeah, the past two months is sufficient but only if backups have been made to the save game files recently. For example, I wouldn't want it to delete all save game files from a game that I hadn't played in over two months. ;) Heck, there are some games I have with game save files that I haven't played in over a year! LOL!

    Maybe some code that looks at a directory for any changes at all and then backs them up if true would be helpful with game backups...hmmm. There seems to be many different ways to achieve good results with kixtart.

  12. Sorry I missed these questions before...I got wrapped up in trying to figure out why the services code would all of a sudden stop working. :)

    No problem at all! I really appreciate you taking the time to answer them and to provide examples. It made it much easier to understand, thanks! :thumbup

    I'm not sure how those ;s got into my script. At one point I had used them to block out a whole section of script during testing, so that may have been where they came from...now i can just use the /* */ so that shouldn't happen again.

    I went to set the script up to work 'for real' today and wound up messing it all up! However, I did finally figure everything out and got it working correctly. Now it backs up the Titan Quest save game files and restarts folding. It is so cool! I know, it doesn't take much to impress me...:lol:!

    Now to expand the script to do the same kind of backup it currently does for TQ for other games, all I need to do is something along the lines of this:

    If @USERID = "2nd OCCT"

    $Result = CompareFileTimes("C:\Scripts\testfile.txt", $TQBackup + "\CHKFileDir\testfile.txt")
    $Result1 = CompareFileTimes("Painkillersavefile", "Painkillersavefile")

    Select

    Case $Result = 1 OR $Result = -3

    messagebox ("Backing up Titan Quest Save-Game Files & restarting folding...","alert", 48) ?

    COPY "C:\Scripts\testfile.txt" $TQBackup + "\CHKFileDir\" @error?
    COPY "C:\Scripts\" "$TQBackup\$DATE\" /s @error ?

    End Select

    Select

    Case $Result1 = 1 OR $Result1 = -3

    COPY "C:\Scripts\testfile.txt" $TQBackup + "\CHKFileDir\" @error?
    COPY "C:\Scripts\" "$TQBackup\$DATE\" /s @error ?

    End Select

    EndIf

    Am I on the right track here? Also, let me see if I understand the nesting stuff you explained...In the above example; the two end select commands are nested within the If..EndIf command. But the 2nd Select...End Select command is NOT nested within the first Select..End Select command because it comes after the previous End Select. Is this correct or have I jumped off the wrong side of the boat?

  13. Break On
    Debug On

    /* Translate @DATE into a useable value for directory names */
    $DATE = SPLIT(@DATE,"/")
    $DATE = JOIN($DATE,".")


    $TQBackup = "V:\Data Backup\Game Backups";Titan Quest Backup Location

    If @USERID = "gaming"
    MessageBox("Beginning Test","alert", 48)
    $Result = CompareFileTimes("C:\Scripts\testfile.txt", "$TQBackup\CHKFileDir\testfile.txt") ?
    Select
    Case $Result = 1 OR $Result = -3
    MessageBox ("Backing up Files Now..."+ @DATE,"alert", 48) ?
    COPY "C:\Scripts\testfile.txt" "$TQBackup\CHKFileDir\" @error ?
    COPY "C:\Scripts\*" "$TQBackup\$DATE\" /s @error ?
    Case $Result = -1
    MessageBox ("Files are newer in target directory..." + @DATE,"alert", 48)
    Case $Result = 0
    MessageBox ("Files are exact matches in target & Backup directories..."+ @DATE,"alert", 48)
    EndSelect
    EndIf

    Exit

    This worked very well. I also like how nice and "tidy" it makes the script. LOL! Thanks for letting me know about the Select...Endselect statement and explaining why its important to use it.

    If you can give me the full paths of the source and destination I may be able to get around using the CHKFile directory. This supposes that the filename for the save game is the same every time...I know that with most games it won't be, but I don't play Titan Quest so I don't know about that particular game.
    Hmmm...now you've got me thinking 'how could I get around this'! LOL Is your idea to compare one of the source files to the one in the most recent backup? I haven't decided which file to use as the 'check' file yet. I want to use a small one. As long as it is updated everytime the game is saved, it shouldn't matter which file I use because the copy command is going to copy the entire directory...both updated and unupdated files.

    The path to the save-game directory is \My Documents\My Games\Titan Quest

    I did some research on error code 3 from the COPY command. That the path isn't found (doesn't specify if it's the source or destination path that isn't found). I would assume the source since it's supposed to create the destination if it doesn't exist, providing you have the trailing \. From the documentation:

    ; If the target (directory) does not exist,

    ; and the target specification does not have a

    ; trailing backslash, COPY will fail with an

    ; errorcode 3 ("path not found")

    COPY "S:\MyDir\" "S:\NewDir" ; fails if NewDir does not exist

    Give this a try:

    COPY "C:\Scripts\" "$TQBackup\@day\test\" /s @error ?

    Well, I actually did some research on the command before posting and had already stumbled accross the above. So, I attempted to put it into practice by making sure there was a trailing '\' but the issue persists.

    I had tried your example code above before as well but it didn't work. I tried it again though, just in case, and I still get error code 3.

    If you have a chance, see if it will work for you. I also tried removing the '@day' and just replaced it with 'day' to see if that was the problem. No luck, it doesn't seem to like deeper directories for some reason...

    * I use PrimalScript Pro at home and AdminScriptEditor at work. I prefer AdminScriptEditor but the PrimalScript Pro license we have is a little more flexible in home usage allowance.

    Its funny that you mentioned this because I was going to ask you if you use a special program for this kind of stuff. LOL! I'll check into them but if they are very expensive, I'd rather find a free one.

    And now onto a major issue... :yes::lol:

    As you know, earlier in the post we came up with this code to restart the folding services...which works perfectly. :thumbup

    If @USERID = "gaming"
    Shell '%COMSPEC% /C START "" /WAIT net start "FAH@@E:+Program Files+Folding@@Home+F@@H1+FAH504-Console.exe"'
    Shell '%COMSPEC% /C START "" /WAIT net start "FAH@@E:+Program Files+Folding@@Home+F@@H2+FAH504-Console.exe"'
    EndIf

    However, when I attempt to put this together in the same script with the backup portion, it doesn't work.

    I tried this:

    Break On

    $DATE = SPLIT(@DATE,"/")
    $DATE = JOIN($DATE,"-")

    $TQBackup = "V:\Data Backup\Game Backups\";Titan Quest Backup Location

    If @USERID = "2nd OCCT"

    messagebox ("Beginning Test","alert", 48)

    $Result = CompareFileTimes("C:\Scripts\testfile.txt", $TQBackup + "\CHKFileDir\testfile.txt")?

    Select

    Case $Result = 1 OR $Result = -3

    messagebox ("Backing up Titan Quest Save-Game Files & restarting folding..."+ @DATE,"alert", 48) ?

    COPY "C:\Scripts\testfile.txt" $TQBackup + "\CHKFileDir\" @error?
    COPY "C:\Scripts\" "$TQBackup\$DATE\" /s @error ?
    Shell '%COMSPEC% /C START "" /WAIT net start;"FAH@@E:+Program;Files+Folding@@Home+F@@H1+FAH504-Console.exe"'
    Shell '%COMSPEC% /C START "" /WAIT net start;"FAH@@E:+Program;Files+Folding@@Home+F@@H2+FAH504-Console.exe"'
    Sleep 5

    Case $Result = -1
    messagebox ("Files are newer in target directory..." + @DATE,"alert", 48)
    Shell '%COMSPEC% /C START "" /WAIT net start;"FAH@@E:+Program;Files+Folding@@Home+F@@H1+FAH504-Console.exe"'
    Shell '%COMSPEC% /C START "" /WAIT net start;"FAH@@E:+Program;Files+Folding@@Home+F@@H2+FAH504-Console.exe"'
    Sleep 5

    Case $Result = 0
    messagebox ("Files are exact matches in target & Backup directories..."+ @DATE,"alert", 48)
    Shell '%COMSPEC% /C START "" /WAIT net start;"FAH@@E:+Program;Files+Folding@@Home+F@@H1+FAH504-Console.exe"'
    Shell '%COMSPEC% /C START "" /WAIT net start;"FAH@@E:+Program;Files+Folding@@Home+F@@H2+FAH504-Console.exe"'
    Sleep 5

    EndSelect

    ENDIF

    EXIT

    This:

    Break On

    $DATE = SPLIT(@DATE,"/")
    $DATE = JOIN($DATE,"-")

    $TQBackup = "V:\Data Backup\Game Backups\";Titan Quest Backup Location

    If @USERID = "2nd OCCT"

    messagebox ("Beginning Test","alert", 48)

    $Result = CompareFileTimes("C:\Scripts\testfile.txt", $TQBackup + "\CHKFileDir\testfile.txt")?

    Select

    Case $Result = 1 OR $Result = -3

    messagebox ("Backing up Titan Quest Save-Game Files & restarting folding..."+ @DATE,"alert", 48) ?

    COPY "C:\Scripts\testfile.txt" $TQBackup + "\CHKFileDir\" @error?
    COPY "C:\Scripts\" "$TQBackup\$DATE\" /s @error ?

    Case $Result = -1
    messagebox ("Files are newer in target directory..." + @DATE,"alert", 48)

    Case $Result = 0
    messagebox ("Files are exact matches in target & Backup directories..."+ @DATE,"alert", 48)

    EndSelect

    Shell '%COMSPEC% /C START "" /WAIT net start;"FAH@@E:+Program;Files+Folding@@Home+F@@H1+FAH504-Console.exe"'
    Shell '%COMSPEC% /C START "" /WAIT net start;"FAH@@E:+Program;Files+Folding@@Home+F@@H2+FAH504-Console.exe"'

    ENDIF

    EXIT

    And this:

    Break On

    $DATE = SPLIT(@DATE,"/")
    $DATE = JOIN($DATE,"-")

    $TQBackup = "V:\Data Backup\Game Backups\";Titan Quest Backup Location

    If @USERID = "2nd OCCT"

    messagebox ("Beginning Test","alert", 48)

    Shell '%COMSPEC% /C START "" /WAIT net start;"FAH@@E:+Program;Files+Folding@@Home+F@@H1+FAH504-Console.exe"'
    Shell '%COMSPEC% /C START "" /WAIT net start;"FAH@@E:+Program;Files+Folding@@Home+F@@H2+FAH504-Console.exe"'

    $Result = CompareFileTimes("C:\Scripts\testfile.txt", $TQBackup + "\CHKFileDir\testfile.txt")?

    Select

    Case $Result = 1 OR $Result = -3

    messagebox ("Backing up Titan Quest Save-Game Files & restarting folding..."+ @DATE,"alert", 48) ?

    COPY "C:\Scripts\testfile.txt" $TQBackup + "\CHKFileDir\" @error?
    COPY "C:\Scripts\" "$TQBackup\$DATE\" /s @error ?

    Case $Result = -1
    messagebox ("Files are newer in target directory..." + @DATE,"alert", 48)

    Case $Result = 0
    messagebox ("Files are exact matches in target & Backup directories..."+ @DATE,"alert", 48)

    EndSelect

    ENDIF

    EXIT

    I also switched everything back to If...Endif statements to see if that would work.

    In all four cases the results are the same. The folding service is not restarted but the files to be backed up are copied properly. ("2nd OCCT" is user account I created to test this out.)

    I re-ran the logoff script that does only the restart to make sure that it still works. It does. I then added 'sleep 10' after the net start command to see what the heck the system was doing. (Show logoff scripts is still enabled under group policy.) Well, the wierd thing is that a console box comes up...with nothing in it!

    I must have ticked the script gods off or something! LOL!

    Couple more questions, if you please... :blushing:

    1. Many commands say they can be 'nested' as many times as memory allows. How do you properly 'nest' commands and how do you know how many 'nests' your memory can handle?

    Yeah, you can reorder the information after it's been split into an array. However, I recommend keeping it in YYYY.MM.DD format so it's listed alphabetically in chronological order in Windows Explorer. But, if you want to reorder it to MM.DD.YYYY, here ya go:

    $DATE = Split(@DATE,"/")
    $DATE = $DATE[1] + "." + $DATE[2] + "." + $DATE[0]

    2. Where did you learn this from? I ask because I looked at the command reference to see if there were examples like this but what it showed was pretty basic. Is there a resource available that I can use to study this kind of thing or is it just something that comes with experience?

    3. When you are formating a script...as in adding tabs to make it easier to read, does the script care or do we do that just to make it easier for us to read and follow what is happeing?

    4. Is using /*...*/ how you do block commenting? The user guide says to refer to that but there is no hyperlink for further detail nor is there any other mention of it on the commands page.

    I'll take a closer look at it tonight

    Hehe...scroll up. I'd already looked at it and replied again. :)

    Yep, I realized that after I had posted...I guess we were both working on replies at the same time. Thanks again for your help!

  14. @DATE is tricky. Fortunately I've already done this before because I use a KIX script for some other backups.

    Sweet! Must be my lucky day! :w00t:

    Another suggestion is to add BREAK ON as the first line of your script. If you don't turn this on and kill the script, KiX will automatically log you off. It was originally designed to be used as a logon script processor so this behavior was implemented to keep users from killing the logon script before it completed.

    Thanks for the tip/heads up on this. So far I haven't had to use ctrl-c to stop a rebel script. But, its probably only a matter of time... :unsure:

    Of course, there is also a much simpler way...but it only just came to me while I was typing this. It's untested but it should work.

    $DATE = SPLIT(@DATE,"/")
    $DATE = JOIN($DATE,".")

    This worked! :thumbup

    Is there a way to join each element back together in a different order? For example: Month.Day.Year

    Maybe each element could be assigned a number and then joined back together in whatever order you put the numbers in...I haven't had time to play with the first code idea you offered. Maybe that is the answer.

    As far as your question regarding the copy command; what you have should work. I'm not sure why it's returning an error code of 3. Again, I'll take a closer look at it tonight when I have a bit more time.

    That would be great, thanks! I have to admit that I'm perplexed on the issue. :wacko: I can work around that problem by just adding another subdir to $TBBackup. But still, I'm crazy curious! LOL

  15. If you only want to backup the saved game files you can either have it just copy the entire directory, or if it is the same file everytime you can have it use CompareFileTimes. There are several ways it can be done.

    I've been working on getting this part to work and am having some issues. Here is the additonal code I'm using:

    DEBUG "ON"

    $TQBackup = "V:\Data Backup\Game Backups" ;Titan Quest Backup Location

    If @USERID = "gaming"

    messagebox ("Beginning Test","alert", 48)

    $Result = CompareFileTimes("C:\Scripts\testfile.txt", $TQBackup + "\CHKFileDir\testfile.txt") ?

    IF $Result = 1 OR $Result = -3

    messagebox ("Backing up Files Now..."+ @DATE,"alert", 48) ?

    COPY "C:\Scripts\testfile.txt" $TQBackup + "\CHKFileDir\" @error ?

    COPY "C:\Scripts\" $TQBackup + "\@date\" /s @error ?

    EndIF

    IF $Result = -1

    messagebox ("Files are newer in target directory..." + @DATE,"alert", 48)

    EndIF

    IF $Result = 0

    messagebox ("Files are exact matches in target & Backup directories..."+ @DATE,"alert", 48)

    EndIF

    ENDIF

    NOTE: the '?', "@error", & Debug = "on" commands I have added so I can understand how this thing works better. :)

    What I'm trying to do is backup the save game files in a different directory every time. As in, I DON'T want it to overwrite the previous backup each time. That is why I have a CHKFileDir Directory and copy only one file to it. It acts as the always updated 'check file' which can be compared with the original.

    It is the 2nd copy command I'm having issues with & questions about (bolded & Italicied). Ideally, I'd like to have a directory created based on today's date. But because the @DATE thing (variable...command?) returns a value in the xxx/xx/xx format, a directory can't be created because those are illegal characters for both file and directory names.

    My first question is: Is there a way to get the response from @date formated in a different way? For example: xx-xx-xxxx

    If so, this would resolve the issue.

    If not, then is there a way to change the target directory name incrementally each time it backs up the files?

    Also, I've done quite a bit of experimenting and as a result have a question about the copy command. If I type this into the .kix file:

    COPY "C:\Scripts\" $TQBackup + "\@day\" /s @error ?

    It creates a directory with today's day name without error

    However, If I type this into the .kix file instead:

    COPY "C:\Scripts\" $TQBackup + "\@day\test\" /s @error ?

    or

    COPY "C:\Scripts\" $TQBackup + "\@day\@day\" /s @error ?

    or

    COPY "C:\Scripts\" $TQBackup + "\@day\test" /s @error ?

    or

    COPY "C:\Scripts\" $TQBackup + "\@day\@day" /s @error ?

    I get a return error code of "3" which means directory not found. Why is that? My understanding of the copy command is that as long as I put a trailing "\" at the end, it should create the directory. Am I reaching a limitation within the kixtart program or formating it incorrectly?

  16. Question: Is it normal to have to put the path on that line? It seems like it should automaticlly check for the script in the same folder that the kix32.exe is found...

    To be honest I have KIX32.EXE (and WKIX32.EXE) in my Windows directory so I've always specified the full path to the script itself.

    Now the next step is to enhance the script so that depending on which user is logging off, it will back up specific files/directories to another hard drive automaticaly. :) Would you recommend that I start my research on how to do that with kixart's copy command or use the shell command to use something from the command prompts?

    Personally, when I'm using KIX I use as much native code as I can (i.e. use KiX's COPY command instead of shelling it out). Now if you want to make the source and destination match exactly, I recommend giving XXCOPY a look. I use that for disk-to-disk backups with great results.

    Good stuff to know. I need the files copied so that they match the source but don't need to backup an entire drive. On the gaming profile for example, I want it to back up the savegame directory of the games I played provided that the contents of those folders changed. I'll look into Kix's copy command first to see if I can do it with that or not.

    Thanks again for the help! :w00t:

  17. nmX.Memnoch - thanks a million for all your help on this!

    If so, the script would not execute because the computer name would not be equal to "comp1".

    You should be checking for a user name, not a computer name. Make sure you have the user's name in the If line instead of the computer name.

    Even though I typed 'computer name' I meant 'user name' :blushing:

    Hmmm...ok, we need to see what user context the logoff scripts run in. They should still run in the context of the user that was logged in since they're user logoff scripts. Make this change:

    run > gpedit.msc > User Configuration > Administrative Templates > System > Scripts >Set "Run logoff scripts visible" to Enabled

    Add the following to the top of your logoff script so we can see what user the script is running as:

    ? "@USERID"
    Sleep 10

    When it runs it will display the username that the script is running as, and pause for 10 seconds so you can see it. Make sure that it displays the same username as what you were just logged in with.

    I did all of the above and here is what happened: The same thing as before. As in I saw the message 'running logoff scripts' but never got a command box displaying anything...

    I add 'c:\scripts\kix32.exe' to the script name line

    Under Script Parameters I enter: 'logoff.kix'

    That's the proper way to do it.

    This got me to wondering so I checked to make sure it was still set up this way. It was actually all on the script name line. So, I switched it to match the above example and then it flashed a command box with an error instead of just saying it was 'running logoff scripts'.

    I logged off several more times and finally got the entire message. It said: 'Error Failed to find/open script [logoff.kix]!'

    That made me think that maybe it didn't know where the script was located at. So, I went back into the group policy's logoff section and added the path to the parameters line. Now, instead of just saying 'logoff.kix' it says: 'c:\scripts\logoff.kix'.

    After making that change, it worked...all of it. It automatically launches the services at logoff! :thumbup

    Question: Is it normal to have to put the path on that line? It seems like it should automaticlly check for the script in the same folder that the kix32.exe is found...

    Now the next step is to enhance the script so that depending on which user is logging off, it will back up specific files/directories to another hard drive automaticaly. :) Would you recommend that I start my research on how to do that with kixart's copy command or use the shell command to use something from the command prompts?

  18. KiX uses the @ symbol to identify built in variables that can be used. For instance, @USERID is the current users logon name, @WKSTA is the computer name, @DATE is the current date, @TIME is the current time, etc, etc. If you want to use "@" in a string you have to double it...like so:

    If @USERID = "comp1"
    Shell '%COMSPEC% /C START "" /WAIT net start "FAH@@E:+Program Files+Folding@@Home+F@@H1+FAH504-Console.exe"'
    Shell '%COMSPEC% /C START "" /WAIT net start "FAH@@E:+Program Files+Folding@@Home+F@@H2+FAH504-Console.exe"'
    EndIf

    Notice that I also added START "" /WAIT into the command. This basically forces cmd.exe (and in turn KiX) to wait until this command has finished processing before starting the next command.

    Thanks for the clarification on the @ symbol. I had read that you have to double those when using them in a string but didn't make the connection. Thanks!

    Where are you getting the information about the START & /WAIT commands? I searched for both of them within Kixtart's command lists but can't find them. Is Kixtart interfacing with another set of commands that can be 'nested' within the .kix script?

    On to the current results...

    When I add the above code into the .kix file, go to the command line and type: "kix32 logoff.kix" and press enter, the commands execute successfully and start the two services. :thumbup

    However, when I add the script to the User Group Policy it is not working. I hear the windows exit sound, a message displays saying: "running logoff scripts" and it then drops me back to the logon/welcome screen. If I go into another login, pull up task manager and look to see if the services were, in fact, started...they were not.

    So something isn't working properly. This is what I've tried on the group policy settings:

    First I go:

    run > gpedit.msc > User Configuration > Windows Settings > Scripts (Logon/Logoff) > Standard Tab > Double click "Logoff"

    I add 'c:\scripts\kix32.exe' to the script name line

    Under Script Parameters I enter: 'logoff.kix'

    I've also tried 'c:\scripts\kix32.exe logoff.kix' on the script name line & nothing in the parameters box

    And 'c:\scripts\kix32 logoff.kix' on the script name line & nothing in the parameters box.

    All three attempts produced the same results as described above.

    I'm wondering if what is happeing is that once the windows exit sound has played it means the user is logged out and the script is running after that? If so, the script would not execute because the computer name would not be equal to "comp1".

    To test this I changed the logoff.kix script to:

    Shell '%COMSPEC% /C START "" /WAIT net start "FAH@@E:+Program Files+Folding@@Home+F@@H1+FAH504-Console.exe"'

    Shell '%COMSPEC% /C START "" /WAIT net start "FAH@@E:+Program Files+Folding@@Home+F@@H2+FAH504-Console.exe"'

    and then logged off thinking it should run regardless of which user was logged in. However, I got the same results as above.

    Am I entering the command into the logoff script name incorrectly?

    Thanks.

×
×
  • Create New...