Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Phylum

    WScript popup not working when called by scheduled task

    I'd be curious in knowing the solution to this as well.
  2. Phylum

    Notifications & System Behavior When Running as a Different User

    I'm running through a list of 166 machines and so far nearly a dozen seem to have issues running 'shutdown' via a scheduled task that runs as a different user. Code looks something like this ... Dim f_iRestartDelaySeconds, f_iRestartDelayMinutes f_iRestartDelaySeconds = 1800...
  3. Phylum

    Proper Date Conversion Based on Regional Settings

    Sorry if I seem dense - I just wan't getting it. I now have a better understanding of what I was doing wrong. Thanks again strongm and Geates!
  4. Phylum

    Notifications & System Behavior When Running as a Different User

    Objective: Notify user of system reboot in 30 minutes & 'schedule' reboot via `shutdown -t XX`. If the system is still up 30 minutes later, issue 'shutdown(6)' via: Win32_OperatingSystem History: I've got a scheduled task that runs as a different user (call it user X) with elevated privileges...
  5. Phylum

    vbscript pop-up that doesn't stall script

    I had considered that but its not 'elegant'. I didn't want to have a collection of scripts like that floating around. Sad to know there isn't an option to do this :( Glad to know there isn't an option to do this :) Thanks again Geates
  6. Phylum

    Proper Date Conversion Based on Regional Settings

    strongm - thanks for the reply & link. This is an excellent function indeed. But something isnt' behaving properly. For future ['scheduled'] deployments, I usually do something like: 'if (Today's Date is > Target Date) Then if (Now() > "2/13/2013") Then do whatever end if That tends to...
  7. Phylum

    Script to check for empty file and wait for 5 minutes and try again if empty

    Ready fire aim! - shooting from the hip here. I'm not entirely sure I understand the process. I'm probably just being dense. Here's a function that returns true/false if the file is empty. Function FileEmpty(File_Path_Name) Const s_ForReading=1 Const s_ForWriting=2 Dim s_sFileName...
  8. Phylum

    VBScript to take ownership

    Just to confirm, after executing the takeown command wshShell.Run "TAKEOWN /F """ & objUser.profilePath & """ /R /D Y", 0, True Is your current user ID listed as the owner? [ol 1] Check the Properties of the folder Go to the Security tab Click Advanced Click the Owner tab Are you listed? [/ol]...
  9. Phylum

    vbscript pop-up that doesn't stall script

    Outside of creating a chromeless window via HTABox, I'm curious to know if there's a way in vbscript to display a pop-up that doesn't stall the entire script. Both msgbox and popup stall the script until either a user intervenes, or, in the case of popup only, the timeout occurs.
  10. Phylum

    Proper Date Conversion Based on Regional Settings

    You're correct - I missed a step when I was posting that - the CurDT one looks like the way to go. Function CurDT Dim s_oWMIService, s_colItems, s_oItem Dim s_sLocalDateTime, s_iLocalMonth, s_iLocalDay, s_iLocalYear Dim s_iLocalHour, s_iLocalMinute, s_iLocalSecond Dim s_MMDDYYYY...
  11. Phylum

    Proper Date Conversion Based on Regional Settings

    Too soon for a bump or is that the solution, to use something like that curdt function?
  12. Phylum

    'Privilege not held' Error; Shutdown vs RemoteShutdown

    In Short: Why doesn't RemoteShutdown work for a local user on a local workstation? Why must one use Shutdown instead? While testing a reboot function within a script as a user with local admin rights on the machine in question, I kept getting '-2147217310/80041062 Privilege not held' errors...
  13. Phylum

    Script Doesn't Always Complete Successfully

    Ohh and one more thing, something I touched on before: The script runs at 2AM but we won't necessarily know the state of the machine. We won't know if its locked (not used), unlocked (actively used) or just sitting at the login screen. The script should execute under any of those circumstances.
  14. Phylum

    Script Doesn't Always Complete Successfully

    Happy Monday to you Geates - I hope you had a pleasant weekend. Thanks also again for the reply. Hah yeah its not immediate - I wanted to give the user notice *just in case* - there's a 'shutdown -a' script they can execute in an emergency situation. :) I tried to add that as a fail safe in...
  15. Phylum

    Script Doesn't Always Complete Successfully

    Thanks for the response Geates. As I mentioned before, the user has full local admin rights and more than enough AD rights. As for the 'start' in directory, the script resides in a directory on the local machine which the user has full access to. I forgot to add two things: I added a...
  16. Phylum

    Script Doesn't Always Complete Successfully

    I've written a script that runs via a Scheduled Task under a user account that has full local admin privileges on all workstations and sufficient access in AD. When I initially tested the script, I ran it as a normal user account that also had full local admin privileges but very limited AD...
  17. Phylum

    Proper Date Conversion Based on Regional Settings

    So I spent some time trying to figure out Locales, Regional Settings etc and decided on using just the LocalDateTime property in Win32_OperatingSystem: Function CurDT Dim s_oWMIService, s_colItems, s_oItem Dim s_sLocalDateTime, s_iLocalMonth, s_iLocalDay, s_iLocalYear Dim s_iLocalHour...
  18. Phylum

    Proper Date Conversion Based on Regional Settings

    I periodically run into an issue where the date [format] I'm using in my VBScripts (typically MM/DD/YYYY) don't behave as expected on various machines. Upon further inspection it has to do with the local regional settings on said machine. What's the best method for ensuring that my dates are...
  19. Phylum

    Query for pre-existing sAMAccountName

    Hi DougInCanady & Welcome to Tek-Tips! I'm fairly certain I've done this exercise in the past so I'm likely to have some code floating around somewhere but it might take me a while to find it. On the upside, I've found what I believe will work for you via a quick Google search. Assuming the...
  20. Phylum

    Ideal Method for Handling Diverse Localization Settings

    And that format works everywhere, no matter the format of the local machine running the script? Thanks for this information!

Part and Inventory Search

Back
Top