Jump to content

script works in winxp but not with Vista


speedi
 Share

Recommended Posts

I run this part of a script in winxp with no problems. Now trying to run on a Windows Vista computer and I get this error (sse jpg attached). Can't find reason searching forums.. Any help would be appreciated.. Also please tell me how to run the script without the owner agreeing to run it...

This is part of my daily backup script that runs each night and rotates the output folders.. I only wanted to show the line that gives me the error...

script part with error:

#RequireAdmin

RunWait(@ComSpec & " /c " & "c:\tm start /L >>c:\backup.txt")

:DSOLVED - see new post

I am using this code instead:

FileWrite("c:\backup.txt", "Backup " & @computername & " Done " & @MON & "/" & @MDAY & "/" & @YEAR & " -- " & @HOUR & ":" & @MIN & ":" & @SEC & @CRLF)

$Starttime = (@HOUR & ":" & @MIN & ":" & @SEC)

sleep(50000)

$Endtime = (@HOUR & ":" & @MIN & ":" & @SEC)

$out=elapsedtime($StartTime, $EndTime )

FileWrite("c:\backup.txt", "End Backup " & @MON & "/" & @MDAY & "/" & @YEAR & " -- " & @HOUR & ":" & @MIN & ":" & @SEC & " Elapsed Time = " & $out & " " & @CRLF)

Func ElapsedTime ( $StartTime, $EndTime )

$Start=StringSplit($StartTime,":")

$new=StringSplit($EndTime,":" )

$Oseconds=$Start[3]+($Start[2]*60)+($Start[1]*3600)

$Nseconds=$new[3]+($new[2]*60)+($new[1]*3600)

if $Oseconds>$Nseconds then $Nseconds=$Nseconds+24*3600

$outsec=$Nseconds-$Oseconds

$hour=Int($outsec/3600)

$min=Int(($outsec-($hour*3600))/60)

$sec=$outsec-($hour*3600)-($min*60)

$DiffTime = StringFormat("%02i:%02i:%02i", $hour,$min,$sec)

return $DiffTime

endfunc

Thanks very much! Jim

post-97-12645290553134_thumb.jpg

Edited by speedi
Link to comment
Share on other sites

  • Moderators

speedi,

please tell me how to run the script without the owner agreeing to run it

And why would you want to do this?

And the answer had better be a good one!

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

speedi,

And why would you want to do this?

And the answer had better be a good one!

M23

I see I didn't include ths script.. This is part of my daily backup script that runs each night and rotates the output folders.. I only wanted to show the line that gives me the error... Man you are tough!

script part with error:

#RequireAdmin

RunWait(@ComSpec & " /c " & "c:\tm start /L >>c:\backup.txt")

Link to comment
Share on other sites

  • Moderators

speedi,

Man you are tough!

No, just protective of Autoit's reputation. :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Is the vista a 64bit one? Then look at the MsgBox title and read this. In a Windows 64bit environment no 16bit code can be executed.

The Vista business pro in this case is 32 bit. I loaded the 32 bit xxcopy but received the same error... I will also inquire at the xxcopy web site. If you have any other ideas, I would appreciate them.... Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...