Jump to content
Sign in to follow this  
speedi

script works in winxp but not with Vista

Recommended Posts

speedi

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

Share this post


Link to post
Share on other sites
Melba23

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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
speedi

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")

Share this post


Link to post
Share on other sites
Melba23

speedi,

Man you are tough!

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

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
KaFu

Share this post


Link to post
Share on other sites
speedi

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!

Share this post


Link to post
Share on other sites
speedi

:DPROBLEM SOLVED!

The problem was the TM program. It is a time mark program that is very old and is a 16 bit program...

Thanks for any help!

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.