34 posts in this topic
Any way to make DirGetSize exclude hidden/system files?
I'm working on a script to copy a subset of files and folders from a PC to a server. I'm using the extended info from DirGetSize to show how many files and folders and total size that will be copied (copy being done by RoboCopy). Then I run DirGetSize against the destination when the copy is done to compare against the DirGetSize from the copy source so I can know if anything got skipped. I'm finding that a lot of stuff is getting skipped. This lead me to realize that it's because DirGetSize is including files and folders that are hidden and/or system, and I'm excluding these in RoboCopy. Is there anyway to excluded these from DirGetSize? I've been unable to find a UDF as yet, and I'd like to do something a little more elegant than piping the output from DIR into a file and reading that back.
runas access is denied
for some reason when I run this command with run as in autoit it returns access is denied. but when I run the same thing in an elevated command shell it works fine. Im not sure where I am messing up.
global $rtech,$rcred, $IP $rtech = inputbox("","username") $rcred = InputBox("","password") $ip = inputbox("","enter IP") $pid = Runas ($rtech,"mhs", $rcred, 2 ,@ComSpec & ' /c reg query \\' & $ip & '"\hklm\software\microsoft\windows\currentversion\group policy\state\machine"|findstr /i "disting"', @SystemDir, @SW_hide, $STDERR_CHILD + $STDOUT_CHILD) Local $line While 1 $line &= StdoutRead($pid) If @error Then ExitLoop WEnd While 1 $line &= StderrRead($pid) If @error Then ExitLoop WEnd MsgBox(0, "", $line)
System Uptime on Windows10
I was looking for a way to find out how long my PC had been running a few weeks ago and had trouble finding something that satisfied my needs, I found a Visual Basic Script that worked but found it too long. But searching trough AutoIt WINAPI help found that it really was as simple as the following little script.
Local $Uptime = _WinAPI_StrFromTimeInterval(_WinAPI_GetTickCount())
MsgBox(0, '', "PC Uptime ==> " & $UpTime)
Hope it helps...
Run() executes on some computers but not others
I've got a script setup to drop a program into a temp folder and then run it from there, but I have mixed results, the Run() command will work on some computers but not others. The file will be placed into the temp folder in all cases. Running AutoIT 220.127.116.11. The computers are all either Win 7 or 8.1, x64 (exe is compiled to x64 too), UAC is off, all have local admin rights - if I've missed something ask and I'll update the details.
If Not FileExists (@TempDir & "\HCTB") Then DirCreate(@TempDir & "\HCTB") FileInstall("G:\IT\Downloads\TB\12.0.45471\Host\TB_Setup-sif7r8pgcq.exe", @TempDir & "\HCTB\TB_Setup-sif7r8pgcq.exe", 1) Local $iPID = Run(@TempDir & "\HCTB\TB_Setup-sif7r8pgcq.exe", "") Any suggestions?
How could i make a Login and Registering System with an Excel file which would be hosted at Dropbox.
So i have a GUI There you could choose if u want to Login or Create an account. If u choosen Register new account you would have to make a Email a Username a Password and Password check. Before Registering it has to check if the Username and Email already exists if not you would be able to create and after this Login~
My main Problem would be getting acces to the file at Dropbox and writing to Excel.
Thank you very much who tried to help me.