Jump to content

nergmlam

Members
  • Posts

    10
  • Joined

  • Last visited

nergmlam's Achievements

Seeker

Seeker (1/7)

1

Reputation

  1. Func _TimeConvert_GetDaylightSavingTime($__iShow) ; Please don't remove this line - © Copyright 2013: J. Malmgren, wwww.tryware.dk ; Get SystemTime, convert it with Daylight saving time (DST), and convert it according to $__iShow ; Return result: Syntax: ; YYYYMMDD HH:MM:SS $__iShow =1 ; YYYYMMDD $__iShow =2 ; HH:MM:SS $__iShow =3 ; HHMMSS $__iShow =4 ; ; Examples: ; ; MsgBox(0,"YYYYMMDD HH:MM:SS",_TimeConvert_GetDaylightSavingTime(1)) ; MsgBox(0,"YYYYMMDD",_TimeConvert_GetDaylightSavingTime(2)) ; MsgBox(0,"HH:MM:SS",_TimeConvert_GetDaylightSavingTime(3)) ; MsgBox(0,"HHMMSS",_TimeConvert_GetDaylightSavingTime(4)) ; MsgBox(0,"ERROR:",_TimeConvert_GetDaylightSavingTime(5)) Local $__sGetSystemTime = _Date_Time_GetSystemTime() Local $__sGetDstTime = _Date_Time_SystemTimeToTzSpecificLocalTime(DllStructGetPtr($__sGetSystemTime)) Local $__iGetTime = _Date_Time_SystemTimeToDateTimeStr($__sGetDstTime) Local $__sTime ; 1234567890123456789 ; 12/31/2013 23:23:22 Switch $__iShow Case 1 ; YYYYMMDD HH:MM:SS $__sTime = StringMid($__iGetTime, 7, 4) & ":" & StringMid($__iGetTime, 1, 2) & ":" & StringMid($__iGetTime, 4, 2) $__sTime = $__sTime & " " & StringMid($__iGetTime, 12, 3) & StringMid($__iGetTime, 15, 3) & StringMid($__iGetTime, 18, 2) Case 2 ; YYYYMMDD $__sTime = Int(StringMid($__iGetTime, 7, 4) & StringMid($__iGetTime, 1, 2) & StringMid($__iGetTime, 4, 2)) Case 3 ; HH:MM:SS $__sTime = StringMid($__iGetTime, 12, 3) & StringMid($__iGetTime, 15, 3) & StringMid($__iGetTime, 18, 2) Case 4 ; HHMMSS $__sTime = Int(StringMid($__iGetTime, 12, 2) & StringMid($__iGetTime, 15, 2) & StringMid($__iGetTime, 18, 2)) Case Else $__sTime = "SYNTAX ERROR: _TimeGetDaylightSavingTime = 1, 2, 3 or 4" EndSwitch Return $__sTime EndFunc
  2. Hi Valik I just created my account today, and therefore I started to see what other users was having problem with. Yes jkunkels thread is old, but unresolved, and I though my comments could help him, and did hope, that he still had an email notification to his thread. And I did start examining properties of my account, but couldn't find anything about a default signature anywhere. But I can see, that you are using a signature. Where did you create that in your account properties.
  3. Hi Try with: $command = Chr(34) & $ProgramFile & " /qb /I " & $argFile & Chr(34) And please note that when using RunAs and RunAsWait you need to make sure, that the secondary logon service is running, and if you run your script from your own computer using e.g. pseexec.exe to get access to a remote computer, both computers must run the secondary logon service. And the secondary logon service needs the workstation service and netlogon service. The netlogon service only runs on domain computers, not on workgroup computers. You also needs to select a "@workingDir" for the functions, that the end user have write access to. Sincerely Jorgen Malmgren IT-Programmer Denmark - UTC+1 www.tryware.dk ;o) Your brain is like a parachute. It works best when it's
  4. Hi Try to see if you get any errors in your commandline box: RunAsWait("TAP","greatlakesind","Ct5gLe", 0, @Comspec & " /K Copy J:KmanAA.PDF J:KmanLINXX.PDF","",@SW_MAXIMIZE) And please note the following. When using RunAs and RunAsWait you need to make sure, that the secondary logon service is running, and if you run your script from your own computer using e.g. pseexec.exe to get access to a remote computer, both computers must run the secondary logon service. And the secondary logon service needs the workstation service and netlogon service. The netlogon service only runs on domain computers, not on workgroup computers. You also needs to select a "@workingDir" for the functions, that the end user have write access to. Sincerely Jorgen Malmgren IT-Programmer Denmark - UTC+1 www.tryware.dk ;o) Your brain is like a parachute. It works best when it's
  5. Hi I don't have a solution for you, but please note the following. When using RunAs and RunAsWait you need to make sure, that the secondary logon service is running, and if you run your script from your own computer using e.g. pseexec.exe to get access to a remote computer, both computers must run the secondary logon service. And the secondary logon service needs the workstation service and netlogon service. The netlogon service only runs on domain computers, not on workgroup computers. You also needs to select a "@workingDir" for the functions, that the end user have write access to. Sincerely Jorgen Malmgren IT-Programmer Denmark - UTC+1 www.tryware.dk ;o) Your brain is like a parachute. It works best when it's
  6. I'm using the latest version 3.3.8.1 using a RunAs() function, but it's the same problem with RunAsWait(), and I use my domain administrators credentials in RunAs(), and a workindir, that any user have write access to. And I don't load any profile ( using 0 ). It works in Windows XP SP2, but not in Windows 7 Home Edition or Windows 7 Enterprise. Using my script this command doesn't work in Windows XP SP2: %SystemRoot%\system32\appwiz.cpl I don't know why, but using my script this command works in Windows XP SP2: %ComSpec% /C %SystemRoot%\system32\appwiz.cpl But no one of the above works in Windows 7, where I get an 193 error about not having the needed credentials. If I in Wndows 7 change my command to: %ComSpec% /K %SystemRoot%\system32\appwiz.cpl I get the same error, but I can now use the command line box, and if I type SET, I am told, that my domain and username is my domain administrators credentials. I also tried this one with no luck: %ComSpec% /C %SystemRoot%\system32\control.exe %SystemRoot%\system32\appwiz.cpl If I use the Start button and just type appwiz.cpl it works. If I use the Start button and types cmd.exe, and in the command lne box just types appwiz.cpl it works. I've found out that RunAs() needs that the seconday logon service is running. and it is. If I run my script from my own computer using e.g. pseexec.exe to get access to a remote computer, both computers must run the secondary logon service. And the secondary logon service needs the workstation service and netlogon service. The netlogon service only runs on domain computers, not on workgroup computers. And I am working on a domain computer, and all 3 services is running. But if I was working on a workgroup computer, my script wouldn't work, because the netlogon service would only start and immidiately stop again (because of the workgroup). Please note, that my problem isn't about the autoit3 script I use, it's a general problem using appwiz.cpl in Windows 7, maybe using Windows builtin runas.exe commad, or e.g. sysinternals pseexec.exe, or using a .cmd, .bat or .vbs script It's strange because I just examined all the *.cpl I have in C:\Windows\System32, and some other cpl commands works when using my script, but the appwiz.cpl doesn't work. I don't know why, but these one works on Windows 7 using my script with %ComSpec% /C %SystemRoot%\system32 in front of it collab.cpl FlashPlayerCPLApp.cpl Hdwwiz.cpl Inetcpl.cpl Joy.cpl Main.cpl Mmsys.cpl Sysdm.cpl Tabletpc.cpl Telephon.cpl Timedate.cpl But these ones doesn't work with my script on Windows 7: Appwiz.cpl Bthprops.cpl Desk.cpl Firewall.cpl Infocardcpl.cpl Intl.cpl Irprops.cpl Ncpa.cpl Powercfg.cpl Wscui.cpl Any help or suggestions would be appreciated. Sincerely Jorgen Malmgren IT-Programmer Denmark - UTC+1 www.tryware.dk ;o) Your brain is like a parachute. It works best when it's open
  7. Hi When using RunAs and RunAsWait you need to make sure, that the secondary logon service is running, and if you run your script from your own computer using e.g. pseexec.exe to get access to a remote computer, both computers must run the secondary logon service. And the secondary logon service needs the workstation service and netlogon service. The netlogon service only runs on domain computers, not on workgroup computers. You also needs to select a "@workingDir" for the functions, that the end user have write access to. Sincerely Jorgen Malmgren IT-Programmer Denmark - UTC+1 www.tryware.dk ;o) Your brain is like a parachute. It works best when it's
  8. Yes, but it requires a reboot before it works, and then you are able to run your script, but needs to restore the "EnableLUA to REG_DWORD=1 again, and that requires a new reboot before it work. Not that I know the right solution, but EnableLUA isn't the solution Sincerely Jorgen Malmgren IT-Programmer Denmark - UTC+1 www.tryware.dk ;o) Your brain is like a parachute. It works best when it's
  9. Hi 1: Open your au3 source script 2: Press CTRL+F7 3: Select "Resource Update" 4: Select "Execution level" 5: Select "requireAdministrator" 6: Select "Compile Script" You don't need to remember this, or script anything like e.g. #RequireAdmin, because now this "requireAdministrator manifest" is part of your source script: #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator From now on, no one can run your compiled exe file, without being prompted with an UAC elevation to run as administrator Sincerely Jorgen Malmgren IT-Programmer Denmark - UTC+1 www.tryware.dk ;o) Your brain is like a parachute. It works best when it's
  10. Hi CTRL+F7 Select "Resource Update" Select "Execution level" Select "requireAdministrator" Select "Compile Script" You don't need to remember this, becuase now it's part of your script like this: #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator From now on your compiled exe file will always be prompted with an UAC elevation to run as administrator
×
×
  • Create New...